Mercurial > gnulib
changeset 40081:9cfd9ce6fa82
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.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Sat, 22 Dec 2018 18:00:10 -0800 |
parents | 0fb62d51cadc |
children | 6b4f59f81014 |
files | ChangeLog lib/stdio-impl.h |
diffstat | 2 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat Jan 05 02:37:39 2019 +0100 +++ b/ChangeLog Sat Dec 22 18:00:10 2018 -0800 @@ -1,3 +1,11 @@ +2018-12-22 Paul Eggert <eggert@cs.ucla.edu> + + 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. + 2019-01-04 Bruno Haible <bruno@clisp.org> lock: Fix link error with --enable-threads=pth.
--- a/lib/stdio-impl.h Sat Jan 05 02:37:39 2019 +0100 +++ b/lib/stdio-impl.h Sat Dec 22 18:00:10 2018 -0800 @@ -61,6 +61,11 @@ # define _r pub._r # define _w pub._w # elif defined __ANDROID__ /* Android */ +# ifdef __LP64__ +# define _gl_flags_file_t int +# else +# define _gl_flags_file_t short +# endif /* Up to this commit from 2015-10-12 <https://android.googlesource.com/platform/bionic.git/+/f0141dfab10a4b332769d52fa76631a64741297a> the innards of FILE were public, and fp_ub could be defined like for OpenBSD, @@ -70,8 +75,8 @@ # define fp_ ((struct { unsigned char *_p; \ int _r; \ int _w; \ - int _flags; \ - int _file; \ + _gl_flags_file_t _flags; \ + _gl_flags_file_t _file; \ struct { unsigned char *_base; size_t _size; } _bf; \ int _lbfsize; \ void *_cookie; \