From: Bruno Haible Date: Tue, 17 Jan 2023 19:17:27 +0000 (+0100) Subject: fflush: Tweak last commit. X-Git-Tag: v1.0~1818 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=cdbfa3435def79a5cbf055c55771530b0961052c;p=gnulib.git fflush: Tweak last commit. * lib/stdio-impl.h (fp_): Make the last change work also with newer Android NDKs and _FILE_OFFSET_BITS=64. --- diff --git a/ChangeLog b/ChangeLog index 193d4ff3a9..4ec2207df9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2023-01-17 Bruno Haible + + fflush: Tweak last commit. + * lib/stdio-impl.h (fp_): Make the last change work also with newer + Android NDKs and _FILE_OFFSET_BITS=64. + 2023-01-17 Ondrej Valousek qset-acl, acl: Improve comments. diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h index 89056b0de5..46608bed19 100644 --- a/lib/stdio-impl.h +++ b/lib/stdio-impl.h @@ -70,6 +70,12 @@ # define _gl_flags_file_t int # else # define _gl_flags_file_t short +# endif +# ifdef __LP64__ +# define _gl_file_offset_t int64_t +# else + /* see https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md */ +# define _gl_file_offset_t __kernel_off_t # endif /* Up to this commit from 2015-10-12 @@ -96,7 +102,7 @@ unsigned char _nbuf[1]; \ struct { unsigned char *_base; size_t _size; } _lb; \ int _blksize; \ - long _offset; \ + _gl_file_offset_t _offset; \ /* More fields, not relevant here. */ \ } *) fp) # else