diff options
author | Elliott Hughes <enh@google.com> | 2014-08-20 12:14:21 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-08-20 12:14:21 -0700 |
commit | 2d80400a9e8454038a3ec29959436184be0c4c65 (patch) | |
tree | 63f2427c3a836d36f9d2527817da5e93968eb840 /libc/include | |
parent | 1506fc178e9dcd873eaf95535ac7625ebb59388f (diff) | |
download | bionic-2d80400a9e8454038a3ec29959436184be0c4c65.zip bionic-2d80400a9e8454038a3ec29959436184be0c4c65.tar.gz bionic-2d80400a9e8454038a3ec29959436184be0c4c65.tar.bz2 |
Fix some 32-bit-isms in <stdio.h>.
Bug: 17157793
Change-Id: I8290e240b92e5617f4c12c0eacad6e622e677b6a
Diffstat (limited to 'libc/include')
-rw-r--r-- | libc/include/stdio.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libc/include/stdio.h b/libc/include/stdio.h index 9c6bd3f..43b0fbf 100644 --- a/libc/include/stdio.h +++ b/libc/include/stdio.h @@ -58,10 +58,17 @@ typedef off_t fpos_t; /* stdio file position type */ */ /* stdio buffers */ +#if defined(__LP64__) +struct __sbuf { + unsigned char* _base; + size_t _size; +}; +#else struct __sbuf { unsigned char *_base; int _size; }; +#endif /* * stdio state variables. @@ -94,8 +101,13 @@ typedef struct __sFILE { unsigned char *_p; /* current position in (some) buffer */ int _r; /* read space left for getc() */ int _w; /* write space left for putc() */ +#if defined(__LP64__) + int _flags; /* flags, below; this FILE is free if 0 */ + int _file; /* fileno, if Unix descriptor, else -1 */ +#else short _flags; /* flags, below; this FILE is free if 0 */ short _file; /* fileno, if Unix descriptor, else -1 */ +#endif struct __sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */ int _lbfsize; /* 0 or -_bf._size, for inline putc */ |