10 #define FFINALLOCK(f) ((f)->lock>=0 ? __lockfile((f)) : 0)
11 #define FLOCK(f) int __need_unlock = ((f)->lock>=0 ? __lockfile((f)) : 0)
12 #define FUNLOCK(f) do { if (__need_unlock) __unlockfile((f)); } while (0)
24 unsigned char *rpos, *rend;
26 unsigned char *wend, *wpos;
27 unsigned char *mustbezero_1;
29 size_t (*read)(FILE *, unsigned char *, size_t);
30 size_t (*write)(FILE *, const unsigned char *, size_t);
31 off_t (*seek)(FILE *, off_t, int);
49 FILE *prev_locked, *next_locked;
50 struct __locale_struct *locale;
53 size_t __stdio_read(FILE *, unsigned char *, size_t);
54 size_t __stdio_write(FILE *, const unsigned char *, size_t);
55 size_t __stdout_write(FILE *, const unsigned char *, size_t);
56 off_t __stdio_seek(FILE *, off_t, int);
57 int __stdio_close(FILE *);
59 size_t __string_read(FILE *, unsigned char *, size_t);
62 int __towrite(FILE *);
64 #if defined(__PIC__) && (100*__GNUC__+__GNUC_MINOR__ >= 303)
65 __attribute__((visibility("protected")))
67 int __overflow(FILE *, int), __uflow(FILE *);
69 int __fseeko(FILE *, off_t, int);
70 int __fseeko_unlocked(FILE *, off_t, int);
71 off_t __ftello(FILE *);
72 off_t __ftello_unlocked(FILE *);
73 size_t __fwritex(const unsigned char *, size_t, FILE *);
74 int __putc_unlocked(int, FILE *);
76 FILE *__fdopen(int, const char *);
77 int __fmodeflags(const char *);
79 FILE *__ofl_add(FILE *f);
80 FILE **__ofl_lock(void);
81 void __ofl_unlock(void);
83 #define feof(f) ((f)->flags & F_EOF)
84 #define ferror(f) ((f)->flags & F_ERR)
86 #define getc_unlocked(f) \
87 ( ((f)->rpos < (f)->rend) ? *(f)->rpos++ : __uflow((f)) )
89 #define putc_unlocked(c, f) \
90 ( ((unsigned char)(c)!=(f)->lbf && (f)->wpos<(f)->wend) \
91 ? *(f)->wpos++ = (c) : __overflow((f),(c)) )
93 /* Caller-allocated FILE * operations */
94 FILE *__fopen_rb_ca(const char *, FILE *, unsigned char *, size_t);
95 int __fclose_ca(FILE *);