annotate lib/stdio.in.h @ 273:88bbffa404ea 2.5 2.5

Updated version for release
author lost
date Sun, 16 Aug 2009 17:18:11 +0000
parents d5392bb5da3c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
272
d5392bb5da3c Added generated files
lost
parents:
diff changeset
1 /* A GNU-like <stdio.h>.
d5392bb5da3c Added generated files
lost
parents:
diff changeset
2
d5392bb5da3c Added generated files
lost
parents:
diff changeset
3 Copyright (C) 2004, 2007-2008 Free Software Foundation, Inc.
d5392bb5da3c Added generated files
lost
parents:
diff changeset
4
d5392bb5da3c Added generated files
lost
parents:
diff changeset
5 This program is free software; you can redistribute it and/or modify
d5392bb5da3c Added generated files
lost
parents:
diff changeset
6 it under the terms of the GNU General Public License as published by
d5392bb5da3c Added generated files
lost
parents:
diff changeset
7 the Free Software Foundation; either version 3, or (at your option)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
8 any later version.
d5392bb5da3c Added generated files
lost
parents:
diff changeset
9
d5392bb5da3c Added generated files
lost
parents:
diff changeset
10 This program is distributed in the hope that it will be useful,
d5392bb5da3c Added generated files
lost
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
d5392bb5da3c Added generated files
lost
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d5392bb5da3c Added generated files
lost
parents:
diff changeset
13 GNU General Public License for more details.
d5392bb5da3c Added generated files
lost
parents:
diff changeset
14
d5392bb5da3c Added generated files
lost
parents:
diff changeset
15 You should have received a copy of the GNU General Public License
d5392bb5da3c Added generated files
lost
parents:
diff changeset
16 along with this program; if not, write to the Free Software Foundation,
d5392bb5da3c Added generated files
lost
parents:
diff changeset
17 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
d5392bb5da3c Added generated files
lost
parents:
diff changeset
18
d5392bb5da3c Added generated files
lost
parents:
diff changeset
19 #if __GNUC__ >= 3
d5392bb5da3c Added generated files
lost
parents:
diff changeset
20 @PRAGMA_SYSTEM_HEADER@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
21 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
22
d5392bb5da3c Added generated files
lost
parents:
diff changeset
23 #if defined __need_FILE || defined __need___FILE
d5392bb5da3c Added generated files
lost
parents:
diff changeset
24 /* Special invocation convention inside glibc header files. */
d5392bb5da3c Added generated files
lost
parents:
diff changeset
25
d5392bb5da3c Added generated files
lost
parents:
diff changeset
26 #@INCLUDE_NEXT@ @NEXT_STDIO_H@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
27
d5392bb5da3c Added generated files
lost
parents:
diff changeset
28 #else
d5392bb5da3c Added generated files
lost
parents:
diff changeset
29 /* Normal invocation convention. */
d5392bb5da3c Added generated files
lost
parents:
diff changeset
30
d5392bb5da3c Added generated files
lost
parents:
diff changeset
31 #ifndef _GL_STDIO_H
d5392bb5da3c Added generated files
lost
parents:
diff changeset
32
d5392bb5da3c Added generated files
lost
parents:
diff changeset
33 /* The include_next requires a split double-inclusion guard. */
d5392bb5da3c Added generated files
lost
parents:
diff changeset
34 #@INCLUDE_NEXT@ @NEXT_STDIO_H@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
35
d5392bb5da3c Added generated files
lost
parents:
diff changeset
36 #ifndef _GL_STDIO_H
d5392bb5da3c Added generated files
lost
parents:
diff changeset
37 #define _GL_STDIO_H
d5392bb5da3c Added generated files
lost
parents:
diff changeset
38
d5392bb5da3c Added generated files
lost
parents:
diff changeset
39 #include <stdarg.h>
d5392bb5da3c Added generated files
lost
parents:
diff changeset
40 #include <stddef.h>
d5392bb5da3c Added generated files
lost
parents:
diff changeset
41
d5392bb5da3c Added generated files
lost
parents:
diff changeset
42 #if (@GNULIB_FSEEKO@ && @REPLACE_FSEEKO@) \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
43 || (@GNULIB_FTELLO@ && @REPLACE_FTELLO@) \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
44 || (@GNULIB_GETDELIM@ && !@HAVE_DECL_GETDELIM@) \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
45 || (@GNULIB_GETLINE@ && (!@HAVE_DECL_GETLINE@ || @REPLACE_GETLINE@))
d5392bb5da3c Added generated files
lost
parents:
diff changeset
46 /* Get off_t and ssize_t. */
d5392bb5da3c Added generated files
lost
parents:
diff changeset
47 # include <sys/types.h>
d5392bb5da3c Added generated files
lost
parents:
diff changeset
48 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
49
d5392bb5da3c Added generated files
lost
parents:
diff changeset
50 #ifndef __attribute__
d5392bb5da3c Added generated files
lost
parents:
diff changeset
51 /* This feature is available in gcc versions 2.5 and later. */
d5392bb5da3c Added generated files
lost
parents:
diff changeset
52 # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
53 # define __attribute__(Spec) /* empty */
d5392bb5da3c Added generated files
lost
parents:
diff changeset
54 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
55 /* The __-protected variants of `format' and `printf' attributes
d5392bb5da3c Added generated files
lost
parents:
diff changeset
56 are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
d5392bb5da3c Added generated files
lost
parents:
diff changeset
57 # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
58 # define __format__ format
d5392bb5da3c Added generated files
lost
parents:
diff changeset
59 # define __printf__ printf
d5392bb5da3c Added generated files
lost
parents:
diff changeset
60 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
61 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
62
d5392bb5da3c Added generated files
lost
parents:
diff changeset
63
d5392bb5da3c Added generated files
lost
parents:
diff changeset
64 /* The definition of GL_LINK_WARNING is copied here. */
d5392bb5da3c Added generated files
lost
parents:
diff changeset
65
d5392bb5da3c Added generated files
lost
parents:
diff changeset
66
d5392bb5da3c Added generated files
lost
parents:
diff changeset
67 #ifdef __cplusplus
d5392bb5da3c Added generated files
lost
parents:
diff changeset
68 extern "C" {
d5392bb5da3c Added generated files
lost
parents:
diff changeset
69 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
70
d5392bb5da3c Added generated files
lost
parents:
diff changeset
71
d5392bb5da3c Added generated files
lost
parents:
diff changeset
72 #if @GNULIB_FPRINTF_POSIX@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
73 # if @REPLACE_FPRINTF@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
74 # define fprintf rpl_fprintf
d5392bb5da3c Added generated files
lost
parents:
diff changeset
75 extern int fprintf (FILE *fp, const char *format, ...)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
76 __attribute__ ((__format__ (__printf__, 2, 3)));
d5392bb5da3c Added generated files
lost
parents:
diff changeset
77 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
78 #elif @GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
79 # define fprintf rpl_fprintf
d5392bb5da3c Added generated files
lost
parents:
diff changeset
80 extern int fprintf (FILE *fp, const char *format, ...)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
81 __attribute__ ((__format__ (__printf__, 2, 3)));
d5392bb5da3c Added generated files
lost
parents:
diff changeset
82 #elif defined GNULIB_POSIXCHECK
d5392bb5da3c Added generated files
lost
parents:
diff changeset
83 # undef fprintf
d5392bb5da3c Added generated files
lost
parents:
diff changeset
84 # define fprintf \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
85 (GL_LINK_WARNING ("fprintf is not always POSIX compliant - " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
86 "use gnulib module fprintf-posix for portable " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
87 "POSIX compliance"), \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
88 fprintf)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
89 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
90
d5392bb5da3c Added generated files
lost
parents:
diff changeset
91 #if @GNULIB_VFPRINTF_POSIX@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
92 # if @REPLACE_VFPRINTF@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
93 # define vfprintf rpl_vfprintf
d5392bb5da3c Added generated files
lost
parents:
diff changeset
94 extern int vfprintf (FILE *fp, const char *format, va_list args)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
95 __attribute__ ((__format__ (__printf__, 2, 0)));
d5392bb5da3c Added generated files
lost
parents:
diff changeset
96 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
97 #elif @GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
98 # define vfprintf rpl_vfprintf
d5392bb5da3c Added generated files
lost
parents:
diff changeset
99 extern int vfprintf (FILE *fp, const char *format, va_list args)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
100 __attribute__ ((__format__ (__printf__, 2, 0)));
d5392bb5da3c Added generated files
lost
parents:
diff changeset
101 #elif defined GNULIB_POSIXCHECK
d5392bb5da3c Added generated files
lost
parents:
diff changeset
102 # undef vfprintf
d5392bb5da3c Added generated files
lost
parents:
diff changeset
103 # define vfprintf(s,f,a) \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
104 (GL_LINK_WARNING ("vfprintf is not always POSIX compliant - " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
105 "use gnulib module vfprintf-posix for portable " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
106 "POSIX compliance"), \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
107 vfprintf (s, f, a))
d5392bb5da3c Added generated files
lost
parents:
diff changeset
108 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
109
d5392bb5da3c Added generated files
lost
parents:
diff changeset
110 #if @GNULIB_PRINTF_POSIX@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
111 # if @REPLACE_PRINTF@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
112 /* Don't break __attribute__((format(printf,M,N))). */
d5392bb5da3c Added generated files
lost
parents:
diff changeset
113 # define printf __printf__
d5392bb5da3c Added generated files
lost
parents:
diff changeset
114 extern int printf (const char *format, ...)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
115 __attribute__ ((__format__ (__printf__, 1, 2)));
d5392bb5da3c Added generated files
lost
parents:
diff changeset
116 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
117 #elif @GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
118 /* Don't break __attribute__((format(printf,M,N))). */
d5392bb5da3c Added generated files
lost
parents:
diff changeset
119 # define printf __printf__
d5392bb5da3c Added generated files
lost
parents:
diff changeset
120 extern int printf (const char *format, ...)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
121 __attribute__ ((__format__ (__printf__, 1, 2)));
d5392bb5da3c Added generated files
lost
parents:
diff changeset
122 #elif defined GNULIB_POSIXCHECK
d5392bb5da3c Added generated files
lost
parents:
diff changeset
123 # undef printf
d5392bb5da3c Added generated files
lost
parents:
diff changeset
124 # define printf \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
125 (GL_LINK_WARNING ("printf is not always POSIX compliant - " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
126 "use gnulib module printf-posix for portable " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
127 "POSIX compliance"), \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
128 printf)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
129 /* Don't break __attribute__((format(printf,M,N))). */
d5392bb5da3c Added generated files
lost
parents:
diff changeset
130 # define format(kind,m,n) format (__##kind##__, m, n)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
131 # define __format__(kind,m,n) __format__ (__##kind##__, m, n)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
132 # define ____printf____ __printf__
d5392bb5da3c Added generated files
lost
parents:
diff changeset
133 # define ____scanf____ __scanf__
d5392bb5da3c Added generated files
lost
parents:
diff changeset
134 # define ____strftime____ __strftime__
d5392bb5da3c Added generated files
lost
parents:
diff changeset
135 # define ____strfmon____ __strfmon__
d5392bb5da3c Added generated files
lost
parents:
diff changeset
136 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
137
d5392bb5da3c Added generated files
lost
parents:
diff changeset
138 #if @GNULIB_VPRINTF_POSIX@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
139 # if @REPLACE_VPRINTF@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
140 # define vprintf rpl_vprintf
d5392bb5da3c Added generated files
lost
parents:
diff changeset
141 extern int vprintf (const char *format, va_list args)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
142 __attribute__ ((__format__ (__printf__, 1, 0)));
d5392bb5da3c Added generated files
lost
parents:
diff changeset
143 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
144 #elif @GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
145 # define vprintf rpl_vprintf
d5392bb5da3c Added generated files
lost
parents:
diff changeset
146 extern int vprintf (const char *format, va_list args)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
147 __attribute__ ((__format__ (__printf__, 1, 0)));
d5392bb5da3c Added generated files
lost
parents:
diff changeset
148 #elif defined GNULIB_POSIXCHECK
d5392bb5da3c Added generated files
lost
parents:
diff changeset
149 # undef vprintf
d5392bb5da3c Added generated files
lost
parents:
diff changeset
150 # define vprintf(f,a) \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
151 (GL_LINK_WARNING ("vprintf is not always POSIX compliant - " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
152 "use gnulib module vprintf-posix for portable " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
153 "POSIX compliance"), \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
154 vprintf (f, a))
d5392bb5da3c Added generated files
lost
parents:
diff changeset
155 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
156
d5392bb5da3c Added generated files
lost
parents:
diff changeset
157 #if @GNULIB_SNPRINTF@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
158 # if @REPLACE_SNPRINTF@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
159 # define snprintf rpl_snprintf
d5392bb5da3c Added generated files
lost
parents:
diff changeset
160 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
161 # if @REPLACE_SNPRINTF@ || !@HAVE_DECL_SNPRINTF@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
162 extern int snprintf (char *str, size_t size, const char *format, ...)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
163 __attribute__ ((__format__ (__printf__, 3, 4)));
d5392bb5da3c Added generated files
lost
parents:
diff changeset
164 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
165 #elif defined GNULIB_POSIXCHECK
d5392bb5da3c Added generated files
lost
parents:
diff changeset
166 # undef snprintf
d5392bb5da3c Added generated files
lost
parents:
diff changeset
167 # define snprintf \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
168 (GL_LINK_WARNING ("snprintf is unportable - " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
169 "use gnulib module snprintf for portability"), \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
170 snprintf)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
171 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
172
d5392bb5da3c Added generated files
lost
parents:
diff changeset
173 #if @GNULIB_VSNPRINTF@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
174 # if @REPLACE_VSNPRINTF@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
175 # define vsnprintf rpl_vsnprintf
d5392bb5da3c Added generated files
lost
parents:
diff changeset
176 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
177 # if @REPLACE_VSNPRINTF@ || !@HAVE_DECL_VSNPRINTF@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
178 extern int vsnprintf (char *str, size_t size, const char *format, va_list args)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
179 __attribute__ ((__format__ (__printf__, 3, 0)));
d5392bb5da3c Added generated files
lost
parents:
diff changeset
180 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
181 #elif defined GNULIB_POSIXCHECK
d5392bb5da3c Added generated files
lost
parents:
diff changeset
182 # undef vsnprintf
d5392bb5da3c Added generated files
lost
parents:
diff changeset
183 # define vsnprintf(b,s,f,a) \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
184 (GL_LINK_WARNING ("vsnprintf is unportable - " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
185 "use gnulib module vsnprintf for portability"), \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
186 vsnprintf (b, s, f, a))
d5392bb5da3c Added generated files
lost
parents:
diff changeset
187 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
188
d5392bb5da3c Added generated files
lost
parents:
diff changeset
189 #if @GNULIB_SPRINTF_POSIX@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
190 # if @REPLACE_SPRINTF@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
191 # define sprintf rpl_sprintf
d5392bb5da3c Added generated files
lost
parents:
diff changeset
192 extern int sprintf (char *str, const char *format, ...)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
193 __attribute__ ((__format__ (__printf__, 2, 3)));
d5392bb5da3c Added generated files
lost
parents:
diff changeset
194 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
195 #elif defined GNULIB_POSIXCHECK
d5392bb5da3c Added generated files
lost
parents:
diff changeset
196 # undef sprintf
d5392bb5da3c Added generated files
lost
parents:
diff changeset
197 # define sprintf \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
198 (GL_LINK_WARNING ("sprintf is not always POSIX compliant - " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
199 "use gnulib module sprintf-posix for portable " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
200 "POSIX compliance"), \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
201 sprintf)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
202 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
203
d5392bb5da3c Added generated files
lost
parents:
diff changeset
204 #if @GNULIB_VSPRINTF_POSIX@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
205 # if @REPLACE_VSPRINTF@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
206 # define vsprintf rpl_vsprintf
d5392bb5da3c Added generated files
lost
parents:
diff changeset
207 extern int vsprintf (char *str, const char *format, va_list args)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
208 __attribute__ ((__format__ (__printf__, 2, 0)));
d5392bb5da3c Added generated files
lost
parents:
diff changeset
209 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
210 #elif defined GNULIB_POSIXCHECK
d5392bb5da3c Added generated files
lost
parents:
diff changeset
211 # undef vsprintf
d5392bb5da3c Added generated files
lost
parents:
diff changeset
212 # define vsprintf(b,f,a) \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
213 (GL_LINK_WARNING ("vsprintf is not always POSIX compliant - " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
214 "use gnulib module vsprintf-posix for portable " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
215 "POSIX compliance"), \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
216 vsprintf (b, f, a))
d5392bb5da3c Added generated files
lost
parents:
diff changeset
217 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
218
d5392bb5da3c Added generated files
lost
parents:
diff changeset
219 #if @GNULIB_VASPRINTF@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
220 # if @REPLACE_VASPRINTF@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
221 # define asprintf rpl_asprintf
d5392bb5da3c Added generated files
lost
parents:
diff changeset
222 # define vasprintf rpl_vasprintf
d5392bb5da3c Added generated files
lost
parents:
diff changeset
223 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
224 # if @REPLACE_VASPRINTF@ || !@HAVE_VASPRINTF@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
225 /* Write formatted output to a string dynamically allocated with malloc().
d5392bb5da3c Added generated files
lost
parents:
diff changeset
226 If the memory allocation succeeds, store the address of the string in
d5392bb5da3c Added generated files
lost
parents:
diff changeset
227 *RESULT and return the number of resulting bytes, excluding the trailing
d5392bb5da3c Added generated files
lost
parents:
diff changeset
228 NUL. Upon memory allocation error, or some other error, return -1. */
d5392bb5da3c Added generated files
lost
parents:
diff changeset
229 extern int asprintf (char **result, const char *format, ...)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
230 __attribute__ ((__format__ (__printf__, 2, 3)));
d5392bb5da3c Added generated files
lost
parents:
diff changeset
231 extern int vasprintf (char **result, const char *format, va_list args)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
232 __attribute__ ((__format__ (__printf__, 2, 0)));
d5392bb5da3c Added generated files
lost
parents:
diff changeset
233 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
234 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
235
d5392bb5da3c Added generated files
lost
parents:
diff changeset
236 #if @GNULIB_OBSTACK_PRINTF@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
237 # if @REPLACE_OBSTACK_PRINTF@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
238 # define obstack_printf rpl_osbtack_printf
d5392bb5da3c Added generated files
lost
parents:
diff changeset
239 # define obstack_vprintf rpl_obstack_vprintf
d5392bb5da3c Added generated files
lost
parents:
diff changeset
240 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
241 # if @REPLACE_OBSTACK_PRINTF@ || !@HAVE_DECL_OBSTACK_PRINTF@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
242 struct obstack;
d5392bb5da3c Added generated files
lost
parents:
diff changeset
243 /* Grow an obstack with formatted output. Return the number of
d5392bb5da3c Added generated files
lost
parents:
diff changeset
244 bytes added to OBS. No trailing nul byte is added, and the
d5392bb5da3c Added generated files
lost
parents:
diff changeset
245 object should be closed with obstack_finish before use. Upon
d5392bb5da3c Added generated files
lost
parents:
diff changeset
246 memory allocation error, call obstack_alloc_failed_handler. Upon
d5392bb5da3c Added generated files
lost
parents:
diff changeset
247 other error, return -1. */
d5392bb5da3c Added generated files
lost
parents:
diff changeset
248 extern int obstack_printf (struct obstack *obs, const char *format, ...)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
249 __attribute__ ((__format__ (__printf__, 2, 3)));
d5392bb5da3c Added generated files
lost
parents:
diff changeset
250 extern int obstack_vprintf (struct obstack *obs, const char *format,
d5392bb5da3c Added generated files
lost
parents:
diff changeset
251 va_list args)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
252 __attribute__ ((__format__ (__printf__, 2, 0)));
d5392bb5da3c Added generated files
lost
parents:
diff changeset
253 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
254 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
255
d5392bb5da3c Added generated files
lost
parents:
diff changeset
256 #if @GNULIB_FOPEN@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
257 # if @REPLACE_FOPEN@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
258 # undef fopen
d5392bb5da3c Added generated files
lost
parents:
diff changeset
259 # define fopen rpl_fopen
d5392bb5da3c Added generated files
lost
parents:
diff changeset
260 extern FILE * fopen (const char *filename, const char *mode);
d5392bb5da3c Added generated files
lost
parents:
diff changeset
261 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
262 #elif defined GNULIB_POSIXCHECK
d5392bb5da3c Added generated files
lost
parents:
diff changeset
263 # undef fopen
d5392bb5da3c Added generated files
lost
parents:
diff changeset
264 # define fopen(f,m) \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
265 (GL_LINK_WARNING ("fopen on Win32 platforms is not POSIX compatible - " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
266 "use gnulib module fopen for portability"), \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
267 fopen (f, m))
d5392bb5da3c Added generated files
lost
parents:
diff changeset
268 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
269
d5392bb5da3c Added generated files
lost
parents:
diff changeset
270 #if @GNULIB_FREOPEN@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
271 # if @REPLACE_FREOPEN@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
272 # undef freopen
d5392bb5da3c Added generated files
lost
parents:
diff changeset
273 # define freopen rpl_freopen
d5392bb5da3c Added generated files
lost
parents:
diff changeset
274 extern FILE * freopen (const char *filename, const char *mode, FILE *stream);
d5392bb5da3c Added generated files
lost
parents:
diff changeset
275 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
276 #elif defined GNULIB_POSIXCHECK
d5392bb5da3c Added generated files
lost
parents:
diff changeset
277 # undef freopen
d5392bb5da3c Added generated files
lost
parents:
diff changeset
278 # define freopen(f,m,s) \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
279 (GL_LINK_WARNING ("freopen on Win32 platforms is not POSIX compatible - " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
280 "use gnulib module freopen for portability"), \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
281 freopen (f, m, s))
d5392bb5da3c Added generated files
lost
parents:
diff changeset
282 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
283
d5392bb5da3c Added generated files
lost
parents:
diff changeset
284 #if @GNULIB_FSEEKO@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
285 # if @REPLACE_FSEEKO@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
286 /* Provide fseek, fseeko functions that are aware of a preceding
d5392bb5da3c Added generated files
lost
parents:
diff changeset
287 fflush(), and which detect pipes. */
d5392bb5da3c Added generated files
lost
parents:
diff changeset
288 # define fseeko rpl_fseeko
d5392bb5da3c Added generated files
lost
parents:
diff changeset
289 extern int fseeko (FILE *fp, off_t offset, int whence);
d5392bb5da3c Added generated files
lost
parents:
diff changeset
290 # define fseek(fp, offset, whence) fseeko (fp, (off_t)(offset), whence)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
291 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
292 #elif defined GNULIB_POSIXCHECK
d5392bb5da3c Added generated files
lost
parents:
diff changeset
293 # undef fseeko
d5392bb5da3c Added generated files
lost
parents:
diff changeset
294 # define fseeko(f,o,w) \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
295 (GL_LINK_WARNING ("fseeko is unportable - " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
296 "use gnulib module fseeko for portability"), \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
297 fseeko (f, o, w))
d5392bb5da3c Added generated files
lost
parents:
diff changeset
298 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
299
d5392bb5da3c Added generated files
lost
parents:
diff changeset
300 #if @GNULIB_FSEEK@ && @REPLACE_FSEEK@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
301 extern int rpl_fseek (FILE *fp, long offset, int whence);
d5392bb5da3c Added generated files
lost
parents:
diff changeset
302 # undef fseek
d5392bb5da3c Added generated files
lost
parents:
diff changeset
303 # if defined GNULIB_POSIXCHECK
d5392bb5da3c Added generated files
lost
parents:
diff changeset
304 # define fseek(f,o,w) \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
305 (GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
306 "on 32-bit platforms - " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
307 "use fseeko function for handling of large files"), \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
308 rpl_fseek (f, o, w))
d5392bb5da3c Added generated files
lost
parents:
diff changeset
309 # else
d5392bb5da3c Added generated files
lost
parents:
diff changeset
310 # define fseek rpl_fseek
d5392bb5da3c Added generated files
lost
parents:
diff changeset
311 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
312 #elif defined GNULIB_POSIXCHECK
d5392bb5da3c Added generated files
lost
parents:
diff changeset
313 # ifndef fseek
d5392bb5da3c Added generated files
lost
parents:
diff changeset
314 # define fseek(f,o,w) \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
315 (GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
316 "on 32-bit platforms - " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
317 "use fseeko function for handling of large files"), \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
318 fseek (f, o, w))
d5392bb5da3c Added generated files
lost
parents:
diff changeset
319 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
320 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
321
d5392bb5da3c Added generated files
lost
parents:
diff changeset
322 #if @GNULIB_FTELLO@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
323 # if @REPLACE_FTELLO@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
324 # define ftello rpl_ftello
d5392bb5da3c Added generated files
lost
parents:
diff changeset
325 extern off_t ftello (FILE *fp);
d5392bb5da3c Added generated files
lost
parents:
diff changeset
326 # define ftell(fp) ftello (fp)
d5392bb5da3c Added generated files
lost
parents:
diff changeset
327 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
328 #elif defined GNULIB_POSIXCHECK
d5392bb5da3c Added generated files
lost
parents:
diff changeset
329 # undef ftello
d5392bb5da3c Added generated files
lost
parents:
diff changeset
330 # define ftello(f) \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
331 (GL_LINK_WARNING ("ftello is unportable - " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
332 "use gnulib module ftello for portability"), \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
333 ftello (f))
d5392bb5da3c Added generated files
lost
parents:
diff changeset
334 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
335
d5392bb5da3c Added generated files
lost
parents:
diff changeset
336 #if @GNULIB_FTELL@ && @REPLACE_FTELL@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
337 extern long rpl_ftell (FILE *fp);
d5392bb5da3c Added generated files
lost
parents:
diff changeset
338 # undef ftell
d5392bb5da3c Added generated files
lost
parents:
diff changeset
339 # if GNULIB_POSIXCHECK
d5392bb5da3c Added generated files
lost
parents:
diff changeset
340 # define ftell(f) \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
341 (GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
342 "on 32-bit platforms - " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
343 "use ftello function for handling of large files"), \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
344 rpl_ftell (f))
d5392bb5da3c Added generated files
lost
parents:
diff changeset
345 # else
d5392bb5da3c Added generated files
lost
parents:
diff changeset
346 # define ftell rpl_ftell
d5392bb5da3c Added generated files
lost
parents:
diff changeset
347 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
348 #elif defined GNULIB_POSIXCHECK
d5392bb5da3c Added generated files
lost
parents:
diff changeset
349 # ifndef ftell
d5392bb5da3c Added generated files
lost
parents:
diff changeset
350 # define ftell(f) \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
351 (GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
352 "on 32-bit platforms - " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
353 "use ftello function for handling of large files"), \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
354 ftell (f))
d5392bb5da3c Added generated files
lost
parents:
diff changeset
355 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
356 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
357
d5392bb5da3c Added generated files
lost
parents:
diff changeset
358 #if @GNULIB_FFLUSH@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
359 # if @REPLACE_FFLUSH@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
360 # define fflush rpl_fflush
d5392bb5da3c Added generated files
lost
parents:
diff changeset
361 /* Flush all pending data on STREAM according to POSIX rules. Both
d5392bb5da3c Added generated files
lost
parents:
diff changeset
362 output and seekable input streams are supported.
d5392bb5da3c Added generated files
lost
parents:
diff changeset
363 Note! LOSS OF DATA can occur if fflush is applied on an input stream
d5392bb5da3c Added generated files
lost
parents:
diff changeset
364 that is _not_seekable_ or on an update stream that is _not_seekable_
d5392bb5da3c Added generated files
lost
parents:
diff changeset
365 and in which the most recent operation was input. Seekability can
d5392bb5da3c Added generated files
lost
parents:
diff changeset
366 be tested with lseek(fileno(fp),0,SEEK_CUR). */
d5392bb5da3c Added generated files
lost
parents:
diff changeset
367 extern int fflush (FILE *gl_stream);
d5392bb5da3c Added generated files
lost
parents:
diff changeset
368 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
369 #elif defined GNULIB_POSIXCHECK
d5392bb5da3c Added generated files
lost
parents:
diff changeset
370 # undef fflush
d5392bb5da3c Added generated files
lost
parents:
diff changeset
371 # define fflush(f) \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
372 (GL_LINK_WARNING ("fflush is not always POSIX compliant - " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
373 "use gnulib module fflush for portable " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
374 "POSIX compliance"), \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
375 fflush (f))
d5392bb5da3c Added generated files
lost
parents:
diff changeset
376 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
377
d5392bb5da3c Added generated files
lost
parents:
diff changeset
378 #if @GNULIB_FCLOSE@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
379 # if @REPLACE_FCLOSE@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
380 # define fclose rpl_fclose
d5392bb5da3c Added generated files
lost
parents:
diff changeset
381 /* Close STREAM and its underlying file descriptor. */
d5392bb5da3c Added generated files
lost
parents:
diff changeset
382 extern int fclose (FILE *stream);
d5392bb5da3c Added generated files
lost
parents:
diff changeset
383 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
384 #elif defined GNULIB_POSIXCHECK
d5392bb5da3c Added generated files
lost
parents:
diff changeset
385 # undef fclose
d5392bb5da3c Added generated files
lost
parents:
diff changeset
386 # define fclose(f) \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
387 (GL_LINK_WARNING ("fclose is not always POSIX compliant - " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
388 "use gnulib module fclose for portable " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
389 "POSIX compliance"), \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
390 fclose (f))
d5392bb5da3c Added generated files
lost
parents:
diff changeset
391 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
392
d5392bb5da3c Added generated files
lost
parents:
diff changeset
393 #if @GNULIB_FPUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
394 # undef fputc
d5392bb5da3c Added generated files
lost
parents:
diff changeset
395 # define fputc rpl_fputc
d5392bb5da3c Added generated files
lost
parents:
diff changeset
396 extern int fputc (int c, FILE *stream);
d5392bb5da3c Added generated files
lost
parents:
diff changeset
397 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
398
d5392bb5da3c Added generated files
lost
parents:
diff changeset
399 #if @GNULIB_PUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
400 # undef putc
d5392bb5da3c Added generated files
lost
parents:
diff changeset
401 # define putc rpl_fputc
d5392bb5da3c Added generated files
lost
parents:
diff changeset
402 extern int putc (int c, FILE *stream);
d5392bb5da3c Added generated files
lost
parents:
diff changeset
403 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
404
d5392bb5da3c Added generated files
lost
parents:
diff changeset
405 #if @GNULIB_PUTCHAR@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
406 # undef putchar
d5392bb5da3c Added generated files
lost
parents:
diff changeset
407 # define putchar rpl_putchar
d5392bb5da3c Added generated files
lost
parents:
diff changeset
408 extern int putchar (int c);
d5392bb5da3c Added generated files
lost
parents:
diff changeset
409 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
410
d5392bb5da3c Added generated files
lost
parents:
diff changeset
411 #if @GNULIB_FPUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
412 # undef fputs
d5392bb5da3c Added generated files
lost
parents:
diff changeset
413 # define fputs rpl_fputs
d5392bb5da3c Added generated files
lost
parents:
diff changeset
414 extern int fputs (const char *string, FILE *stream);
d5392bb5da3c Added generated files
lost
parents:
diff changeset
415 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
416
d5392bb5da3c Added generated files
lost
parents:
diff changeset
417 #if @GNULIB_PUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
418 # undef puts
d5392bb5da3c Added generated files
lost
parents:
diff changeset
419 # define puts rpl_puts
d5392bb5da3c Added generated files
lost
parents:
diff changeset
420 extern int puts (const char *string);
d5392bb5da3c Added generated files
lost
parents:
diff changeset
421 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
422
d5392bb5da3c Added generated files
lost
parents:
diff changeset
423 #if @GNULIB_FWRITE@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
424 # undef fwrite
d5392bb5da3c Added generated files
lost
parents:
diff changeset
425 # define fwrite rpl_fwrite
d5392bb5da3c Added generated files
lost
parents:
diff changeset
426 extern size_t fwrite (const void *ptr, size_t s, size_t n, FILE *stream);
d5392bb5da3c Added generated files
lost
parents:
diff changeset
427 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
428
d5392bb5da3c Added generated files
lost
parents:
diff changeset
429 #if @GNULIB_GETDELIM@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
430 # if !@HAVE_DECL_GETDELIM@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
431 /* Read input, up to (and including) the next occurrence of DELIMITER, from
d5392bb5da3c Added generated files
lost
parents:
diff changeset
432 STREAM, store it in *LINEPTR (and NUL-terminate it).
d5392bb5da3c Added generated files
lost
parents:
diff changeset
433 *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE
d5392bb5da3c Added generated files
lost
parents:
diff changeset
434 bytes of space. It is realloc'd as necessary.
d5392bb5da3c Added generated files
lost
parents:
diff changeset
435 Return the number of bytes read and stored at *LINEPTR (not including the
d5392bb5da3c Added generated files
lost
parents:
diff changeset
436 NUL terminator), or -1 on error or EOF. */
d5392bb5da3c Added generated files
lost
parents:
diff changeset
437 extern ssize_t getdelim (char **lineptr, size_t *linesize, int delimiter,
d5392bb5da3c Added generated files
lost
parents:
diff changeset
438 FILE *stream);
d5392bb5da3c Added generated files
lost
parents:
diff changeset
439 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
440 #elif defined GNULIB_POSIXCHECK
d5392bb5da3c Added generated files
lost
parents:
diff changeset
441 # undef getdelim
d5392bb5da3c Added generated files
lost
parents:
diff changeset
442 # define getdelim(l, s, d, f) \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
443 (GL_LINK_WARNING ("getdelim is unportable - " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
444 "use gnulib module getdelim for portability"), \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
445 getdelim (l, s, d, f))
d5392bb5da3c Added generated files
lost
parents:
diff changeset
446 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
447
d5392bb5da3c Added generated files
lost
parents:
diff changeset
448 #if @GNULIB_GETLINE@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
449 # if @REPLACE_GETLINE@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
450 # undef getline
d5392bb5da3c Added generated files
lost
parents:
diff changeset
451 # define getline rpl_getline
d5392bb5da3c Added generated files
lost
parents:
diff changeset
452 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
453 # if !@HAVE_DECL_GETLINE@ || @REPLACE_GETLINE@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
454 /* Read a line, up to (and including) the next newline, from STREAM, store it
d5392bb5da3c Added generated files
lost
parents:
diff changeset
455 in *LINEPTR (and NUL-terminate it).
d5392bb5da3c Added generated files
lost
parents:
diff changeset
456 *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE
d5392bb5da3c Added generated files
lost
parents:
diff changeset
457 bytes of space. It is realloc'd as necessary.
d5392bb5da3c Added generated files
lost
parents:
diff changeset
458 Return the number of bytes read and stored at *LINEPTR (not including the
d5392bb5da3c Added generated files
lost
parents:
diff changeset
459 NUL terminator), or -1 on error or EOF. */
d5392bb5da3c Added generated files
lost
parents:
diff changeset
460 extern ssize_t getline (char **lineptr, size_t *linesize, FILE *stream);
d5392bb5da3c Added generated files
lost
parents:
diff changeset
461 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
462 #elif defined GNULIB_POSIXCHECK
d5392bb5da3c Added generated files
lost
parents:
diff changeset
463 # undef getline
d5392bb5da3c Added generated files
lost
parents:
diff changeset
464 # define getline(l, s, f) \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
465 (GL_LINK_WARNING ("getline is unportable - " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
466 "use gnulib module getline for portability"), \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
467 getline (l, s, f))
d5392bb5da3c Added generated files
lost
parents:
diff changeset
468 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
469
d5392bb5da3c Added generated files
lost
parents:
diff changeset
470 #if @GNULIB_PERROR@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
471 # if @REPLACE_PERROR@
d5392bb5da3c Added generated files
lost
parents:
diff changeset
472 # define perror rpl_perror
d5392bb5da3c Added generated files
lost
parents:
diff changeset
473 /* Print a message to standard error, describing the value of ERRNO,
d5392bb5da3c Added generated files
lost
parents:
diff changeset
474 (if STRING is not NULL and not empty) prefixed with STRING and ": ",
d5392bb5da3c Added generated files
lost
parents:
diff changeset
475 and terminated with a newline. */
d5392bb5da3c Added generated files
lost
parents:
diff changeset
476 extern void perror (const char *string);
d5392bb5da3c Added generated files
lost
parents:
diff changeset
477 # endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
478 #elif defined GNULIB_POSIXCHECK
d5392bb5da3c Added generated files
lost
parents:
diff changeset
479 # undef perror
d5392bb5da3c Added generated files
lost
parents:
diff changeset
480 # define perror(s) \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
481 (GL_LINK_WARNING ("perror is not always POSIX compliant - " \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
482 "use gnulib module perror for portability"), \
d5392bb5da3c Added generated files
lost
parents:
diff changeset
483 perror (s))
d5392bb5da3c Added generated files
lost
parents:
diff changeset
484 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
485
d5392bb5da3c Added generated files
lost
parents:
diff changeset
486 #ifdef __cplusplus
d5392bb5da3c Added generated files
lost
parents:
diff changeset
487 }
d5392bb5da3c Added generated files
lost
parents:
diff changeset
488 #endif
d5392bb5da3c Added generated files
lost
parents:
diff changeset
489
d5392bb5da3c Added generated files
lost
parents:
diff changeset
490 #endif /* _GL_STDIO_H */
d5392bb5da3c Added generated files
lost
parents:
diff changeset
491 #endif /* _GL_STDIO_H */
d5392bb5da3c Added generated files
lost
parents:
diff changeset
492 #endif