]> git.ipfire.org Git - thirdparty/glibc.git/blob - libio/stdio.h
Update.
[thirdparty/glibc.git] / libio / stdio.h
1 /* Define ISO C stdio on top of C++ iostreams.
2 Copyright (C) 1991, 1994-1999, 2000 Free Software Foundation, Inc.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If not,
16 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. */
18
19 /*
20 * ISO C Standard: 4.9 INPUT/OUTPUT <stdio.h>
21 */
22
23 #ifndef _STDIO_H
24
25 #ifndef __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 # ifndef __USE_XOPEN
36 # define __need___va_list
37 # endif
38 # include <stdarg.h>
39
40 # include <bits/types.h>
41 #endif /* Don't need FILE. */
42 #undef __need_FILE
43
44
45 #ifndef __FILE_defined
46
47 /* The opaque type of streams. */
48 typedef struct _IO_FILE FILE;
49
50 # define __FILE_defined 1
51 #endif /* FILE not defined. */
52
53
54 #ifdef _STDIO_H
55 #define _STDIO_USES_IOSTREAM
56
57 #include <libio.h>
58
59 /* The type of the second argument to `fgetpos' and `fsetpos'. */
60 #ifndef __USE_FILE_OFFSET64
61 typedef _G_fpos_t fpos_t;
62 #else
63 typedef _G_fpos64_t fpos_t;
64 #endif
65 #ifdef __USE_LARGEFILE64
66 typedef _G_fpos64_t fpos64_t;
67 #endif
68
69 /* The possibilities for the third argument to `setvbuf'. */
70 #define _IOFBF 0 /* Fully buffered. */
71 #define _IOLBF 1 /* Line buffered. */
72 #define _IONBF 2 /* No buffering. */
73
74
75 /* Default buffer size. */
76 #ifndef BUFSIZ
77 # define BUFSIZ _IO_BUFSIZ
78 #endif
79
80
81 /* End of file character.
82 Some things throughout the library rely on this being -1. */
83 #ifndef EOF
84 # define EOF (-1)
85 #endif
86
87
88 /* The possibilities for the third argument to `fseek'.
89 These values should not be changed. */
90 #define SEEK_SET 0 /* Seek from beginning of file. */
91 #define SEEK_CUR 1 /* Seek from current position. */
92 #define SEEK_END 2 /* Seek from end of file. */
93
94
95 #if defined __USE_SVID || defined __USE_XOPEN
96 /* Default path prefix for `tempnam' and `tmpnam'. */
97 # define P_tmpdir "/tmp"
98 #endif
99
100
101 /* Get the values:
102 L_tmpnam How long an array of chars must be to be passed to `tmpnam'.
103 TMP_MAX The minimum number of unique filenames generated by tmpnam
104 (and tempnam when it uses tmpnam's name space),
105 or tempnam (the two are separate).
106 L_ctermid How long an array to pass to `ctermid'.
107 L_cuserid How long an array to pass to `cuserid'.
108 FOPEN_MAX Minimum number of files that can be open at once.
109 FILENAME_MAX Maximum length of a filename. */
110 #include <bits/stdio_lim.h>
111
112
113 /* Standard streams. */
114 extern FILE *stdin; /* Standard input stream. */
115 extern FILE *stdout; /* Standard output stream. */
116 extern FILE *stderr; /* Standard error output stream. */
117 /* C89/C99 say they're macros. Make them happy. */
118 #define stdin stdin
119 #define stdout stdout
120 #define stderr stderr
121
122 /* Remove file FILENAME. */
123 extern int remove (__const char *__filename) __THROW;
124 /* Rename file OLD to NEW. */
125 extern int rename (__const char *__old, __const char *__new) __THROW;
126
127
128 /* Create a temporary file and open it read/write. */
129 #ifndef __USE_FILE_OFFSET64
130 extern FILE *tmpfile (void) __THROW;
131 #else
132 # ifdef __REDIRECT
133 extern FILE *__REDIRECT (tmpfile, (void) __THROW, tmpfile64);
134 # else
135 # define tmpfile tmpfile64
136 # endif
137 #endif
138 #ifdef __USE_LARGEFILE64
139 extern FILE *tmpfile64 (void) __THROW;
140 #endif
141 /* Generate a temporary filename. */
142 extern char *tmpnam (char *__s) __THROW;
143
144 #ifdef __USE_MISC
145 /* This is the reentrant variant of `tmpnam'. The only difference is
146 that it does not allow S to be NULL. */
147 extern char *tmpnam_r (char *__s) __THROW;
148 #endif
149
150
151 #if defined __USE_SVID || defined __USE_XOPEN
152 /* Generate a unique temporary filename using up to five characters of PFX
153 if it is not NULL. The directory to put this file in is searched for
154 as follows: First the environment variable "TMPDIR" is checked.
155 If it contains the name of a writable directory, that directory is used.
156 If not and if DIR is not NULL, that value is checked. If that fails,
157 P_tmpdir is tried and finally "/tmp". The storage for the filename
158 is allocated by `malloc'. */
159 extern char *tempnam (__const char *__dir, __const char *__pfx)
160 __THROW __attribute_malloc__;
161 #endif
162
163
164 /* Close STREAM. */
165 extern int fclose (FILE *__stream) __THROW;
166 /* Flush STREAM, or all streams if STREAM is NULL. */
167 extern int fflush (FILE *__stream) __THROW;
168
169 #ifdef __USE_MISC
170 /* Faster versions when locking is not required. */
171 extern int fflush_unlocked (FILE *__stream) __THROW;
172 #endif
173
174 #ifdef __USE_GNU
175 /* Close all streams. */
176 extern int fcloseall (void) __THROW;
177 #endif
178
179
180 #ifndef __USE_FILE_OFFSET64
181 /* Open a file and create a new stream for it. */
182 extern FILE *fopen (__const char *__restrict __filename,
183 __const char *__restrict __modes) __THROW;
184 /* Open a file, replacing an existing stream with it. */
185 extern FILE *freopen (__const char *__restrict __filename,
186 __const char *__restrict __modes,
187 FILE *__restrict __stream) __THROW;
188 #else
189 # ifdef __REDIRECT
190 extern FILE *__REDIRECT (fopen, (__const char *__restrict __filename,
191 __const char *__restrict __modes) __THROW,
192 fopen64);
193 extern FILE *__REDIRECT (freopen, (__const char *__restrict __filename,
194 __const char *__restrict __modes,
195 FILE *__restrict __stream) __THROW,
196 freopen64);
197 # else
198 # define fopen fopen64
199 # define freopen freopen64
200 # endif
201 #endif
202 #ifdef __USE_LARGEFILE64
203 extern FILE *fopen64 (__const char *__restrict __filename,
204 __const char *__restrict __modes) __THROW;
205 extern FILE *freopen64 (__const char *__restrict __filename,
206 __const char *__restrict __modes,
207 FILE *__restrict __stream) __THROW;
208 #endif
209
210 #ifdef __USE_POSIX
211 /* Create a new stream that refers to an existing system file descriptor. */
212 extern FILE *fdopen (int __fd, __const char *__modes) __THROW;
213 #endif
214
215 #ifdef __USE_GNU
216 /* Create a new stream that refers to the given magic cookie,
217 and uses the given functions for input and output. */
218 extern FILE *fopencookie (void *__restrict __magic_cookie,
219 __const char *__restrict __modes,
220 _IO_cookie_io_functions_t __io_funcs) __THROW;
221
222 /* Create a new stream that refers to a memory buffer. */
223 extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) __THROW;
224
225 /* Open a stream that writes into a malloc'd buffer that is expanded as
226 necessary. *BUFLOC and *SIZELOC are updated with the buffer's location
227 and the number of characters written on fflush or fclose. */
228 extern FILE *open_memstream (char **__restrict __bufloc,
229 size_t *__restrict __sizeloc) __THROW;
230 #endif
231
232
233 /* If BUF is NULL, make STREAM unbuffered.
234 Else make it use buffer BUF, of size BUFSIZ. */
235 extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __THROW;
236 /* Make STREAM use buffering mode MODE.
237 If BUF is not NULL, use N bytes of it for buffering;
238 else allocate an internal buffer N bytes long. */
239 extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
240 int __modes, size_t __n) __THROW;
241
242 #ifdef __USE_BSD
243 /* If BUF is NULL, make STREAM unbuffered.
244 Else make it use SIZE bytes of BUF for buffering. */
245 extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
246 size_t __size) __THROW;
247
248 /* Make STREAM line-buffered. */
249 extern void setlinebuf (FILE *__stream) __THROW;
250 #endif
251
252
253 /* Write formatted output to STREAM. */
254 extern int fprintf (FILE *__restrict __stream,
255 __const char *__restrict __format, ...) __THROW;
256 /* Write formatted output to stdout. */
257 extern int printf (__const char *__restrict __format, ...) __THROW;
258 /* Write formatted output to S. */
259 extern int sprintf (char *__restrict __s,
260 __const char *__restrict __format, ...) __THROW;
261
262 /* Write formatted output to S from argument list ARG. */
263 extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
264 _G_va_list __arg) __THROW;
265 /* Write formatted output to stdout from argument list ARG. */
266 extern int vprintf (__const char *__restrict __format, _G_va_list __arg)
267 __THROW;
268 /* Write formatted output to S from argument list ARG. */
269 extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
270 _G_va_list __arg) __THROW;
271
272 #if defined __USE_BSD || defined __USE_ISOC99 || defined __USE_UNIX98
273 /* Maximum chars of output to write in MAXLEN. */
274 extern int snprintf (char *__restrict __s, size_t __maxlen,
275 __const char *__restrict __format, ...)
276 __THROW __attribute__ ((__format__ (__printf__, 3, 4)));
277
278 extern int __vsnprintf (char *__restrict __s, size_t __maxlen,
279 __const char *__restrict __format, _G_va_list __arg)
280 __THROW __attribute__ ((__format__ (__printf__, 3, 0)));
281 extern int vsnprintf (char *__restrict __s, size_t __maxlen,
282 __const char *__restrict __format, _G_va_list __arg)
283 __THROW __attribute__ ((__format__ (__printf__, 3, 0)));
284 #endif
285
286 #ifdef __USE_GNU
287 /* Write formatted output to a string dynamically allocated with `malloc'.
288 Store the address of the string in *PTR. */
289 extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
290 _G_va_list __arg)
291 __THROW __attribute__ ((__format__ (__printf__, 2, 0)));
292 extern int __asprintf (char **__restrict __ptr,
293 __const char *__restrict __fmt, ...)
294 __THROW __attribute__ ((__format__ (__printf__, 2, 3)));
295 extern int asprintf (char **__restrict __ptr,
296 __const char *__restrict __fmt, ...)
297 __THROW __attribute__ ((__format__ (__printf__, 2, 3)));
298
299 /* Write formatted output to a file descriptor. */
300 extern int vdprintf (int __fd, __const char *__restrict __fmt,
301 _G_va_list __arg)
302 __THROW __attribute__ ((__format__ (__printf__, 2, 0)));
303 extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
304 __THROW __attribute__ ((__format__ (__printf__, 2, 3)));
305 #endif
306
307
308 /* Read formatted input from STREAM. */
309 extern int fscanf (FILE *__restrict __stream,
310 __const char *__restrict __format, ...) __THROW;
311 /* Read formatted input from stdin. */
312 extern int scanf (__const char *__restrict __format, ...) __THROW;
313 /* Read formatted input from S. */
314 extern int sscanf (__const char *__restrict __s,
315 __const char *__restrict __format, ...) __THROW;
316
317 #ifdef __USE_ISOC99
318 /* Read formatted input from S into argument list ARG. */
319 extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
320 _G_va_list __arg)
321 __THROW __attribute__ ((__format__ (__scanf__, 2, 0)));
322
323 /* Read formatted input from stdin into argument list ARG. */
324 extern int vscanf (__const char *__restrict __format, _G_va_list __arg)
325 __THROW __attribute__ ((__format__ (__scanf__, 1, 0)));
326
327 /* Read formatted input from S into argument list ARG. */
328 extern int vsscanf (__const char *__restrict __s,
329 __const char *__restrict __format, _G_va_list __arg)
330 __THROW __attribute__ ((__format__ (__scanf__, 2, 0)));
331 #endif /* Use ISO C9x. */
332
333
334 /* Read a character from STREAM. */
335 extern int fgetc (FILE *__stream) __THROW;
336 extern int getc (FILE *__stream) __THROW;
337
338 /* Read a character from stdin. */
339 extern int getchar (void) __THROW;
340
341 /* The C standard explicitly says this is a macro, so we always do the
342 optimization for it. */
343 #define getc(_fp) _IO_getc (_fp)
344
345 #if defined __USE_POSIX || defined __USE_MISC
346 /* These are defined in POSIX.1:1996. */
347 extern int getc_unlocked (FILE *__stream) __THROW;
348 extern int getchar_unlocked (void) __THROW;
349 #endif /* Use POSIX or MISC. */
350
351 #ifdef __USE_MISC
352 /* Faster version when locking is not necessary. */
353 extern int fgetc_unlocked (FILE *__stream) __THROW;
354 #endif /* Use MISC. */
355
356
357 /* Write a character to STREAM. */
358 extern int fputc (int __c, FILE *__stream) __THROW;
359 extern int putc (int __c, FILE *__stream) __THROW;
360
361 /* Write a character to stdout. */
362 extern int putchar (int __c) __THROW;
363
364 /* The C standard explicitly says this can be a macro,
365 so we always do the optimization for it. */
366 #define putc(_ch, _fp) _IO_putc (_ch, _fp)
367
368 #ifdef __USE_MISC
369 /* Faster version when locking is not necessary. */
370 extern int fputc_unlocked (int __c, FILE *__stream) __THROW;
371 #endif /* Use MISC. */
372
373 #if defined __USE_POSIX || defined __USE_MISC
374 /* These are defined in POSIX.1:1996. */
375 extern int putc_unlocked (int __c, FILE *__stream) __THROW;
376 extern int putchar_unlocked (int __c) __THROW;
377 #endif /* Use POSIX or MISC. */
378
379
380 #if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN
381 /* Get a word (int) from STREAM. */
382 extern int getw (FILE *__stream) __THROW;
383
384 /* Write a word (int) to STREAM. */
385 extern int putw (int __w, FILE *__stream) __THROW;
386 #endif
387
388
389 /* Get a newline-terminated string of finite length from STREAM. */
390 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
391 __THROW;
392
393 #ifdef __USE_GNU
394 /* This function does the same as `fgets' but does not lock the stream. */
395 extern char *fgets_unlocked (char *__restrict __s, int __n,
396 FILE *__restrict __stream) __THROW;
397 #endif
398
399 /* Get a newline-terminated string from stdin, removing the newline.
400 DO NOT USE THIS FUNCTION!! There is no limit on how much it will read. */
401 extern char *gets (char *__s) __THROW;
402
403
404 #ifdef __USE_GNU
405 /* Read up to (and including) a DELIMITER from STREAM into *LINEPTR
406 (and null-terminate it). *LINEPTR is a pointer returned from malloc (or
407 NULL), pointing to *N characters of space. It is realloc'd as
408 necessary. Returns the number of characters read (not including the
409 null terminator), or -1 on error or EOF. */
410 extern _IO_ssize_t __getdelim (char **__restrict __lineptr,
411 size_t *__restrict __n, int __delimiter,
412 FILE *__restrict __stream) __THROW;
413 extern _IO_ssize_t getdelim (char **__restrict __lineptr,
414 size_t *__restrict __n, int __delimiter,
415 FILE *__restrict __stream) __THROW;
416
417 /* Like `getdelim', but reads up to a newline. */
418 extern _IO_ssize_t getline (char **__restrict __lineptr,
419 size_t *__restrict __n,
420 FILE *__restrict __stream) __THROW;
421 #endif
422
423
424 /* Write a string to STREAM. */
425 extern int fputs (__const char *__restrict __s, FILE *__restrict __stream)
426 __THROW;
427
428 #ifdef __USE_GNU
429 /* This function does the same as `fputs' but does not lock the stream. */
430 extern int fputs_unlocked (__const char *__restrict __s,
431 FILE *__restrict __stream) __THROW;
432 #endif
433
434 /* Write a string, followed by a newline, to stdout. */
435 extern int puts (__const char *__s) __THROW;
436
437
438 /* Push a character back onto the input buffer of STREAM. */
439 extern int ungetc (int __c, FILE *__stream) __THROW;
440
441
442 /* Read chunks of generic data from STREAM. */
443 extern size_t fread (void *__restrict __ptr, size_t __size,
444 size_t __n, FILE *__restrict __stream) __THROW;
445 /* Write chunks of generic data to STREAM. */
446 extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
447 size_t __n, FILE *__restrict __s) __THROW;
448
449 #ifdef __USE_MISC
450 /* Faster versions when locking is not necessary. */
451 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
452 size_t __n, FILE *__restrict __stream) __THROW;
453 extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
454 size_t __n, FILE *__restrict __stream) __THROW;
455 #endif
456
457
458 /* Seek to a certain position on STREAM. */
459 extern int fseek (FILE *__stream, long int __off, int __whence) __THROW;
460 /* Return the current position of STREAM. */
461 extern long int ftell (FILE *__stream) __THROW;
462 /* Rewind to the beginning of STREAM. */
463 extern void rewind (FILE *__stream) __THROW;
464
465 /* The Single Unix Specification, Version 2, specifies an alternative,
466 more adequate interface for the two functions above which deal with
467 file offset. `long int' is not the right type. These definitions
468 are originally defined in the Large File Support API. */
469
470 /* Types needed in these functions. */
471 #ifndef __off_t_defined
472 # ifndef __USE_FILE_OFFSET64
473 typedef __off_t off_t;
474 # else
475 typedef __off64_t off_t;
476 # endif
477 # define __off_t_defined
478 #endif
479
480 #if defined __USE_LARGEFILE64 && !defined __off64_t_defined
481 typedef __off64_t off64_t;
482 # define __off64_t_defined
483 #endif
484
485
486 #ifndef __USE_FILE_OFFSET64
487 # ifdef __USE_LARGEFILE
488 /* Seek to a certain position on STREAM. */
489 extern int fseeko (FILE *__stream, __off_t __off, int __whence) __THROW;
490 /* Return the current position of STREAM. */
491 extern __off_t ftello (FILE *__stream) __THROW;
492 # endif
493
494 /* Get STREAM's position. */
495 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos)
496 __THROW;
497 /* Set STREAM's position. */
498 extern int fsetpos (FILE *__stream, __const fpos_t *__pos) __THROW;
499 #else
500 # ifdef __REDIRECT
501 # ifdef __USE_LARGEFILE
502 extern int __REDIRECT (fseeko,
503 (FILE *__stream, __off64_t __off, int __whence) __THROW,
504 fseeko64);
505 extern __off64_t __REDIRECT (ftello, (FILE *__stream) __THROW, ftello64);
506 # endif
507 extern int __REDIRECT (fgetpos, (FILE *__restrict __stream,
508 fpos_t *__restrict __pos) __THROW, fgetpos64);
509 extern int __REDIRECT (fsetpos,
510 (FILE *__stream, __const fpos_t *__pos) __THROW,
511 fsetpos64);
512 # else
513 # ifdef __USE_LARGEFILE
514 # define fseeko fseeko64
515 # define ftello ftello64
516 # endif
517 # define fgetpos fgetpos64
518 # define fsetpos fsetpos64
519 # endif
520 #endif
521
522 #ifdef __USE_LARGEFILE64
523 extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence) __THROW;
524 extern __off64_t ftello64 (FILE *__stream) __THROW;
525 extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos)
526 __THROW;
527 extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos) __THROW;
528 #endif
529
530 /* Clear the error and EOF indicators for STREAM. */
531 extern void clearerr (FILE *__stream) __THROW;
532 /* Return the EOF indicator for STREAM. */
533 extern int feof (FILE *__stream) __THROW;
534 /* Return the error indicator for STREAM. */
535 extern int ferror (FILE *__stream) __THROW;
536
537 #ifdef __USE_MISC
538 /* Faster versions when locking is not required. */
539 extern void clearerr_unlocked (FILE *__stream) __THROW;
540 extern int feof_unlocked (FILE *__stream) __THROW;
541 extern int ferror_unlocked (FILE *__stream) __THROW;
542 #endif
543
544
545 /* Print a message describing the meaning of the value of errno. */
546 extern void perror (__const char *__s) __THROW;
547
548 /* These variables normally should not be used directly. The `strerror'
549 function provides all the needed functionality. */
550 #ifdef __USE_BSD
551 extern int sys_nerr;
552 extern __const char *__const sys_errlist[];
553 #endif
554 #ifdef __USE_GNU
555 extern int _sys_nerr;
556 extern __const char *__const _sys_errlist[];
557 #endif
558
559
560 #ifdef __USE_POSIX
561 /* Return the system file descriptor for STREAM. */
562 extern int fileno (FILE *__stream) __THROW;
563 #endif /* Use POSIX. */
564
565 #ifdef __USE_MISC
566 /* Faster version when locking is not required. */
567 extern int fileno_unlocked (FILE *__stream) __THROW;
568 #endif
569
570
571 #if (defined __USE_POSIX2 || defined __USE_SVID || defined __USE_BSD || \
572 defined __USE_MISC)
573 /* Create a new stream connected to a pipe running the given command. */
574 extern FILE *popen (__const char *__command, __const char *__modes) __THROW;
575
576 /* Close a stream opened by popen and return the status of its child. */
577 extern int pclose (FILE *__stream) __THROW;
578 #endif
579
580
581 #ifdef __USE_POSIX
582 /* Return the name of the controlling terminal. */
583 extern char *ctermid (char *__s) __THROW;
584 #endif /* Use POSIX. */
585
586
587 #ifdef __USE_XOPEN
588 /* Return the name of the current user. */
589 extern char *cuserid (char *__s) __THROW;
590 #endif /* Use X/Open, but not issue 6. */
591
592
593 #ifdef __USE_GNU
594 struct obstack; /* See <obstack.h>. */
595
596 /* Write formatted output to an obstack. */
597 extern int obstack_printf (struct obstack *__restrict __obstack,
598 __const char *__restrict __format, ...) __THROW;
599 extern int obstack_vprintf (struct obstack *__restrict __obstack,
600 __const char *__restrict __format,
601 _G_va_list __args) __THROW;
602 #endif /* Use GNU. */
603
604
605 #if defined __USE_POSIX || defined __USE_MISC
606 /* These are defined in POSIX.1:1996. */
607
608 /* Acquire ownership of STREAM. */
609 extern void flockfile (FILE *__stream) __THROW;
610
611 /* Try to acquire ownership of STREAM but do not block if it is not
612 possible. */
613 extern int ftrylockfile (FILE *__stream) __THROW;
614
615 /* Relinquish the ownership granted for STREAM. */
616 extern void funlockfile (FILE *__stream) __THROW;
617 #endif /* POSIX || misc */
618
619 #if defined __USE_XOPEN && !defined __USE_XOPEN2K && !defined __USE_GNU
620 /* The X/Open standard requires some functions and variables to be
621 declared here which do not belong into this header. But we have to
622 follow. In GNU mode we don't do this nonsense. */
623 # define __need_getopt
624 # include <getopt.h>
625 #endif /* X/Open, but not issue 6 and not for GNU. */
626
627 /* If we are compiling with optimizing read this file. It contains
628 several optizing inline functions and macros. */
629 #ifdef __USE_EXTERN_INLINES
630 # include <bits/stdio.h>
631 #endif
632
633 __END_DECLS
634
635 #endif /* <stdio.h> included. */
636
637 #endif /* !_STDIO_H */