Back to index

glibc  2.9
stdio.h
Go to the documentation of this file.
00001 #ifndef _STDIO_H
00002 # if defined __need_FILE || defined __need___FILE
00003 #  include <libio/stdio.h>
00004 # else
00005 #  include <libio/stdio.h>
00006 
00007 /* Now define the internal interfaces.  */
00008 extern int __fcloseall (void);
00009 extern int __snprintf (char *__restrict __s, size_t __maxlen,
00010                      __const char *__restrict __format, ...)
00011      __attribute__ ((__format__ (__printf__, 3, 4)));
00012 extern int __vsnprintf (char *__restrict __s, size_t __maxlen,
00013                      __const char *__restrict __format, _G_va_list __arg)
00014      __attribute__ ((__format__ (__printf__, 3, 0)));
00015 extern int __vfscanf (FILE *__restrict __s,
00016                     __const char *__restrict __format,
00017                     _G_va_list __arg)
00018      __attribute__ ((__format__ (__scanf__, 2, 0)));
00019 libc_hidden_proto (__vfscanf)
00020 extern int __vscanf (__const char *__restrict __format,
00021                    _G_va_list __arg)
00022      __attribute__ ((__format__ (__scanf__, 1, 0)));
00023 extern _IO_ssize_t __getline (char **__lineptr, size_t *__n,
00024                            FILE *__stream);
00025 extern int __vsscanf (__const char *__restrict __s,
00026                     __const char *__restrict __format,
00027                     _G_va_list __arg)
00028      __attribute__ ((__format__ (__scanf__, 2, 0)));
00029 
00030 #ifndef __cplusplus
00031 extern int __sprintf_chk (char *, int, size_t, const char *, ...) __THROW;
00032 extern int __snprintf_chk (char *, size_t, int, size_t, const char *, ...)
00033      __THROW;
00034 extern int __vsprintf_chk (char *, int, size_t, const char *,
00035                         _G_va_list) __THROW;
00036 extern int __vsnprintf_chk (char *, size_t, int, size_t, const char *,
00037                          _G_va_list) __THROW;
00038 extern int __printf_chk (int, const char *, ...);
00039 extern int __fprintf_chk (FILE *, int, const char *, ...);
00040 extern int __vprintf_chk (int, const char *, _G_va_list);
00041 extern int __vfprintf_chk (FILE *, int, const char *, _G_va_list);
00042 extern char *__fgets_unlocked_chk (char *buf, size_t size, int n, FILE *fp);
00043 extern char *__fgets_chk (char *buf, size_t size, int n, FILE *fp);
00044 extern int __asprintf_chk (char **, int, const char *, ...) __THROW;
00045 extern int __vasprintf_chk (char **, int, const char *, _G_va_list) __THROW;
00046 extern int __dprintf_chk (int, int, const char *, ...);
00047 extern int __vdprintf_chk (int, int, const char *, _G_va_list);
00048 extern int __obstack_printf_chk (struct obstack *, int, const char *, ...)
00049      __THROW;
00050 extern int __obstack_vprintf_chk (struct obstack *, int, const char *,
00051                               _G_va_list) __THROW;
00052 #endif
00053 
00054 extern int __isoc99_fscanf (FILE *__restrict __stream,
00055                          __const char *__restrict __format, ...) __wur;
00056 extern int __isoc99_scanf (__const char *__restrict __format, ...) __wur;
00057 extern int __isoc99_sscanf (__const char *__restrict __s,
00058                          __const char *__restrict __format, ...) __THROW;
00059 extern int __isoc99_vfscanf (FILE *__restrict __s,
00060                           __const char *__restrict __format,
00061                           _G_va_list __arg) __wur;
00062 extern int __isoc99_vscanf (__const char *__restrict __format,
00063                          _G_va_list __arg) __wur;
00064 extern int __isoc99_vsscanf (__const char *__restrict __s,
00065                           __const char *__restrict __format,
00066                           _G_va_list __arg) __THROW;
00067 libc_hidden_proto (__isoc99_vsscanf)
00068 libc_hidden_proto (__isoc99_vfscanf)
00069 
00070 /* Prototypes for compatibility functions.  */
00071 extern FILE *__new_tmpfile (void);
00072 extern FILE *__old_tmpfile (void);
00073 
00074 
00075 
00076 #  define __need_size_t
00077 #  include <stddef.h>
00078 /* Generate a unique file name (and possibly open it).  */
00079 extern int __path_search (char *__tmpl, size_t __tmpl_len,
00080                        __const char *__dir, __const char *__pfx,
00081                        int __try_tempdir);
00082 
00083 extern int __gen_tempname (char *__tmpl, int __flags, int __kind);
00084 /* The __kind argument to __gen_tempname may be one of: */
00085 #  define __GT_FILE  0      /* create a file */
00086 #  define __GT_DIR   1      /* create a directory */
00087 #  define __GT_NOCREATE     2      /* just find a name not currently in use */
00088 
00089 /* Print out MESSAGE on the error output and abort.  */
00090 extern void __libc_fatal (__const char *__message)
00091      __attribute__ ((__noreturn__));
00092 extern void __libc_message (int do_abort, __const char *__fnt, ...);
00093 extern void __fortify_fail (const char *msg) __attribute__ ((noreturn));
00094 libc_hidden_proto (__fortify_fail)
00095 
00096 /* Acquire ownership of STREAM.  */
00097 extern void __flockfile (FILE *__stream);
00098 
00099 /* Relinquish the ownership granted for STREAM.  */
00100 extern void __funlockfile (FILE *__stream);
00101 
00102 /* Try to acquire ownership of STREAM but do not block if it is not
00103    possible.  */
00104 extern int __ftrylockfile (FILE *__stream);
00105 
00106 extern int __getc_unlocked (FILE *__fp);
00107 extern wint_t __getwc_unlocked (FILE *__fp);
00108 
00109 extern int __fxprintf (FILE *__fp, const char *__fmt, ...)
00110      __attribute__ ((__format__ (__printf__, 2, 3)));
00111 
00112 extern __const char *__const _sys_errlist_internal[] attribute_hidden;
00113 extern int _sys_nerr_internal attribute_hidden;
00114 
00115 extern int __asprintf_internal (char **__restrict __ptr,
00116                             __const char *__restrict __fmt, ...)
00117      attribute_hidden __attribute__ ((__format__ (__printf__, 2, 3)));
00118 #  if !defined NOT_IN_libc && !defined _ISOMAC
00119 #    define __asprintf(ptr, fmt, args...) \
00120   INTUSE(__asprintf) (ptr, fmt, ##args)
00121 
00122 extern _IO_FILE *_IO_new_fopen (const char*, const char*);
00123 #   define fopen(fname, mode) _IO_new_fopen (fname, mode)
00124 extern _IO_FILE *_IO_new_fdopen (int, const char*);
00125 #   define fdopen(fd, mode) _IO_new_fdopen (fd, mode)
00126 extern int _IO_new_fclose (_IO_FILE*);
00127 #   define fclose(fp) _IO_new_fclose (fp)
00128 extern int _IO_fputs (const char*, _IO_FILE*);
00129 libc_hidden_proto (_IO_fputs)
00130 #   define fputs(str, fp) _IO_fputs (str, fp)
00131 extern int _IO_new_fsetpos (_IO_FILE *, const _IO_fpos_t *);
00132 #   define fsetpos(fp, posp) _IO_new_fsetpos (fp, posp)
00133 extern int _IO_new_fgetpos (_IO_FILE *, _IO_fpos_t *);
00134 #   define fgetpos(fp, posp) _IO_new_fgetpos (fp, posp)
00135 #  endif
00136 
00137 libc_hidden_proto (dprintf)
00138 libc_hidden_proto (fprintf)
00139 libc_hidden_proto (vfprintf)
00140 libc_hidden_proto (sprintf)
00141 libc_hidden_proto (sscanf)
00142 libc_hidden_proto (fwrite)
00143 libc_hidden_proto (perror)
00144 libc_hidden_proto (remove)
00145 libc_hidden_proto (rewind)
00146 libc_hidden_proto (fileno)
00147 libc_hidden_proto (fwrite)
00148 libc_hidden_proto (fseek)
00149 libc_hidden_proto (ftello)
00150 libc_hidden_proto (fflush_unlocked)
00151 libc_hidden_proto (fread_unlocked)
00152 libc_hidden_proto (fwrite_unlocked)
00153 libc_hidden_proto (fgets_unlocked)
00154 libc_hidden_proto (fputs_unlocked)
00155 libc_hidden_proto (open_memstream)
00156 libc_hidden_proto (__libc_fatal)
00157 libc_hidden_proto (__vsprintf_chk)
00158 libc_hidden_proto (__vsnprintf_chk)
00159 libc_hidden_proto (__vfprintf_chk)
00160 libc_hidden_proto (__vasprintf_chk)
00161 libc_hidden_proto (__vdprintf_chk)
00162 libc_hidden_proto (__obstack_vprintf_chk)
00163 # endif
00164 
00165 #endif