Move internal FILE flags macros to "local.h" from <stdio.h>.
Bug: http://b/24807045 Change-Id: Ia42ec1907370b4af957ece94a856f71c7ee27cb7
This commit is contained in:
parent
ad9c3f34f7
commit
e70e0e9267
|
@ -62,24 +62,6 @@ extern FILE* stderr;
|
|||
#define stdout stdout
|
||||
#define stderr stderr
|
||||
|
||||
#define __SLBF 0x0001 /* line buffered */
|
||||
#define __SNBF 0x0002 /* unbuffered */
|
||||
#define __SRD 0x0004 /* OK to read */
|
||||
#define __SWR 0x0008 /* OK to write */
|
||||
/* RD and WR are never simultaneously asserted */
|
||||
#define __SRW 0x0010 /* open for reading & writing */
|
||||
#define __SEOF 0x0020 /* found EOF */
|
||||
#define __SERR 0x0040 /* found error */
|
||||
#define __SMBF 0x0080 /* _buf is from malloc */
|
||||
#define __SAPP 0x0100 /* fdopen()ed in append mode */
|
||||
#define __SSTR 0x0200 /* this is an sprintf/snprintf string */
|
||||
/* #define __SOPT 0x0400 --- historical (do fseek() optimization). */
|
||||
/* #define __SNPT 0x0800 --- historical (do not do fseek() optimization). */
|
||||
/* #define __SOFF 0x1000 --- historical (set iff _offset is in fact correct). */
|
||||
#define __SMOD 0x2000 /* true => fgetln modified _p text */
|
||||
#define __SALC 0x4000 /* allocate string space dynamically */
|
||||
#define __SIGN 0x8000 /* ignore this file in _fwalk */
|
||||
|
||||
/*
|
||||
* The following three definitions are for ANSI C, which took them
|
||||
* from System V, which brilliantly took internal interface macros and
|
||||
|
|
|
@ -125,6 +125,25 @@ struct __sfileext {
|
|||
off64_t (*_seek64)(void*, off64_t, int);
|
||||
};
|
||||
|
||||
// Values for `__sFILE::_flags`.
|
||||
#define __SLBF 0x0001 // Line buffered.
|
||||
#define __SNBF 0x0002 // Unbuffered.
|
||||
// RD and WR are never simultaneously asserted: use _SRW instead.
|
||||
#define __SRD 0x0004 // OK to read.
|
||||
#define __SWR 0x0008 // OK to write.
|
||||
#define __SRW 0x0010 // Open for reading & writing.
|
||||
#define __SEOF 0x0020 // Found EOF.
|
||||
#define __SERR 0x0040 // Found error.
|
||||
#define __SMBF 0x0080 // `_buf` is from malloc.
|
||||
#define __SAPP 0x0100 // fdopen()ed in append mode.
|
||||
#define __SSTR 0x0200 // This is an sprintf/snprintf string.
|
||||
// #define __SOPT 0x0400 --- historical (do fseek() optimization).
|
||||
// #define __SNPT 0x0800 --- historical (do not do fseek() optimization).
|
||||
// #define __SOFF 0x1000 --- historical (set iff _offset is in fact correct).
|
||||
#define __SMOD 0x2000 // true => fgetln modified _p text.
|
||||
#define __SALC 0x4000 // Allocate string space dynamically.
|
||||
#define __SIGN 0x8000 // Ignore this file in _fwalk.
|
||||
|
||||
// TODO: remove remaining references to these obsolete flags.
|
||||
#define __SNPT 0
|
||||
#define __SOPT 0
|
||||
|
|
Loading…
Reference in New Issue