11 #define __NEED_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
21 #include <bits/alltypes.h>
40 #define FILENAME_MAX 4095
41 #define FOPEN_MAX 1000
50 extern FILE *const stdin;
51 extern FILE *const stdout;
52 extern FILE *const stderr;
55 #define stdout (stdout)
56 #define stderr (stderr)
58 FILE *fopen(const char *__restrict, const char *__restrict);
59 FILE *freopen(const char *__restrict, const char *__restrict, FILE *__restrict);
62 int remove(const char *);
63 int rename(const char *, const char *);
68 void clearerr(FILE *);
70 int fseek(FILE *, long, int);
74 int fgetpos(FILE *__restrict, fpos_t *__restrict);
75 int fsetpos(FILE *, const fpos_t *);
77 size_t fread(void *__restrict, size_t, size_t, FILE *__restrict);
78 size_t fwrite(const void *__restrict, size_t, size_t, FILE *__restrict);
83 int ungetc(int, FILE *);
85 int fputc(int, FILE *);
86 int putc(int, FILE *);
89 char *fgets(char *__restrict, int, FILE *__restrict);
90 #if __STDC_VERSION__ < 201112L
94 int fputs(const char *__restrict, FILE *__restrict);
95 int puts(const char *);
97 int printf(const char *__restrict, ...);
98 int fprintf(FILE *__restrict, const char *__restrict, ...);
99 int sprintf(char *__restrict, const char *__restrict, ...);
100 int snprintf(char *__restrict, size_t, const char *__restrict, ...);
102 int vprintf(const char *__restrict, va_list);
103 int vfprintf(FILE *__restrict, const char *__restrict, va_list);
104 int vsprintf(char *__restrict, const char *__restrict, va_list);
105 int vsnprintf(char *__restrict, size_t, const char *__restrict, va_list);
107 int scanf(const char *__restrict, ...);
108 int fscanf(FILE *__restrict, const char *__restrict, ...);
109 int sscanf(const char *__restrict, const char *__restrict, ...);
110 int vscanf(const char *__restrict, va_list);
111 int vfscanf(FILE *__restrict, const char *__restrict, va_list);
112 int vsscanf(const char *__restrict, const char *__restrict, va_list);
114 void perror(const char *);
116 int setvbuf(FILE *__restrict, char *__restrict, int, size_t);
117 void setbuf(FILE *__restrict, char *__restrict);
119 char *tmpnam(char *);
122 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
123 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
124 || defined(_BSD_SOURCE)
125 FILE *fmemopen(void *__restrict, size_t, const char *__restrict);
126 FILE *open_memstream(char **, size_t *);
127 FILE *fdopen(int, const char *);
128 FILE *popen(const char *, const char *);
131 int fseeko(FILE *, off_t, int);
132 off_t ftello(FILE *);
133 int dprintf(int, const char *__restrict, ...);
134 int vdprintf(int, const char *__restrict, va_list);
135 void flockfile(FILE *);
136 int ftrylockfile(FILE *);
137 void funlockfile(FILE *);
138 int getc_unlocked(FILE *);
139 int getchar_unlocked(void);
140 int putc_unlocked(int, FILE *);
141 int putchar_unlocked(int);
142 ssize_t getdelim(char **__restrict, size_t *__restrict, int, FILE *__restrict);
143 ssize_t getline(char **__restrict, size_t *__restrict, FILE *__restrict);
144 int renameat(int, const char *, int, const char *);
145 char *ctermid(char *);
150 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
151 || defined(_BSD_SOURCE)
152 #define P_tmpdir "/tmp"
153 char *tempnam(const char *, const char *);
156 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
158 char *cuserid(char *);
159 void setlinebuf(FILE *);
160 void setbuffer(FILE *, char *, size_t);
161 int fgetc_unlocked(FILE *);
162 int fputc_unlocked(int, FILE *);
163 int fflush_unlocked(FILE *);
164 size_t fread_unlocked(void *, size_t, size_t, FILE *);
165 size_t fwrite_unlocked(const void *, size_t, size_t, FILE *);
166 void clearerr_unlocked(FILE *);
167 int feof_unlocked(FILE *);
168 int ferror_unlocked(FILE *);
169 int fileno_unlocked(FILE *);
171 int putw(int, FILE *);
172 char *fgetln(FILE *, size_t *);
173 int asprintf(char **, const char *, ...);
174 int vasprintf(char **, const char *, va_list);
178 char *fgets_unlocked(char *, int, FILE *);
179 int fputs_unlocked(const char *, FILE *);
182 #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
183 #define tmpfile64 tmpfile
184 #define fopen64 fopen
185 #define freopen64 freopen
186 #define fseeko64 fseeko
187 #define ftello64 ftello
188 #define fgetpos64 fgetpos
189 #define fsetpos64 fsetpos
190 #define fpos64_t fpos_t
191 #define off64_t off_t