12 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
13 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
14 #define __NEED_ssize_t
18 #include <bits/alltypes.h>
24 #define NULL ((void*)0)
41 #include <bits/stdio.h>
48 extern FILE *const stdin;
49 extern FILE *const stdout;
50 extern FILE *const stderr;
53 #define stdout (stdout)
54 #define stderr (stderr)
56 FILE *fopen(const char *, const char *);
57 FILE *freopen(const char *, const char *, FILE *);
60 int remove(const char *);
61 int rename(const char *, const char *);
66 void clearerr(FILE *);
68 int fseek(FILE *, long, int);
72 int fgetpos(FILE *, fpos_t *);
73 int fsetpos(FILE *, const fpos_t *);
75 size_t fread(void *, size_t, size_t, FILE *);
76 size_t fwrite(const void *, size_t, size_t, FILE *);
81 int ungetc(int, FILE *);
83 int fputc(int, FILE *);
84 int putc(int, FILE *);
87 char *fgets(char *, int, FILE *);
90 int fputs(const char *, FILE *);
91 int puts(const char *);
93 int printf(const char *, ...);
94 int fprintf(FILE *, const char *, ...);
95 int sprintf(char *, const char *, ...);
96 int snprintf(char *, size_t, const char *, ...);
98 int vprintf(const char *, va_list);
99 int vfprintf(FILE *, const char *, va_list);
100 int vsprintf(char *, const char *, va_list);
101 int vsnprintf(char *, size_t, const char *, va_list);
103 int scanf(const char *, ...);
104 int fscanf(FILE *, const char *, ...);
105 int sscanf(const char *, const char *, ...);
106 int vscanf(const char *, va_list);
107 int vfscanf(FILE *, const char *, va_list);
108 int vsscanf(const char *, const char *, va_list);
110 void perror(const char *);
112 int setvbuf(FILE *, char *, int, size_t);
113 void setbuf(FILE *, char *);
115 char *tmpnam(char *);
118 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
119 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
120 FILE *fdopen(int, const char *);
121 FILE *popen(const char *, const char *);
124 int fseeko(FILE *, off_t, int);
125 off_t ftello(FILE *);
126 int dprintf(int, const char *, ...);
127 int vdprintf(int, const char *, va_list);
128 void flockfile(FILE *);
129 int ftrylockfile(FILE *);
130 void funlockfile(FILE *);
131 int getc_unlocked(FILE *);
132 int getchar_unlocked(void);
133 int putc_unlocked(int, FILE *);
134 int putchar_unlocked(int);
135 ssize_t getdelim(char **, size_t *, int, FILE *);
136 ssize_t getline(char **, size_t *, FILE *);
137 int renameat(int, const char *, int, const char *);
138 char *ctermid(char *);
142 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
143 char *tempnam(const char *, const char *);
146 #if defined(_GNU_SOURCE)
148 #define off64_t off_t