11 #define __NEED___isoc_va_list
14 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
15 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
16 || defined(_BSD_SOURCE)
17 #define __NEED_ssize_t
19 #define __NEED_va_list
22 #include <bits/alltypes.h>
41 #define FILENAME_MAX 4095
42 #define FOPEN_MAX 1000
51 extern FILE *const stdin;
52 extern FILE *const stdout;
53 extern FILE *const stderr;
56 #define stdout (stdout)
57 #define stderr (stderr)
59 FILE *fopen(const char *__restrict, const char *__restrict);
60 FILE *freopen(const char *__restrict, const char *__restrict, FILE *__restrict);
63 int remove(const char *);
64 int rename(const char *, const char *);
69 void clearerr(FILE *);
71 int fseek(FILE *, long, int);
75 int fgetpos(FILE *__restrict, fpos_t *__restrict);
76 int fsetpos(FILE *, const fpos_t *);
78 size_t fread(void *__restrict, size_t, size_t, FILE *__restrict);
79 size_t fwrite(const void *__restrict, size_t, size_t, FILE *__restrict);
84 int ungetc(int, FILE *);
86 int fputc(int, FILE *);
87 int putc(int, FILE *);
90 char *fgets(char *__restrict, int, FILE *__restrict);
91 #if __STDC_VERSION__ < 201112L
95 int fputs(const char *__restrict, FILE *__restrict);
96 int puts(const char *);
98 int printf(const char *__restrict, ...);
99 int fprintf(FILE *__restrict, const char *__restrict, ...);
100 int sprintf(char *__restrict, const char *__restrict, ...);
101 int snprintf(char *__restrict, size_t, const char *__restrict, ...);
103 int vprintf(const char *__restrict, __isoc_va_list);
104 int vfprintf(FILE *__restrict, const char *__restrict, __isoc_va_list);
105 int vsprintf(char *__restrict, const char *__restrict, __isoc_va_list);
106 int vsnprintf(char *__restrict, size_t, const char *__restrict, __isoc_va_list);
108 int scanf(const char *__restrict, ...);
109 int fscanf(FILE *__restrict, const char *__restrict, ...);
110 int sscanf(const char *__restrict, const char *__restrict, ...);
111 int vscanf(const char *__restrict, __isoc_va_list);
112 int vfscanf(FILE *__restrict, const char *__restrict, __isoc_va_list);
113 int vsscanf(const char *__restrict, const char *__restrict, __isoc_va_list);
115 void perror(const char *);
117 int setvbuf(FILE *__restrict, char *__restrict, int, size_t);
118 void setbuf(FILE *__restrict, char *__restrict);
120 char *tmpnam(char *);
123 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
124 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
125 || defined(_BSD_SOURCE)
126 FILE *fmemopen(void *__restrict, size_t, const char *__restrict);
127 FILE *open_memstream(char **, size_t *);
128 FILE *fdopen(int, const char *);
129 FILE *popen(const char *, const char *);
132 int fseeko(FILE *, off_t, int);
133 off_t ftello(FILE *);
134 int dprintf(int, const char *__restrict, ...);
135 int vdprintf(int, const char *__restrict, __isoc_va_list);
136 void flockfile(FILE *);
137 int ftrylockfile(FILE *);
138 void funlockfile(FILE *);
139 int getc_unlocked(FILE *);
140 int getchar_unlocked(void);
141 int putc_unlocked(int, FILE *);
142 int putchar_unlocked(int);
143 ssize_t getdelim(char **__restrict, size_t *__restrict, int, FILE *__restrict);
144 ssize_t getline(char **__restrict, size_t *__restrict, FILE *__restrict);
145 int renameat(int, const char *, int, const char *);
146 char *ctermid(char *);
151 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
152 || defined(_BSD_SOURCE)
153 #define P_tmpdir "/tmp"
154 char *tempnam(const char *, const char *);
157 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
159 char *cuserid(char *);
160 void setlinebuf(FILE *);
161 void setbuffer(FILE *, char *, size_t);
162 int fgetc_unlocked(FILE *);
163 int fputc_unlocked(int, FILE *);
164 int fflush_unlocked(FILE *);
165 size_t fread_unlocked(void *, size_t, size_t, FILE *);
166 size_t fwrite_unlocked(const void *, size_t, size_t, FILE *);
167 void clearerr_unlocked(FILE *);
168 int feof_unlocked(FILE *);
169 int ferror_unlocked(FILE *);
170 int fileno_unlocked(FILE *);
172 int putw(int, FILE *);
173 char *fgetln(FILE *, size_t *);
174 int asprintf(char **, const char *, ...);
175 int vasprintf(char **, const char *, __isoc_va_list);
179 char *fgets_unlocked(char *, int, FILE *);
180 int fputs_unlocked(const char *, FILE *);
183 #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
184 #define tmpfile64 tmpfile
185 #define fopen64 fopen
186 #define freopen64 freopen
187 #define fseeko64 fseeko
188 #define ftello64 ftello
189 #define fgetpos64 fgetpos
190 #define fsetpos64 fsetpos
191 #define fpos64_t fpos_t
192 #define off64_t off_t