summaryrefslogtreecommitdiffstats
path: root/include/stdio.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2008-04-17 19:06:00 +0000
committerjhb <jhb@FreeBSD.org>2008-04-17 19:06:00 +0000
commit29daa50d475a056ec6901b73e7befbdc90e2bb90 (patch)
tree44d6768957da6b2b743bc7ff2c82462a3fe54dbe /include/stdio.h
parenta318b86b072271a99f5d6483f7bda364479182fa (diff)
downloadFreeBSD-src-29daa50d475a056ec6901b73e7befbdc90e2bb90.zip
FreeBSD-src-29daa50d475a056ec6901b73e7befbdc90e2bb90.tar.gz
Specifically mark the members of 'FILE' that are accessed via inline
functions or macros since they are part of the public ABI as a result. MFC after: 1 month
Diffstat (limited to 'include/stdio.h')
-rw-r--r--include/stdio.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/include/stdio.h b/include/stdio.h
index 6adc9d7..362a0dd 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -98,15 +98,19 @@ struct __sFILEX;
* that does not match the previous one in _bf. When this happens,
* _ub._base becomes non-nil (i.e., a stream has ungetc() data iff
* _ub._base!=NULL) and _up and _ur save the current values of _p and _r.
+ *
+ * Certain members of __sFILE are accessed directly via macros or
+ * inline functions. To preserve ABI compat, these members must not
+ * be disturbed. These members are marked below with (*).
*/
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() */
- short _flags; /* flags, below; this FILE is free if 0 */
- short _file; /* fileno, if Unix descriptor, else -1 */
+ unsigned char *_p; /* (*) current position in (some) buffer */
+ int _r; /* (*) read space left for getc() */
+ int _w; /* (*) write space left for putc() */
+ short _flags; /* (*) flags, below; this FILE is free if 0 */
+ short _file; /* (*) fileno, if Unix descriptor, else -1 */
struct __sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */
- int _lbfsize; /* 0 or -_bf._size, for inline putc */
+ int _lbfsize; /* (*) 0 or -_bf._size, for inline putc */
/* operations */
void *_cookie; /* cookie passed to io functions */
OpenPOWER on IntegriCloud