76191081185decca1c163b7b1072862f42c24797
[platform/upstream/glibc.git] / include / stdio.h
1 #ifndef _STDIO_H
2 # if defined __need_FILE || defined __need___FILE
3 #  ifdef USE_IN_LIBIO
4 #   include <libio/stdio.h>
5 #  else
6 #   include <stdio/stdio.h>
7 #  endif
8 # else
9 #  ifdef USE_IN_LIBIO
10 #   include <libio/stdio.h>
11
12 /* Now define the internal interfaces.  */
13 extern int __fcloseall (void);
14 extern int __snprintf (char *__restrict __s, size_t __maxlen,
15                        __const char *__restrict __format, ...)
16      __attribute__ ((__format__ (__printf__, 3, 4)));
17 extern int __vsnprintf (char *__restrict __s, size_t __maxlen,
18                         __const char *__restrict __format, _G_va_list __arg)
19      __attribute__ ((__format__ (__printf__, 3, 0)));
20 extern int __vfscanf (FILE *__restrict __s,
21                       __const char *__restrict __format,
22                       _G_va_list __arg)
23      __attribute__ ((__format__ (__scanf__, 2, 0)));
24 extern int __vscanf (__const char *__restrict __format,
25                      _G_va_list __arg)
26      __attribute__ ((__format__ (__scanf__, 1, 0)));
27 extern _IO_ssize_t __getline (char **__lineptr, size_t *__n,
28                               FILE *__stream);
29 extern int __vsscanf (__const char *__restrict __s,
30                       __const char *__restrict __format,
31                       _G_va_list __arg)
32      __attribute__ ((__format__ (__scanf__, 2, 0)));
33
34 /* Prototypes for compatibility functions.  */
35 extern FILE *__new_tmpfile (void);
36 extern FILE *__old_tmpfile (void);
37
38
39 #  else
40 #   include <stdio/stdio.h>
41 #  endif
42
43 #  define __need_size_t
44 #  include <stddef.h>
45 /* Generate a unique file name (and possibly open it).  */
46 extern int __path_search (char *__tmpl, size_t __tmpl_len,
47                           __const char *__dir, __const char *__pfx,
48                           int __try_tempdir);
49
50 extern int __gen_tempname (char *__tmpl, int __kind);
51 /* The __kind argument to __gen_tempname may be one of: */
52 #  define __GT_FILE     0       /* create a file */
53 #  define __GT_BIGFILE  1       /* create a file, using open64 */
54 #  define __GT_DIR      2       /* create a directory */
55 #  define __GT_NOCREATE 3       /* just find a name not currently in use */
56
57 /* Print out MESSAGE on the error output and abort.  */
58 extern void __libc_fatal (__const char *__message)
59      __attribute__ ((__noreturn__));
60
61 /* Acquire ownership of STREAM.  */
62 extern void __flockfile (FILE *__stream);
63
64 /* Relinquish the ownership granted for STREAM.  */
65 extern void __funlockfile (FILE *__stream);
66
67 /* Try to acquire ownership of STREAM but do not block if it is not
68    possible.  */
69 extern int __ftrylockfile (FILE *__stream);
70
71 extern int __getc_unlocked (FILE *__fp);
72 #  ifdef USE_IN_LIBIO
73 extern wint_t __getwc_unlocked (FILE *__fp);
74 #  endif
75
76
77 # endif
78
79 #endif