X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fstdio.in.h;h=ba63f2cc1e946b1430b8d2621bc18b83e00eeff8;hb=38db1b35bf51a7a738f27d2660a9fdd3b46447be;hp=ef9558012dbb11d19024f8de14e1333424ad0c3a;hpb=9ff044ec4deb16682a04fb608b2576f205da48e3;p=gnulib.git diff --git a/lib/stdio.in.h b/lib/stdio.in.h index ef9558012..ba63f2cc1 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -16,7 +16,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ +#endif #if defined __need_FILE || defined __need___FILE /* Special invocation convention inside glibc header files. */ @@ -214,6 +216,38 @@ extern int vsprintf (char *str, const char *format, va_list args) vsprintf (b, f, a)) #endif +#if @GNULIB_DPRINTF@ +# if @REPLACE_DPRINTF@ +# define dprintf rpl_dprintf +# endif +# if @REPLACE_DPRINTF@ || !@HAVE_DPRINTF@ +extern int dprintf (int fd, const char *format, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); +# endif +#elif defined GNULIB_POSIXCHECK +# undef dprintf +# define dprintf(d,f,a) \ + (GL_LINK_WARNING ("dprintf is unportable - " \ + "use gnulib module dprintf for portability"), \ + dprintf (d, f, a)) +#endif + +#if @GNULIB_VDPRINTF@ +# if @REPLACE_VDPRINTF@ +# define vdprintf rpl_vdprintf +# endif +# if @REPLACE_VDPRINTF@ || !@HAVE_VDPRINTF@ +extern int vdprintf (int fd, const char *format, va_list args) + __attribute__ ((__format__ (__printf__, 2, 0))); +# endif +#elif defined GNULIB_POSIXCHECK +# undef vdprintf +# define vdprintf(d,f,a) \ + (GL_LINK_WARNING ("vdprintf is unportable - " \ + "use gnulib module vdprintf for portability"), \ + vdprintf (d, f, a)) +#endif + #if @GNULIB_VASPRINTF@ # if @REPLACE_VASPRINTF@ # define asprintf rpl_asprintf @@ -253,6 +287,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 @@ -266,6 +301,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 @@ -371,6 +407,21 @@ extern long rpl_ftell (FILE *fp); fflush (f)) #endif +#if @GNULIB_FCLOSE@ +# if @REPLACE_FCLOSE@ +# define fclose rpl_fclose + /* Close STREAM and its underlying file descriptor. */ +extern int fclose (FILE *stream); +# endif +#elif defined GNULIB_POSIXCHECK +# undef fclose +# define fclose(f) \ + (GL_LINK_WARNING ("fclose is not always POSIX compliant - " \ + "use gnulib module fclose for portable " \ + "POSIX compliance"), \ + fclose (f)) +#endif + #if @GNULIB_FPUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # undef fputc # define fputc rpl_fputc