X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=inline;f=lib%2Fstdio.in.h;h=695d00f52d38c3d3fb96cc1af03e6e20f6796ee2;hb=4fd7cdb11eef025a6c83c056cad3f29ed5d3161c;hp=6a941a25850fda3ac859a3f65ff69043063f8e41;hpb=3aa0d4da24ba7b52282b1d124b4118e4e8a46a2b;p=gnulib.git diff --git a/lib/stdio.in.h b/lib/stdio.in.h index 6a941a258..695d00f52 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -73,6 +73,10 @@ extern "C" { extern int fprintf (FILE *fp, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); # endif +#elif @GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ +# define fprintf rpl_fprintf +extern int fprintf (FILE *fp, const char *format, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); #elif defined GNULIB_POSIXCHECK # undef fprintf # define fprintf \ @@ -88,6 +92,10 @@ extern int fprintf (FILE *fp, const char *format, ...) extern int vfprintf (FILE *fp, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 2, 0))); # endif +#elif @GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ +# define vfprintf rpl_vfprintf +extern int vfprintf (FILE *fp, const char *format, va_list args) + __attribute__ ((__format__ (__printf__, 2, 0))); #elif defined GNULIB_POSIXCHECK # undef vfprintf # define vfprintf(s,f,a) \ @@ -104,6 +112,11 @@ extern int vfprintf (FILE *fp, const char *format, va_list args) extern int printf (const char *format, ...) __attribute__ ((__format__ (__printf__, 1, 2))); # endif +#elif @GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ +/* Don't break __attribute__((format(printf,M,N))). */ +# define printf __printf__ +extern int printf (const char *format, ...) + __attribute__ ((__format__ (__printf__, 1, 2))); #elif defined GNULIB_POSIXCHECK # undef printf # define printf \ @@ -126,6 +139,10 @@ extern int printf (const char *format, ...) extern int vprintf (const char *format, va_list args) __attribute__ ((__format__ (__printf__, 1, 0))); # endif +#elif @GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ +# define vprintf rpl_vprintf +extern int vprintf (const char *format, va_list args) + __attribute__ ((__format__ (__printf__, 1, 0))); #elif defined GNULIB_POSIXCHECK # undef vprintf # define vprintf(f,a) \ @@ -236,6 +253,7 @@ extern int vsprintf (char *str, const char *format, va_list args) #if @GNULIB_FOPEN@ # if @REPLACE_FOPEN@ +# undef fopen # define fopen rpl_fopen extern FILE * fopen (const char *filename, const char *mode); # endif @@ -249,6 +267,7 @@ extern FILE * fopen (const char *filename, const char *mode); #if @GNULIB_FREOPEN@ # if @REPLACE_FREOPEN@ +# undef freopen # define freopen rpl_freopen extern FILE * freopen (const char *filename, const char *mode, FILE *stream); # endif @@ -354,6 +373,42 @@ extern long rpl_ftell (FILE *fp); fflush (f)) #endif +#if @GNULIB_FPUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ +# undef fputc +# define fputc rpl_fputc +extern int fputc (int c, FILE *stream); +#endif + +#if @GNULIB_PUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ +# undef putc +# define putc rpl_fputc +extern int putc (int c, FILE *stream); +#endif + +#if @GNULIB_PUTCHAR@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ +# undef putchar +# define putchar rpl_putchar +extern int putchar (int c); +#endif + +#if @GNULIB_FPUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ +# undef fputs +# define fputs rpl_fputs +extern int fputs (const char *string, FILE *stream); +#endif + +#if @GNULIB_PUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ +# undef puts +# define puts rpl_puts +extern int puts (const char *string); +#endif + +#if @GNULIB_FWRITE@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ +# undef fwrite +# define fwrite rpl_fwrite +extern size_t fwrite (const void *ptr, size_t s, size_t n, FILE *stream); +#endif + #if @GNULIB_GETDELIM@ # if !@HAVE_DECL_GETDELIM@ /* Read input, up to (and including) the next occurrence of DELIMITER, from