Skip to content

Commit d91fe44

Browse files
eggertbhaible
authored andcommitted
stdioext: port to newer 32-bit Android
Problem reported by Tom Yan in: https://lists.gnu.org/archive/html/bug-gnulib/2018-07/msg00014.html * lib/stdio-impl.h (_gl_FILE_flags_t) [__ANDROID__]: New macro. (fp_) [__ANDROID__]: Use it.
1 parent d271f86 commit d91fe44

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

ChangeLog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2018-12-22 Paul Eggert <eggert@cs.ucla.edu>
2+
3+
stdioext: port to newer 32-bit Android
4+
Problem reported by Tom Yan in:
5+
https://lists.gnu.org/archive/html/bug-gnulib/2018-07/msg00014.html
6+
* lib/stdio-impl.h (_gl_FILE_flags_t) [__ANDROID__]: New macro.
7+
(fp_) [__ANDROID__]: Use it.
8+
19
2019-01-04 Bruno Haible <bruno@clisp.org>
210

311
lock: Fix link error with --enable-threads=pth.

lib/stdio-impl.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@
6161
# define _r pub._r
6262
# define _w pub._w
6363
# elif defined __ANDROID__ /* Android */
64+
# ifdef __LP64__
65+
# define _gl_flags_file_t int
66+
# else
67+
# define _gl_flags_file_t short
68+
# endif
6469
/* Up to this commit from 2015-10-12
6570
<https://android.googlesource.com/platform/bionic.git/+/f0141dfab10a4b332769d52fa76631a64741297a>
6671
the innards of FILE were public, and fp_ub could be defined like for OpenBSD,
@@ -70,8 +75,8 @@
7075
# define fp_ ((struct { unsigned char *_p; \
7176
int _r; \
7277
int _w; \
73-
int _flags; \
74-
int _file; \
78+
_gl_flags_file_t _flags; \
79+
_gl_flags_file_t _file; \
7580
struct { unsigned char *_base; size_t _size; } _bf; \
7681
int _lbfsize; \
7782
void *_cookie; \

0 commit comments

Comments
 (0)