New module 'stdio'.
[gnulib.git] / lib / stdio_.h
1 /* A GNU-like <stdio.h>.
2
3    Copyright (C) 2004, 2007 Free Software Foundation, Inc.
4
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)
8    any later version.
9
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.
14
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.  */
18
19 #if defined __need_FILE
20 /* Special invocation convention inside glibc header files.  */
21
22 #include @ABSOLUTE_STDIO_H@
23
24 #else
25 /* Normal invocation convention.  */
26 #ifndef _GL_STDIO_H
27 #define _GL_STDIO_H
28
29 #include @ABSOLUTE_STDIO_H@
30
31 #include <stdarg.h>
32
33
34 /* The definition of GL_LINK_WARNING is copied here.  */
35
36
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41
42 #if @GNULIB_SNPRINTF@
43 # if !@HAVE_DECL_SNPRINTF@
44 extern int snprintf (char *str, size_t size, const char *format, ...);
45 # endif
46 #elif defined GNULIB_POSIXCHECK
47 # undef snprintf
48 # define snprintf \
49     (GL_LINK_WARNING ("snprintf is unportable - " \
50                       "use gnulib module snprintf for portability"), \
51      snprintf)
52 #endif
53
54 #if @GNULIB_VSNPRINTF@
55 # if !@HAVE_DECL_VSNPRINTF@
56 extern int vsnprintf (char *str, size_t size, const char *format, va_list args);
57 # endif
58 #elif defined GNULIB_POSIXCHECK
59 # undef vsnprintf
60 # define vsnprintf(b,s,f,a) \
61     (GL_LINK_WARNING ("vsnprintf is unportable - " \
62                       "use gnulib module vsnprintf for portability"), \
63      vsnprintf (b, s, f, a))
64 #endif
65
66
67 #ifdef __cplusplus
68 }
69 #endif
70
71 #endif /* _GL_STDIO_H */
72 #endif