1 /* A GNU-like <stdio.h>.
3 Copyright (C) 2004, 2007 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2, or (at your option)
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software Foundation,
17 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
19 #if defined __need_FILE || defined __need___FILE
20 /* Special invocation convention inside glibc header files. */
22 #include @ABSOLUTE_STDIO_H@
25 /* Normal invocation convention. */
29 #include @ABSOLUTE_STDIO_H@
35 /* The definition of GL_LINK_WARNING is copied here. */
43 #if @GNULIB_FPRINTF_POSIX@
44 # if @REPLACE_FPRINTF@
45 # define fprintf rpl_fprintf
46 extern int fprintf (FILE *fp, const char *format, ...);
48 #elif defined GNULIB_POSIXCHECK
51 (GL_LINK_WARNING ("fprintf is not always POSIX compliant - " \
52 "use gnulib module fprintf-posix for portable " \
53 "POSIX compliance"), \
57 #if @GNULIB_VFPRINTF_POSIX@
58 # if @REPLACE_VFPRINTF@
59 # define vfprintf rpl_vfprintf
60 extern int vfprintf (FILE *fp, const char *format, va_list args);
62 #elif defined GNULIB_POSIXCHECK
64 # define vfprintf(s,f,a) \
65 (GL_LINK_WARNING ("vfprintf is not always POSIX compliant - " \
66 "use gnulib module vfprintf-posix for portable " \
67 "POSIX compliance"), \
72 # if @REPLACE_SNPRINTF@
73 # define snprintf rpl_snprintf
75 # if @REPLACE_SNPRINTF@ || !@HAVE_DECL_SNPRINTF@
76 extern int snprintf (char *str, size_t size, const char *format, ...);
78 #elif defined GNULIB_POSIXCHECK
81 (GL_LINK_WARNING ("snprintf is unportable - " \
82 "use gnulib module snprintf for portability"), \
86 #if @GNULIB_VSNPRINTF@
87 # if @REPLACE_VSNPRINTF@
88 # define vsnprintf rpl_vsnprintf
90 # if @REPLACE_VSNPRINTF@ || !@HAVE_DECL_VSNPRINTF@
91 extern int vsnprintf (char *str, size_t size, const char *format, va_list args);
93 #elif defined GNULIB_POSIXCHECK
95 # define vsnprintf(b,s,f,a) \
96 (GL_LINK_WARNING ("vsnprintf is unportable - " \
97 "use gnulib module vsnprintf for portability"), \
98 vsnprintf (b, s, f, a))
101 #if @GNULIB_SPRINTF_POSIX@
102 # if @REPLACE_SPRINTF@
103 # define sprintf rpl_sprintf
104 extern int sprintf (char *str, const char *format, ...);
106 #elif defined GNULIB_POSIXCHECK
109 (GL_LINK_WARNING ("sprintf is not always POSIX compliant - " \
110 "use gnulib module sprintf-posix for portable " \
111 "POSIX compliance"), \
115 #if @GNULIB_VSPRINTF_POSIX@
116 # if @REPLACE_VSPRINTF@
117 # define vsprintf rpl_vsprintf
118 extern int vsprintf (char *str, const char *format, va_list args);
120 #elif defined GNULIB_POSIXCHECK
122 # define vsprintf(b,f,a) \
123 (GL_LINK_WARNING ("vsprintf is not always POSIX compliant - " \
124 "use gnulib module vsprintf-posix for portable " \
125 "POSIX compliance"), \
134 #endif /* _GL_STDIO_H */