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