1- diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/bits/struct_file.h ./usr/include/bits/struct_file.h
2- --- /home/fornwall/lib/android-ndk/sysroot/ usr/include/bits/struct_file.h 2017 -06-20 17:41:56.000000000 +0200
3- +++ ./usr/include/bits/struct_file.h 2017-06-26 13:35:19.040117023 +0200
4- @@ -33,13 +33,80 @@
1+ --- ./usr/include/bits/struct_file.h.orig 2019-06-10 09:40:35.872857650 +1000
2+ +++ ./ usr/include/bits/struct_file.h 2019 -06-10 09:55:10.890308649 +1000
3+ @@ -31,14 +31,79 @@
4+ #include <sys/cdefs.h>
55
66 __BEGIN_DECLS
7-
87+ #if defined(__LP64__)
98+ struct __sbuf {
109+ unsigned char* _base;
@@ -13,75 +12,74 @@ diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/bits/struct_file.h
1312+ #else
1413+ struct __sbuf {
1514+ unsigned char *_base;
16- + int _size;
15+ + int _size;
1716+ };
18- + #endif
19- +
17+ + #endif
2018+ #if defined(__LP64__)
2119+ typedef int64_t _struct_file_off_t;
2220+ #else
2321+ typedef __kernel_off_t _struct_file_off_t;
2422+ #endif
25- +
23+ +
24+
25+ /** The opaque structure implementing `FILE`. Do not make any assumptions about its content. */
2626 struct __sFILE {
27- + unsigned char *_p; /* current position in (some) buffer */
28- + int _r; /* read space left for getc() */
29- + int _w; /* write space left for putc() */
27+ + unsigned char *_p; /* current position in (some) buffer */
28+ + int _r; /* read space left for getc() */
29+ + int _w; /* write space left for putc() */
3030 #if defined(__LP64__)
3131- char __private[152];
32- + int _flags; /* flags, below; this FILE is free if 0 */
33- + int _file; /* fileno, if Unix descriptor, else -1 */
32+ + int _flags; /* flags, below; this FILE is free if 0 */
33+ + int _file; /* fileno, if Unix descriptor, else -1 */
3434 #else
3535- char __private[84];
36- + short _flags; /* flags, below; this FILE is free if 0 */
37- + short _file; /* fileno, if Unix descriptor, else -1 */
36+ + short _flags; /* flags, below; this FILE is free if 0 */
37+ + short _file; /* fileno, if Unix descriptor, else -1 */
3838 #endif
3939- } __attribute__((aligned(sizeof(void*))));
40- + struct __sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */
41- + int _lbfsize; /* 0 or -_bf._size, for inline putc */
42- +
43- + /* operations */
44- + void *_cookie; /* cookie passed to io functions */
45- + int (*_close)(void *);
46- + int (*_read)(void *, char *, int);
47- + _struct_file_off_t (*_seek)(void *, _struct_file_off_t, int);
48- + int (*_write)(void *, const char *, int);
49- +
40+ + struct __sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */
41+ + int _lbfsize; /* 0 or -_bf._size, for inline putc */
42+ +
43+ + /* operations */
44+ + void *_cookie; /* cookie passed to io functions */
45+ + int (*_close)(void *);
46+ + int (*_read)(void *, char *, int);
47+ + _struct_file_off_t (*_seek)(void *, _struct_file_off_t, int);
48+ + int (*_write)(void *, const char *, int);
49+ +
5050+ /* extension data, to avoid further ABI breakage */
51- + struct __sbuf _ext;
51+ + struct __sbuf _ext;
5252+ /* data for long sequences of ungetc() */
53- + unsigned char *_up; /* saved _p when _p is doing ungetc data */
54- + int _ur; /* saved _r when _r is counting ungetc data */
55- +
53+ + unsigned char *_up; /* saved _p when _p is doing ungetc data */
54+ + int _ur; /* saved _r when _r is counting ungetc data */
55+ +
5656+ /* tricks to meet minimum requirements even when malloc() fails */
57- + unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */
58- + unsigned char _nbuf[1]; /* guarantee a getc() buffer */
59- +
57+ + unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */
58+ + unsigned char _nbuf[1]; /* guarantee a getc() buffer */
59+ +
6060+ /* separate buffer for fgetln() when line crosses buffer boundary */
61- + struct __sbuf _lb; /* buffer for fgetln() */
62- +
61+ + struct __sbuf _lb; /* buffer for fgetln() */
62+ +
6363+ /* Unix stdio files get aligned to block boundaries on fseek() */
64- + int _blksize; /* stat.st_blksize (may be != _bf._size) */
65- + _struct_file_off_t _offset; /* current lseek offset */
64+ + int _blksize; /* stat.st_blksize (may be != _bf._size) */
65+ + _struct_file_off_t _offset; /* current lseek offset */
6666+ };
67- +
68- + #define __SLBF 0x0001 /* line buffered */
69- + #define __SNBF 0x0002 /* unbuffered */
70- + #define __SRD 0x0004 /* OK to read */
71- + #define __SWR 0x0008 /* OK to write */
67+ + #define __SLBF 0x0001 /* line buffered */
68+ + #define __SNBF 0x0002 /* unbuffered */
69+ + #define __SRD 0x0004 /* OK to read */
70+ + #define __SWR 0x0008 /* OK to write */
7271+ /* RD and WR are never simultaneously asserted */
73- + #define __SRW 0x0010 /* open for reading & writing */
74- + #define __SEOF 0x0020 /* found EOF */
75- + #define __SERR 0x0040 /* found error */
76- + #define __SMBF 0x0080 /* _buf is from malloc */
77- + #define __SAPP 0x0100 /* fdopen()ed in append mode */
78- + #define __SSTR 0x0200 /* this is an sprintf/snprintf string */
79- + #define __SOPT 0x0400 /* do fseek() optimization */
80- + #define __SNPT 0x0800 /* do not do fseek() optimization */
81- + #define __SOFF 0x1000 /* set iff _offset is in fact correct */
82- + #define __SMOD 0x2000 /* true => fgetln modified _p text */
83- + #define __SALC 0x4000 /* allocate string space dynamically */
84- + #define __SIGN 0x8000 /* ignore this file in _fwalk */
72+ + #define __SRW 0x0010 /* open for reading & writing */
73+ + #define __SEOF 0x0020 /* found EOF */
74+ + #define __SERR 0x0040 /* found error */
75+ + #define __SMBF 0x0080 /* _buf is from malloc */
76+ + #define __SAPP 0x0100 /* fdopen()ed in append mode */
77+ + #define __SSTR 0x0200 /* this is an sprintf/snprintf string */
78+ + #define __SOPT 0x0400 /* do fseek() optimization */
79+ + #define __SNPT 0x0800 /* do not do fseek() optimization */
80+ + #define __SOFF 0x1000 /* set iff _offset is in fact correct */
81+ + #define __SMOD 0x2000 /* true => fgetln modified _p text */
82+ + #define __SALC 0x4000 /* allocate string space dynamically */
83+ + #define __SIGN 0x8000 /* ignore this file in _fwalk */
8584
8685 __END_DECLS
87-
0 commit comments