16 #include <sys/ioctl.h>
26 #define FLOCK(f) LOCK(&f->lock)
27 #define FUNLOCK(f) UNLOCK(&f->lock)
37 unsigned char *rpos, *rstop;
38 unsigned char *rend, *wend;
39 unsigned char *wpos, *wstop;
41 unsigned char *dummy01[3];
56 void **wide_data; /* must be NULL */
57 size_t (*read)(FILE *, unsigned char *, size_t);
58 size_t (*write)(FILE *, const unsigned char *, size_t);
59 off_t (*seek)(FILE *, off_t, int);
64 size_t __stdio_read(FILE *, unsigned char *, size_t);
65 size_t __stdio_write(FILE *, const unsigned char *, size_t);
66 off_t __stdio_seek(FILE *, off_t, int);
67 int __stdio_close(FILE *);
69 int __overflow(FILE *, int);
72 int __underflow(FILE *);
74 int __fseeko(FILE *, off_t, int);
75 int __fseeko_unlocked(FILE *, off_t, int);
76 off_t __ftello(FILE *);
77 off_t __ftello_unlocked(FILE *);
78 size_t __fwritex(const unsigned char *, size_t, FILE *);
79 int __putc_unlocked(int, FILE *);
81 FILE *__fdopen(int, const char *);
89 #define OFLLOCK() LOCK(&__ofl.lock)
90 #define OFLUNLOCK() UNLOCK(&__ofl.lock)
91 #define ofl_head (__ofl.head)
93 #define feof(f) ((f)->flags & F_EOF)
94 #define ferror(f) ((f)->flags & F_ERR)
96 /* Caller-allocated FILE * operations */
97 FILE *__fopen_rb_ca(const char *, FILE *, unsigned char *, size_t);
98 int __fclose_ca(FILE *);