16 #include <sys/ioctl.h>
26 #define FLOCK(f) ((libc.lockfile && (f)->owner>=0) ? (libc.lockfile((f)),0) : 0)
27 #define FUNLOCK(f) ((f)->lockcount && (--(f)->lockcount || ((f)->owner=(f)->lock=0)))
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);
65 size_t __stdio_read(FILE *, unsigned char *, size_t);
66 size_t __stdio_write(FILE *, const unsigned char *, size_t);
67 off_t __stdio_seek(FILE *, off_t, int);
68 int __stdio_close(FILE *);
70 int __overflow(FILE *, int);
73 int __underflow(FILE *);
75 int __fseeko(FILE *, off_t, int);
76 int __fseeko_unlocked(FILE *, off_t, int);
77 off_t __ftello(FILE *);
78 off_t __ftello_unlocked(FILE *);
79 size_t __fwritex(const unsigned char *, size_t, FILE *);
80 int __putc_unlocked(int, FILE *);
82 FILE *__fdopen(int, const char *);
84 #define OFLLOCK() LOCK(&libc.ofl_lock)
85 #define OFLUNLOCK() UNLOCK(&libc.ofl_lock)
86 #define ofl_head (libc.ofl_head)
88 #define feof(f) ((f)->flags & F_EOF)
89 #define ferror(f) ((f)->flags & F_ERR)
91 /* Caller-allocated FILE * operations */
92 FILE *__fopen_rb_ca(const char *, FILE *, unsigned char *, size_t);
93 int __fclose_ca(FILE *);