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