1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | |
17 | |
18 | |
19 | |
20 | |
21 | |
22 | |
23 | #ifndef _STDIO_H |
24 | |
25 | #if !defined __need_FILE && !defined __need___FILE |
26 | # define _STDIO_H 1 |
27 | # include <features.h> |
28 | |
29 | __BEGIN_DECLS |
30 | |
31 | # define __need_size_t |
32 | # define __need_NULL |
33 | # include <stddef.h> |
34 | |
35 | # include <bits/types.h> |
36 | # define __need_FILE |
37 | # define __need___FILE |
38 | #endif |
39 | |
40 | |
41 | #if !defined __FILE_defined && defined __need_FILE |
42 | |
43 | |
44 | struct _IO_FILE; |
45 | |
46 | __BEGIN_NAMESPACE_STD |
47 | |
48 | typedef struct _IO_FILE FILE; |
49 | __END_NAMESPACE_STD |
50 | #if defined __USE_LARGEFILE64 || defined __USE_POSIX \ |
51 | || defined __USE_ISOC99 || defined __USE_XOPEN \ |
52 | || defined __USE_POSIX2 |
53 | __USING_NAMESPACE_STD(FILE) |
54 | #endif |
55 | |
56 | # define __FILE_defined 1 |
57 | #endif |
58 | #undef __need_FILE |
59 | |
60 | |
61 | #if !defined ____FILE_defined && defined __need___FILE |
62 | |
63 | |
64 | typedef struct _IO_FILE __FILE; |
65 | |
66 | # define ____FILE_defined 1 |
67 | #endif |
68 | #undef __need___FILE |
69 | |
70 | |
71 | #ifdef _STDIO_H |
72 | #define _STDIO_USES_IOSTREAM |
73 | |
74 | #include <libio.h> |
75 | |
76 | #if defined __USE_XOPEN || defined __USE_XOPEN2K8 |
77 | # ifdef __GNUC__ |
78 | # ifndef _VA_LIST_DEFINED |
79 | typedef _G_va_list va_list; |
80 | # define _VA_LIST_DEFINED |
81 | # endif |
82 | # else |
83 | # include <stdarg.h> |
84 | # endif |
85 | #endif |
86 | |
87 | #ifdef __USE_XOPEN2K8 |
88 | # ifndef __off_t_defined |
89 | # ifndef __USE_FILE_OFFSET64 |
90 | typedef __off_t off_t; |
91 | # else |
92 | typedef __off64_t off_t; |
93 | # endif |
94 | # define __off_t_defined |
95 | # endif |
96 | # if defined __USE_LARGEFILE64 && !defined __off64_t_defined |
97 | typedef __off64_t off64_t; |
98 | # define __off64_t_defined |
99 | # endif |
100 | |
101 | # ifndef __ssize_t_defined |
102 | typedef __ssize_t ssize_t; |
103 | # define __ssize_t_defined |
104 | # endif |
105 | #endif |
106 | |
107 | |
108 | __BEGIN_NAMESPACE_STD |
109 | #ifndef __USE_FILE_OFFSET64 |
110 | typedef _G_fpos_t fpos_t; |
111 | #else |
112 | typedef _G_fpos64_t fpos_t; |
113 | #endif |
114 | __END_NAMESPACE_STD |
115 | #ifdef __USE_LARGEFILE64 |
116 | typedef _G_fpos64_t fpos64_t; |
117 | #endif |
118 | |
119 | |
120 | #define _IOFBF 0 |
121 | #define _IOLBF 1 |
122 | #define _IONBF 2 |
123 | |
124 | |
125 | |
126 | #ifndef BUFSIZ |
127 | # define BUFSIZ _IO_BUFSIZ |
128 | #endif |
129 | |
130 | |
131 | |
132 | |
133 | #ifndef EOF |
134 | # define EOF (-1) |
135 | #endif |
136 | |
137 | |
138 | |
139 | |
140 | #define SEEK_SET 0 |
141 | #define SEEK_CUR 1 |
142 | #define SEEK_END 2 |
143 | #ifdef __USE_GNU |
144 | # define SEEK_DATA 3 |
145 | # define SEEK_HOLE 4 |
146 | #endif |
147 | |
148 | |
149 | #if defined __USE_MISC || defined __USE_XOPEN |
150 | |
151 | # define P_tmpdir "/tmp" |
152 | #endif |
153 | |
154 | |
155 | |
156 | |
157 | |
158 | |
159 | |
160 | |
161 | |
162 | |
163 | |
164 | #include <bits/stdio_lim.h> |
165 | |
166 | |
167 | |
168 | extern struct _IO_FILE *stdin; |
169 | extern struct _IO_FILE *stdout; |
170 | extern struct _IO_FILE *stderr; |
171 | |
172 | #define stdin stdin |
173 | #define stdout stdout |
174 | #define stderr stderr |
175 | |
176 | __BEGIN_NAMESPACE_STD |
177 | |
178 | extern int remove (const char *__filename) __THROW; |
179 | |
180 | extern int rename (const char *__old, const char *__new) __THROW; |
181 | __END_NAMESPACE_STD |
182 | |
183 | #ifdef __USE_ATFILE |
184 | |
185 | extern int renameat (int __oldfd, const char *__old, int __newfd, |
186 | const char *__new) __THROW; |
187 | #endif |
188 | |
189 | __BEGIN_NAMESPACE_STD |
190 | |
191 | |
192 | |
193 | |
194 | #ifndef __USE_FILE_OFFSET64 |
195 | extern FILE *tmpfile (void) __wur; |
196 | #else |
197 | # ifdef __REDIRECT |
198 | extern FILE *__REDIRECT (tmpfile, (void), tmpfile64) __wur; |
199 | # else |
200 | # define tmpfile tmpfile64 |
201 | # endif |
202 | #endif |
203 | |
204 | #ifdef __USE_LARGEFILE64 |
205 | extern FILE *tmpfile64 (void) __wur; |
206 | #endif |
207 | |
208 | |
209 | extern char *tmpnam (char *__s) __THROW __wur; |
210 | __END_NAMESPACE_STD |
211 | |
212 | #ifdef __USE_MISC |
213 | |
214 | |
215 | extern char *tmpnam_r (char *__s) __THROW __wur; |
216 | #endif |
217 | |
218 | |
219 | #if defined __USE_MISC || defined __USE_XOPEN |
220 | |
221 | |
222 | |
223 | |
224 | |
225 | |
226 | |
227 | extern char *tempnam (const char *__dir, const char *__pfx) |
228 | __THROW __attribute_malloc__ __wur; |
229 | #endif |
230 | |
231 | |
232 | __BEGIN_NAMESPACE_STD |
233 | |
234 | |
235 | |
236 | |
237 | extern int fclose (FILE *__stream); |
238 | |
239 | |
240 | |
241 | |
242 | extern int fflush (FILE *__stream); |
243 | __END_NAMESPACE_STD |
244 | |
245 | #ifdef __USE_MISC |
246 | |
247 | |
248 | |
249 | |
250 | |
251 | |
252 | extern int fflush_unlocked (FILE *__stream); |
253 | #endif |
254 | |
255 | #ifdef __USE_GNU |
256 | |
257 | |
258 | |
259 | |
260 | |
261 | |
262 | extern int fcloseall (void); |
263 | #endif |
264 | |
265 | |
266 | __BEGIN_NAMESPACE_STD |
267 | #ifndef __USE_FILE_OFFSET64 |
268 | |
269 | |
270 | |
271 | |
272 | extern FILE *fopen (const char *__restrict __filename, |
273 | const char *__restrict __modes) __wur; |
274 | |
275 | |
276 | |
277 | |
278 | extern FILE *freopen (const char *__restrict __filename, |
279 | const char *__restrict __modes, |
280 | FILE *__restrict __stream) __wur; |
281 | #else |
282 | # ifdef __REDIRECT |
283 | extern FILE *__REDIRECT (fopen, (const char *__restrict __filename, |
284 | const char *__restrict __modes), fopen64) |
285 | __wur; |
286 | extern FILE *__REDIRECT (freopen, (const char *__restrict __filename, |
287 | const char *__restrict __modes, |
288 | FILE *__restrict __stream), freopen64) |
289 | __wur; |
290 | # else |
291 | # define fopen fopen64 |
292 | # define freopen freopen64 |
293 | # endif |
294 | #endif |
295 | __END_NAMESPACE_STD |
296 | #ifdef __USE_LARGEFILE64 |
297 | extern FILE *fopen64 (const char *__restrict __filename, |
298 | const char *__restrict __modes) __wur; |
299 | extern FILE *freopen64 (const char *__restrict __filename, |
300 | const char *__restrict __modes, |
301 | FILE *__restrict __stream) __wur; |
302 | #endif |
303 | |
304 | #ifdef __USE_POSIX |
305 | |
306 | extern FILE *fdopen (int __fd, const char *__modes) __THROW __wur; |
307 | #endif |
308 | |
309 | #ifdef __USE_GNU |
310 | |
311 | |
312 | extern FILE *fopencookie (void *__restrict __magic_cookie, |
313 | const char *__restrict __modes, |
314 | _IO_cookie_io_functions_t __io_funcs) __THROW __wur; |
315 | #endif |
316 | |
317 | #ifdef __USE_XOPEN2K8 |
318 | |
319 | extern FILE *fmemopen (void *__s, size_t __len, const char *__modes) |
320 | __THROW __wur; |
321 | |
322 | |
323 | |
324 | |
325 | extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __THROW __wur; |
326 | #endif |
327 | |
328 | |
329 | __BEGIN_NAMESPACE_STD |
330 | |
331 | |
332 | extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __THROW; |
333 | |
334 | |
335 | |
336 | extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, |
337 | int __modes, size_t __n) __THROW; |
338 | __END_NAMESPACE_STD |
339 | |
340 | #ifdef __USE_MISC |
341 | |
342 | |
343 | extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, |
344 | size_t __size) __THROW; |
345 | |
346 | |
347 | extern void setlinebuf (FILE *__stream) __THROW; |
348 | #endif |
349 | |
350 | |
351 | __BEGIN_NAMESPACE_STD |
352 | |
353 | |
354 | |
355 | |
356 | extern int fprintf (FILE *__restrict __stream, |
357 | const char *__restrict __format, ...); |
358 | |
359 | |
360 | |
361 | |
362 | extern int printf (const char *__restrict __format, ...); |
363 | |
364 | extern int sprintf (char *__restrict __s, |
365 | const char *__restrict __format, ...) __THROWNL; |
366 | |
367 | |
368 | |
369 | |
370 | |
371 | extern int vfprintf (FILE *__restrict __s, const char *__restrict __format, |
372 | _G_va_list __arg); |
373 | |
374 | |
375 | |
376 | |
377 | extern int vprintf (const char *__restrict __format, _G_va_list __arg); |
378 | |
379 | extern int vsprintf (char *__restrict __s, const char *__restrict __format, |
380 | _G_va_list __arg) __THROWNL; |
381 | __END_NAMESPACE_STD |
382 | |
383 | #if defined __USE_ISOC99 || defined __USE_UNIX98 |
384 | __BEGIN_NAMESPACE_C99 |
385 | |
386 | extern int snprintf (char *__restrict __s, size_t __maxlen, |
387 | const char *__restrict __format, ...) |
388 | __THROWNL __attribute__ ((__format__ (__printf__, 3, 4))); |
389 | |
390 | extern int vsnprintf (char *__restrict __s, size_t __maxlen, |
391 | const char *__restrict __format, _G_va_list __arg) |
392 | __THROWNL __attribute__ ((__format__ (__printf__, 3, 0))); |
393 | __END_NAMESPACE_C99 |
394 | #endif |
395 | |
396 | #ifdef __USE_GNU |
397 | |
398 | |
399 | extern int vasprintf (char **__restrict __ptr, const char *__restrict __f, |
400 | _G_va_list __arg) |
401 | __THROWNL __attribute__ ((__format__ (__printf__, 2, 0))) __wur; |
402 | extern int __asprintf (char **__restrict __ptr, |
403 | const char *__restrict __fmt, ...) |
404 | __THROWNL __attribute__ ((__format__ (__printf__, 2, 3))) __wur; |
405 | extern int asprintf (char **__restrict __ptr, |
406 | const char *__restrict __fmt, ...) |
407 | __THROWNL __attribute__ ((__format__ (__printf__, 2, 3))) __wur; |
408 | #endif |
409 | |
410 | #ifdef __USE_XOPEN2K8 |
411 | |
412 | extern int vdprintf (int __fd, const char *__restrict __fmt, |
413 | _G_va_list __arg) |
414 | __attribute__ ((__format__ (__printf__, 2, 0))); |
415 | extern int dprintf (int __fd, const char *__restrict __fmt, ...) |
416 | __attribute__ ((__format__ (__printf__, 2, 3))); |
417 | #endif |
418 | |
419 | |
420 | __BEGIN_NAMESPACE_STD |
421 | |
422 | |
423 | |
424 | |
425 | extern int fscanf (FILE *__restrict __stream, |
426 | const char *__restrict __format, ...) __wur; |
427 | |
428 | |
429 | |
430 | |
431 | extern int scanf (const char *__restrict __format, ...) __wur; |
432 | |
433 | extern int sscanf (const char *__restrict __s, |
434 | const char *__restrict __format, ...) __THROW; |
435 | |
436 | #if defined __USE_ISOC99 && !defined __USE_GNU \ |
437 | && (!defined __LDBL_COMPAT || !defined __REDIRECT) \ |
438 | && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) |
439 | # ifdef __REDIRECT |
440 | |
441 | |
442 | |
443 | extern int __REDIRECT (fscanf, (FILE *__restrict __stream, |
444 | const char *__restrict __format, ...), |
445 | __isoc99_fscanf) __wur; |
446 | extern int __REDIRECT (scanf, (const char *__restrict __format, ...), |
447 | __isoc99_scanf) __wur; |
448 | extern int __REDIRECT_NTH (sscanf, (const char *__restrict __s, |
449 | const char *__restrict __format, ...), |
450 | __isoc99_sscanf); |
451 | # else |
452 | extern int __isoc99_fscanf (FILE *__restrict __stream, |
453 | const char *__restrict __format, ...) __wur; |
454 | extern int __isoc99_scanf (const char *__restrict __format, ...) __wur; |
455 | extern int __isoc99_sscanf (const char *__restrict __s, |
456 | const char *__restrict __format, ...) __THROW; |
457 | # define fscanf __isoc99_fscanf |
458 | # define scanf __isoc99_scanf |
459 | # define sscanf __isoc99_sscanf |
460 | # endif |
461 | #endif |
462 | |
463 | __END_NAMESPACE_STD |
464 | |
465 | #ifdef __USE_ISOC99 |
466 | __BEGIN_NAMESPACE_C99 |
467 | |
468 | |
469 | |
470 | |
471 | extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, |
472 | _G_va_list __arg) |
473 | __attribute__ ((__format__ (__scanf__, 2, 0))) __wur; |
474 | |
475 | |
476 | |
477 | |
478 | |
479 | extern int vscanf (const char *__restrict __format, _G_va_list __arg) |
480 | __attribute__ ((__format__ (__scanf__, 1, 0))) __wur; |
481 | |
482 | |
483 | extern int vsscanf (const char *__restrict __s, |
484 | const char *__restrict __format, _G_va_list __arg) |
485 | __THROW __attribute__ ((__format__ (__scanf__, 2, 0))); |
486 | |
487 | # if !defined __USE_GNU \ |
488 | && (!defined __LDBL_COMPAT || !defined __REDIRECT) \ |
489 | && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) |
490 | # ifdef __REDIRECT |
491 | |
492 | |
493 | |
494 | extern int __REDIRECT (vfscanf, |
495 | (FILE *__restrict __s, |
496 | const char *__restrict __format, _G_va_list __arg), |
497 | __isoc99_vfscanf) |
498 | __attribute__ ((__format__ (__scanf__, 2, 0))) __wur; |
499 | extern int __REDIRECT (vscanf, (const char *__restrict __format, |
500 | _G_va_list __arg), __isoc99_vscanf) |
501 | __attribute__ ((__format__ (__scanf__, 1, 0))) __wur; |
502 | extern int __REDIRECT_NTH (vsscanf, |
503 | (const char *__restrict __s, |
504 | const char *__restrict __format, |
505 | _G_va_list __arg), __isoc99_vsscanf) |
506 | __attribute__ ((__format__ (__scanf__, 2, 0))); |
507 | # else |
508 | extern int __isoc99_vfscanf (FILE *__restrict __s, |
509 | const char *__restrict __format, |
510 | _G_va_list __arg) __wur; |
511 | extern int __isoc99_vscanf (const char *__restrict __format, |
512 | _G_va_list __arg) __wur; |
513 | extern int __isoc99_vsscanf (const char *__restrict __s, |
514 | const char *__restrict __format, |
515 | _G_va_list __arg) __THROW; |
516 | # define vfscanf __isoc99_vfscanf |
517 | # define vscanf __isoc99_vscanf |
518 | # define vsscanf __isoc99_vsscanf |
519 | # endif |
520 | # endif |
521 | |
522 | __END_NAMESPACE_C99 |
523 | #endif |
524 | |
525 | |
526 | __BEGIN_NAMESPACE_STD |
527 | |
528 | |
529 | |
530 | |
531 | extern int fgetc (FILE *__stream); |
532 | extern int getc (FILE *__stream); |
533 | |
534 | |
535 | |
536 | |
537 | |
538 | extern int getchar (void); |
539 | __END_NAMESPACE_STD |
540 | |
541 | |
542 | |
543 | #define getc(_fp) _IO_getc (_fp) |
544 | |
545 | #ifdef __USE_POSIX |
546 | |
547 | |
548 | |
549 | |
550 | extern int getc_unlocked (FILE *__stream); |
551 | extern int getchar_unlocked (void); |
552 | #endif |
553 | |
554 | #ifdef __USE_MISC |
555 | |
556 | |
557 | |
558 | |
559 | |
560 | |
561 | extern int fgetc_unlocked (FILE *__stream); |
562 | #endif |
563 | |
564 | |
565 | __BEGIN_NAMESPACE_STD |
566 | |
567 | |
568 | |
569 | |
570 | |
571 | |
572 | |
573 | extern int fputc (int __c, FILE *__stream); |
574 | extern int putc (int __c, FILE *__stream); |
575 | |
576 | |
577 | |
578 | |
579 | |
580 | extern int putchar (int __c); |
581 | __END_NAMESPACE_STD |
582 | |
583 | |
584 | |
585 | #define putc(_ch, _fp) _IO_putc (_ch, _fp) |
586 | |
587 | #ifdef __USE_MISC |
588 | |
589 | |
590 | |
591 | |
592 | |
593 | |
594 | extern int fputc_unlocked (int __c, FILE *__stream); |
595 | #endif |
596 | |
597 | #ifdef __USE_POSIX |
598 | |
599 | |
600 | |
601 | |
602 | extern int putc_unlocked (int __c, FILE *__stream); |
603 | extern int putchar_unlocked (int __c); |
604 | #endif |
605 | |
606 | |
607 | #if defined __USE_MISC \ |
608 | || (defined __USE_XOPEN && !defined __USE_XOPEN2K) |
609 | |
610 | extern int getw (FILE *__stream); |
611 | |
612 | |
613 | extern int putw (int __w, FILE *__stream); |
614 | #endif |
615 | |
616 | |
617 | __BEGIN_NAMESPACE_STD |
618 | |
619 | |
620 | |
621 | |
622 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) |
623 | __wur; |
624 | |
625 | #if !defined __USE_ISOC11 \ |
626 | || (defined __cplusplus && __cplusplus <= 201103L) |
627 | |
628 | |
629 | |
630 | |
631 | |
632 | |
633 | |
634 | |
635 | |
636 | |
637 | |
638 | extern char *gets (char *__s) __wur __attribute_deprecated__; |
639 | #endif |
640 | __END_NAMESPACE_STD |
641 | |
642 | #ifdef __USE_GNU |
643 | |
644 | |
645 | |
646 | |
647 | |
648 | |
649 | extern char *fgets_unlocked (char *__restrict __s, int __n, |
650 | FILE *__restrict __stream) __wur; |
651 | #endif |
652 | |
653 | |
654 | #ifdef __USE_XOPEN2K8 |
655 | |
656 | |
657 | |
658 | |
659 | |
660 | |
661 | |
662 | |
663 | |
664 | |
665 | extern _IO_ssize_t __getdelim (char **__restrict __lineptr, |
666 | size_t *__restrict __n, int __delimiter, |
667 | FILE *__restrict __stream) __wur; |
668 | extern _IO_ssize_t getdelim (char **__restrict __lineptr, |
669 | size_t *__restrict __n, int __delimiter, |
670 | FILE *__restrict __stream) __wur; |
671 | |
672 | |
673 | |
674 | |
675 | |
676 | |
677 | |
678 | extern _IO_ssize_t getline (char **__restrict __lineptr, |
679 | size_t *__restrict __n, |
680 | FILE *__restrict __stream) __wur; |
681 | #endif |
682 | |
683 | |
684 | __BEGIN_NAMESPACE_STD |
685 | |
686 | |
687 | |
688 | |
689 | extern int fputs (const char *__restrict __s, FILE *__restrict __stream); |
690 | |
691 | |
692 | |
693 | |
694 | |
695 | extern int puts (const char *__s); |
696 | |
697 | |
698 | |
699 | |
700 | |
701 | |
702 | extern int ungetc (int __c, FILE *__stream); |
703 | |
704 | |
705 | |
706 | |
707 | |
708 | |
709 | extern size_t fread (void *__restrict __ptr, size_t __size, |
710 | size_t __n, FILE *__restrict __stream) __wur; |
711 | |
712 | |
713 | |
714 | |
715 | extern size_t fwrite (const void *__restrict __ptr, size_t __size, |
716 | size_t __n, FILE *__restrict __s); |
717 | __END_NAMESPACE_STD |
718 | |
719 | #ifdef __USE_GNU |
720 | |
721 | |
722 | |
723 | |
724 | |
725 | |
726 | extern int fputs_unlocked (const char *__restrict __s, |
727 | FILE *__restrict __stream); |
728 | #endif |
729 | |
730 | #ifdef __USE_MISC |
731 | |
732 | |
733 | |
734 | |
735 | |
736 | |
737 | extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, |
738 | size_t __n, FILE *__restrict __stream) __wur; |
739 | extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size, |
740 | size_t __n, FILE *__restrict __stream); |
741 | #endif |
742 | |
743 | |
744 | __BEGIN_NAMESPACE_STD |
745 | |
746 | |
747 | |
748 | |
749 | extern int fseek (FILE *__stream, long int __off, int __whence); |
750 | |
751 | |
752 | |
753 | |
754 | extern long int ftell (FILE *__stream) __wur; |
755 | |
756 | |
757 | |
758 | |
759 | extern void rewind (FILE *__stream); |
760 | __END_NAMESPACE_STD |
761 | |
762 | |
763 | |
764 | |
765 | |
766 | |
767 | #if defined __USE_LARGEFILE || defined __USE_XOPEN2K |
768 | # ifndef __USE_FILE_OFFSET64 |
769 | |
770 | |
771 | |
772 | |
773 | extern int fseeko (FILE *__stream, __off_t __off, int __whence); |
774 | |
775 | |
776 | |
777 | |
778 | extern __off_t ftello (FILE *__stream) __wur; |
779 | # else |
780 | # ifdef __REDIRECT |
781 | extern int __REDIRECT (fseeko, |
782 | (FILE *__stream, __off64_t __off, int __whence), |
783 | fseeko64); |
784 | extern __off64_t __REDIRECT (ftello, (FILE *__stream), ftello64); |
785 | # else |
786 | # define fseeko fseeko64 |
787 | # define ftello ftello64 |
788 | # endif |
789 | # endif |
790 | #endif |
791 | |
792 | __BEGIN_NAMESPACE_STD |
793 | #ifndef __USE_FILE_OFFSET64 |
794 | |
795 | |
796 | |
797 | |
798 | extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); |
799 | |
800 | |
801 | |
802 | |
803 | extern int fsetpos (FILE *__stream, const fpos_t *__pos); |
804 | #else |
805 | # ifdef __REDIRECT |
806 | extern int __REDIRECT (fgetpos, (FILE *__restrict __stream, |
807 | fpos_t *__restrict __pos), fgetpos64); |
808 | extern int __REDIRECT (fsetpos, |
809 | (FILE *__stream, const fpos_t *__pos), fsetpos64); |
810 | # else |
811 | # define fgetpos fgetpos64 |
812 | # define fsetpos fsetpos64 |
813 | # endif |
814 | #endif |
815 | __END_NAMESPACE_STD |
816 | |
817 | #ifdef __USE_LARGEFILE64 |
818 | extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); |
819 | extern __off64_t ftello64 (FILE *__stream) __wur; |
820 | extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); |
821 | extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos); |
822 | #endif |
823 | |
824 | __BEGIN_NAMESPACE_STD |
825 | |
826 | extern void clearerr (FILE *__stream) __THROW; |
827 | |
828 | extern int feof (FILE *__stream) __THROW __wur; |
829 | |
830 | extern int ferror (FILE *__stream) __THROW __wur; |
831 | __END_NAMESPACE_STD |
832 | |
833 | #ifdef __USE_MISC |
834 | |
835 | extern void clearerr_unlocked (FILE *__stream) __THROW; |
836 | extern int feof_unlocked (FILE *__stream) __THROW __wur; |
837 | extern int ferror_unlocked (FILE *__stream) __THROW __wur; |
838 | #endif |
839 | |
840 | |
841 | __BEGIN_NAMESPACE_STD |
842 | |
843 | |
844 | |
845 | |
846 | extern void perror (const char *__s); |
847 | __END_NAMESPACE_STD |
848 | |
849 | |
850 | |
851 | |
852 | |
853 | #include <bits/sys_errlist.h> |
854 | |
855 | |
856 | #ifdef __USE_POSIX |
857 | |
858 | extern int fileno (FILE *__stream) __THROW __wur; |
859 | #endif |
860 | |
861 | #ifdef __USE_MISC |
862 | |
863 | extern int fileno_unlocked (FILE *__stream) __THROW __wur; |
864 | #endif |
865 | |
866 | |
867 | #ifdef __USE_POSIX2 |
868 | |
869 | |
870 | |
871 | |
872 | extern FILE *popen (const char *__command, const char *__modes) __wur; |
873 | |
874 | |
875 | |
876 | |
877 | |
878 | extern int pclose (FILE *__stream); |
879 | #endif |
880 | |
881 | |
882 | #ifdef __USE_POSIX |
883 | |
884 | extern char *ctermid (char *__s) __THROW; |
885 | #endif |
886 | |
887 | |
888 | #ifdef __USE_XOPEN |
889 | |
890 | extern char *cuserid (char *__s); |
891 | #endif |
892 | |
893 | |
894 | #ifdef __USE_GNU |
895 | struct obstack; |
896 | |
897 | |
898 | extern int obstack_printf (struct obstack *__restrict __obstack, |
899 | const char *__restrict __format, ...) |
900 | __THROWNL __attribute__ ((__format__ (__printf__, 2, 3))); |
901 | extern int obstack_vprintf (struct obstack *__restrict __obstack, |
902 | const char *__restrict __format, |
903 | _G_va_list __args) |
904 | __THROWNL __attribute__ ((__format__ (__printf__, 2, 0))); |
905 | #endif |
906 | |
907 | |
908 | #ifdef __USE_POSIX |
909 | |
910 | |
911 | |
912 | extern void flockfile (FILE *__stream) __THROW; |
913 | |
914 | |
915 | |
916 | extern int ftrylockfile (FILE *__stream) __THROW __wur; |
917 | |
918 | |
919 | extern void funlockfile (FILE *__stream) __THROW; |
920 | #endif |
921 | |
922 | #if defined __USE_XOPEN && !defined __USE_XOPEN2K && !defined __USE_GNU |
923 | |
924 | |
925 | |
926 | # define __need_getopt |
927 | # include <getopt.h> |
928 | #endif |
929 | |
930 | |
931 | |
932 | #ifdef __USE_EXTERN_INLINES |
933 | # include <bits/stdio.h> |
934 | #endif |
935 | #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function |
936 | # include <bits/stdio2.h> |
937 | #endif |
938 | #ifdef __LDBL_COMPAT |
939 | # include <bits/stdio-ldbl.h> |
940 | #endif |
941 | |
942 | __END_DECLS |
943 | |
944 | #endif |
945 | |
946 | #endif |
947 | |