Back to index

nagios-plugins  1.4.16
stdio.in.h
Go to the documentation of this file.
00001 /* A GNU-like <stdio.h>.
00002 
00003    Copyright (C) 2004, 2007-2010 Free Software Foundation, Inc.
00004 
00005    This program is free software; you can redistribute it and/or modify
00006    it under the terms of the GNU General Public License as published by
00007    the Free Software Foundation; either version 3, or (at your option)
00008    any later version.
00009 
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013    GNU General Public License for more details.
00014 
00015    You should have received a copy of the GNU General Public License
00016    along with this program; if not, write to the Free Software Foundation,
00017    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
00018 
00019 #if __GNUC__ >= 3
00020 @PRAGMA_SYSTEM_HEADER@
00021 #endif
00022 
00023 #if defined __need_FILE || defined __need___FILE
00024 /* Special invocation convention inside glibc header files.  */
00025 
00026 #@INCLUDE_NEXT@ @NEXT_STDIO_H@
00027 
00028 #else
00029 /* Normal invocation convention.  */
00030 
00031 #ifndef _GL_STDIO_H
00032 
00033 /* The include_next requires a split double-inclusion guard.  */
00034 #@INCLUDE_NEXT@ @NEXT_STDIO_H@
00035 
00036 #ifndef _GL_STDIO_H
00037 #define _GL_STDIO_H
00038 
00039 /* Get va_list.  Needed on many systems, including glibc 2.8.  */
00040 #include <stdarg.h>
00041 
00042 #include <stddef.h>
00043 
00044 /* Get off_t and ssize_t.  Needed on many systems, including glibc 2.8.  */
00045 #include <sys/types.h>
00046 
00047 #ifndef __attribute__
00048 /* The __attribute__ feature is available in gcc versions 2.5 and later.
00049    The __-protected variants of the attributes 'format' and 'printf' are
00050    accepted by gcc versions 2.6.4 (effectively 2.7) and later.
00051    We enable __attribute__ only if these are supported too, because
00052    gnulib and libintl do '#define printf __printf__' when they override
00053    the 'printf' function.  */
00054 # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
00055 #  define __attribute__(Spec)   /* empty */
00056 # endif
00057 #endif
00058 
00059 
00060 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
00061 
00062 /* The definition of _GL_ARG_NONNULL is copied here.  */
00063 
00064 /* The definition of _GL_WARN_ON_USE is copied here.  */
00065 
00066 /* Macros for stringification.  */
00067 #define _GL_STDIO_STRINGIZE(token) #token
00068 #define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token)
00069 
00070 
00071 #if @GNULIB_DPRINTF@
00072 # if @REPLACE_DPRINTF@
00073 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00074 #   define dprintf rpl_dprintf
00075 #  endif
00076 _GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *format, ...)
00077                                 __attribute__ ((__format__ (__printf__, 2, 3)))
00078                                 _GL_ARG_NONNULL ((2)));
00079 _GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *format, ...));
00080 # else
00081 #  if !@HAVE_DPRINTF@
00082 _GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *format, ...)
00083                                 __attribute__ ((__format__ (__printf__, 2, 3)))
00084                                 _GL_ARG_NONNULL ((2)));
00085 #  endif
00086 _GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *format, ...));
00087 # endif
00088 _GL_CXXALIASWARN (dprintf);
00089 #elif defined GNULIB_POSIXCHECK
00090 # undef dprintf
00091 # if HAVE_RAW_DECL_DPRINTF
00092 _GL_WARN_ON_USE (dprintf, "dprintf is unportable - "
00093                  "use gnulib module dprintf for portability");
00094 # endif
00095 #endif
00096 
00097 #if @GNULIB_FCLOSE@
00098 /* Close STREAM and its underlying file descriptor.  */
00099 # if @REPLACE_FCLOSE@
00100 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00101 #   define fclose rpl_fclose
00102 #  endif
00103 _GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
00104 _GL_CXXALIAS_RPL (fclose, int, (FILE *stream));
00105 # else
00106 _GL_CXXALIAS_SYS (fclose, int, (FILE *stream));
00107 # endif
00108 _GL_CXXALIASWARN (fclose);
00109 #elif defined GNULIB_POSIXCHECK
00110 # undef fclose
00111 /* Assume fclose is always declared.  */
00112 _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - "
00113                  "use gnulib module fclose for portable POSIX compliance");
00114 #endif
00115 
00116 #if @GNULIB_FFLUSH@
00117 /* Flush all pending data on STREAM according to POSIX rules.  Both
00118    output and seekable input streams are supported.
00119    Note! LOSS OF DATA can occur if fflush is applied on an input stream
00120    that is _not_seekable_ or on an update stream that is _not_seekable_
00121    and in which the most recent operation was input.  Seekability can
00122    be tested with lseek(fileno(fp),0,SEEK_CUR).  */
00123 # if @REPLACE_FFLUSH@
00124 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00125 #   define fflush rpl_fflush
00126 #  endif
00127 _GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream));
00128 _GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream));
00129 # else
00130 _GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream));
00131 # endif
00132 _GL_CXXALIASWARN (fflush);
00133 #elif defined GNULIB_POSIXCHECK
00134 # undef fflush
00135 /* Assume fflush is always declared.  */
00136 _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - "
00137                  "use gnulib module fflush for portable POSIX compliance");
00138 #endif
00139 
00140 /* It is very rare that the developer ever has full control of stdin,
00141    so any use of gets warrants an unconditional warning.  Assume it is
00142    always declared, since it is required by C89.  */
00143 #undef gets
00144 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
00145 
00146 #if @GNULIB_FOPEN@
00147 # if @REPLACE_FOPEN@
00148 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00149 #   undef fopen
00150 #   define fopen rpl_fopen
00151 #  endif
00152 _GL_FUNCDECL_RPL (fopen, FILE *, (const char *filename, const char *mode)
00153                                  _GL_ARG_NONNULL ((1, 2)));
00154 _GL_CXXALIAS_RPL (fopen, FILE *, (const char *filename, const char *mode));
00155 # else
00156 _GL_CXXALIAS_SYS (fopen, FILE *, (const char *filename, const char *mode));
00157 # endif
00158 _GL_CXXALIASWARN (fopen);
00159 #elif defined GNULIB_POSIXCHECK
00160 # undef fopen
00161 /* Assume fopen is always declared.  */
00162 _GL_WARN_ON_USE (fopen, "fopen on Win32 platforms is not POSIX compatible - "
00163                  "use gnulib module fopen for portability");
00164 #endif
00165 
00166 #if @GNULIB_FPRINTF_POSIX@ || @GNULIB_FPRINTF@
00167 # if (@GNULIB_FPRINTF_POSIX@ && @REPLACE_FPRINTF@) \
00168      || (@GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
00169 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00170 #   define fprintf rpl_fprintf
00171 #  endif
00172 #  define GNULIB_overrides_fprintf 1
00173 _GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...)
00174                                 __attribute__ ((__format__ (__printf__, 2, 3)))
00175                                 _GL_ARG_NONNULL ((1, 2)));
00176 _GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...));
00177 # else
00178 _GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...));
00179 # endif
00180 _GL_CXXALIASWARN (fprintf);
00181 #endif
00182 #if !@GNULIB_FPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
00183 # if !GNULIB_overrides_fprintf
00184 #  undef fprintf
00185 # endif
00186 /* Assume fprintf is always declared.  */
00187 _GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - "
00188                  "use gnulib module fprintf-posix for portable "
00189                  "POSIX compliance");
00190 #endif
00191 
00192 #if @GNULIB_FPURGE@
00193 /* Discard all pending buffered I/O data on STREAM.
00194    STREAM must not be wide-character oriented.
00195    When discarding pending output, the file position is set back to where it
00196    was before the write calls.  When discarding pending input, the file
00197    position is advanced to match the end of the previously read input.
00198    Return 0 if successful.  Upon error, return -1 and set errno.  */
00199 # if @REPLACE_FPURGE@
00200 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00201 #   define fpurge rpl_fpurge
00202 #  endif
00203 _GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1)));
00204 _GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream));
00205 # else
00206 #  if !@HAVE_DECL_FPURGE@
00207 _GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1)));
00208 #  endif
00209 _GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream));
00210 # endif
00211 _GL_CXXALIASWARN (fpurge);
00212 #elif defined GNULIB_POSIXCHECK
00213 # undef fpurge
00214 # if HAVE_RAW_DECL_FPURGE
00215 _GL_WARN_ON_USE (fpurge, "fpurge is not always present - "
00216                  "use gnulib module fpurge for portability");
00217 # endif
00218 #endif
00219 
00220 #if @GNULIB_FPUTC@
00221 # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
00222 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00223 #   undef fputc
00224 #   define fputc rpl_fputc
00225 #  endif
00226 _GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2)));
00227 _GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream));
00228 # else
00229 _GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream));
00230 # endif
00231 _GL_CXXALIASWARN (fputc);
00232 #endif
00233 
00234 #if @GNULIB_FPUTS@
00235 # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
00236 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00237 #   undef fputs
00238 #   define fputs rpl_fputs
00239 #  endif
00240 _GL_FUNCDECL_RPL (fputs, int, (const char *string, FILE *stream)
00241                               _GL_ARG_NONNULL ((1, 2)));
00242 _GL_CXXALIAS_RPL (fputs, int, (const char *string, FILE *stream));
00243 # else
00244 _GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream));
00245 # endif
00246 _GL_CXXALIASWARN (fputs);
00247 #endif
00248 
00249 #if @GNULIB_FREOPEN@
00250 # if @REPLACE_FREOPEN@
00251 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00252 #   undef freopen
00253 #   define freopen rpl_freopen
00254 #  endif
00255 _GL_FUNCDECL_RPL (freopen, FILE *,
00256                   (const char *filename, const char *mode, FILE *stream)
00257                   _GL_ARG_NONNULL ((2, 3)));
00258 _GL_CXXALIAS_RPL (freopen, FILE *,
00259                   (const char *filename, const char *mode, FILE *stream));
00260 # else
00261 _GL_CXXALIAS_SYS (freopen, FILE *,
00262                   (const char *filename, const char *mode, FILE *stream));
00263 # endif
00264 _GL_CXXALIASWARN (freopen);
00265 #elif defined GNULIB_POSIXCHECK
00266 # undef freopen
00267 /* Assume freopen is always declared.  */
00268 _GL_WARN_ON_USE (freopen, "freopen on Win32 platforms is not POSIX compatible - "
00269                  "use gnulib module freopen for portability");
00270 #endif
00271 
00272 
00273 /* Set up the following warnings, based on which modules are in use.
00274    GNU Coding Standards discourage the use of fseek, since it imposes
00275    an arbitrary limitation on some 32-bit hosts.  Remember that the
00276    fseek module depends on the fseeko module, so we only have three
00277    cases to consider:
00278 
00279    1. The developer is not using either module.  Issue a warning under
00280    GNULIB_POSIXCHECK for both functions, to remind them that both
00281    functions have bugs on some systems.  _GL_NO_LARGE_FILES has no
00282    impact on this warning.
00283 
00284    2. The developer is using both modules.  They may be unaware of the
00285    arbitrary limitations of fseek, so issue a warning under
00286    GNULIB_POSIXCHECK.  On the other hand, they may be using both
00287    modules intentionally, so the developer can define
00288    _GL_NO_LARGE_FILES in the compilation units where the use of fseek
00289    is safe, to silence the warning.
00290 
00291    3. The developer is using the fseeko module, but not fseek.  Gnulib
00292    guarantees that fseek will still work around platform bugs in that
00293    case, but we presume that the developer is aware of the pitfalls of
00294    fseek and was trying to avoid it, so issue a warning even when
00295    GNULIB_POSIXCHECK is undefined.  Again, _GL_NO_LARGE_FILES can be
00296    defined to silence the warning in particular compilation units.
00297    In C++ compilations with GNULIB_NAMESPACE, in order to avoid that
00298    fseek gets defined as a macro, it is recommended that the developer
00299    uses the fseek module, even if he is not calling the fseek function.
00300 
00301    Most gnulib clients that perform stream operations should fall into
00302    category 3.  */
00303 
00304 #if @GNULIB_FSEEK@
00305 # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES
00306 #  define _GL_FSEEK_WARN /* Category 2, above.  */
00307 #  undef fseek
00308 # endif
00309 # if @REPLACE_FSEEK@
00310 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00311 #   undef fseek
00312 #   define fseek rpl_fseek
00313 #  endif
00314 _GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence)
00315                               _GL_ARG_NONNULL ((1)));
00316 _GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence));
00317 # else
00318 _GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence));
00319 # endif
00320 _GL_CXXALIASWARN (fseek);
00321 #endif
00322 
00323 #if @GNULIB_FSEEKO@
00324 # if !@GNULIB_FSEEK@ && !defined _GL_NO_LARGE_FILES
00325 #  define _GL_FSEEK_WARN /* Category 3, above.  */
00326 #  undef fseek
00327 # endif
00328 # if @REPLACE_FSEEKO@
00329 /* Provide an fseeko function that is aware of a preceding fflush(), and which
00330    detects pipes.  */
00331 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00332 #   undef fseeko
00333 #   define fseeko rpl_fseeko
00334 #  endif
00335 _GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)
00336                                _GL_ARG_NONNULL ((1)));
00337 _GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence));
00338 # else
00339 #  if ! @HAVE_FSEEKO@
00340 _GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)
00341                                _GL_ARG_NONNULL ((1)));
00342 #  endif
00343 _GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence));
00344 # endif
00345 _GL_CXXALIASWARN (fseeko);
00346 # if (@REPLACE_FSEEKO@ || !@HAVE_FSEEKO@) && !@GNULIB_FSEEK@
00347    /* Provide an fseek function that is consistent with fseeko.  */
00348    /* In order to avoid that fseek gets defined as a macro here, the
00349       developer can request the 'fseek' module.  */
00350 #  undef fseek
00351 #  define fseek rpl_fseek
00352 static inline int _GL_ARG_NONNULL ((1))
00353 rpl_fseek (FILE *fp, long offset, int whence)
00354 {
00355 #  if @REPLACE_FSEEKO@
00356   return rpl_fseeko (fp, offset, whence);
00357 #  else
00358   return fseeko (fp, offset, whence);
00359 #  endif
00360 }
00361 # endif
00362 #elif defined GNULIB_POSIXCHECK
00363 # define _GL_FSEEK_WARN /* Category 1, above.  */
00364 # undef fseek
00365 # undef fseeko
00366 # if HAVE_RAW_DECL_FSEEKO
00367 _GL_WARN_ON_USE (fseeko, "fseeko is unportable - "
00368                  "use gnulib module fseeko for portability");
00369 # endif
00370 #endif
00371 
00372 #ifdef _GL_FSEEK_WARN
00373 # undef _GL_FSEEK_WARN
00374 /* Here, either fseek is undefined (but C89 guarantees that it is
00375    declared), or it is defined as rpl_fseek (declared above).  */
00376 _GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB "
00377                  "on 32-bit platforms - "
00378                  "use fseeko function for handling of large files");
00379 #endif
00380 
00381 
00382 /* ftell, ftello.  See the comments on fseek/fseeko.  */
00383 
00384 #if @GNULIB_FTELL@
00385 # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES
00386 #  define _GL_FTELL_WARN /* Category 2, above.  */
00387 #  undef ftell
00388 # endif
00389 # if @REPLACE_FTELL@
00390 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00391 #   undef ftell
00392 #   define ftell rpl_ftell
00393 #  endif
00394 _GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1)));
00395 _GL_CXXALIAS_RPL (ftell, long, (FILE *fp));
00396 # else
00397 _GL_CXXALIAS_SYS (ftell, long, (FILE *fp));
00398 # endif
00399 _GL_CXXALIASWARN (ftell);
00400 #endif
00401 
00402 #if @GNULIB_FTELLO@
00403 # if !@GNULIB_FTELL@ && !defined _GL_NO_LARGE_FILES
00404 #  define _GL_FTELL_WARN /* Category 3, above.  */
00405 #  undef ftell
00406 # endif
00407 # if @REPLACE_FTELLO@
00408 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00409 #   undef ftello
00410 #   define ftello rpl_ftello
00411 #  endif
00412 _GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1)));
00413 _GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp));
00414 # else
00415 #  if ! @HAVE_FTELLO@
00416 _GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1)));
00417 #  endif
00418 _GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp));
00419 # endif
00420 _GL_CXXALIASWARN (ftello);
00421 # if (@REPLACE_FTELLO@ || !@HAVE_FTELLO@) && !@GNULIB_FTELL@
00422    /* Provide an ftell function that is consistent with ftello.  */
00423    /* In order to avoid that ftell gets defined as a macro here, the
00424       developer can request the 'ftell' module.  */
00425 #  undef ftell
00426 #  define ftell rpl_ftell
00427 static inline long _GL_ARG_NONNULL ((1))
00428 rpl_ftell (FILE *f)
00429 {
00430 #  if @REPLACE_FTELLO@
00431   return rpl_ftello (f);
00432 #  else
00433   return ftello (f);
00434 #  endif
00435 }
00436 # endif
00437 #elif defined GNULIB_POSIXCHECK
00438 # define _GL_FTELL_WARN /* Category 1, above.  */
00439 # undef ftell
00440 # undef ftello
00441 # if HAVE_RAW_DECL_FTELLO
00442 _GL_WARN_ON_USE (ftello, "ftello is unportable - "
00443                  "use gnulib module ftello for portability");
00444 # endif
00445 #endif
00446 
00447 #ifdef _GL_FTELL_WARN
00448 # undef _GL_FTELL_WARN
00449 /* Here, either ftell is undefined (but C89 guarantees that it is
00450    declared), or it is defined as rpl_ftell (declared above).  */
00451 _GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB "
00452                  "on 32-bit platforms - "
00453                  "use ftello function for handling of large files");
00454 #endif
00455 
00456 
00457 #if @GNULIB_FWRITE@
00458 # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
00459 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00460 #   undef fwrite
00461 #   define fwrite rpl_fwrite
00462 #  endif
00463 _GL_FUNCDECL_RPL (fwrite, size_t,
00464                   (const void *ptr, size_t s, size_t n, FILE *stream)
00465                   _GL_ARG_NONNULL ((1, 4)));
00466 _GL_CXXALIAS_RPL (fwrite, size_t,
00467                   (const void *ptr, size_t s, size_t n, FILE *stream));
00468 # else
00469 _GL_CXXALIAS_SYS (fwrite, size_t,
00470                   (const void *ptr, size_t s, size_t n, FILE *stream));
00471 # endif
00472 _GL_CXXALIASWARN (fwrite);
00473 #endif
00474 
00475 #if @GNULIB_GETDELIM@
00476 /* Read input, up to (and including) the next occurrence of DELIMITER, from
00477    STREAM, store it in *LINEPTR (and NUL-terminate it).
00478    *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE
00479    bytes of space.  It is realloc'd as necessary.
00480    Return the number of bytes read and stored at *LINEPTR (not including the
00481    NUL terminator), or -1 on error or EOF.  */
00482 # if @REPLACE_GETDELIM@
00483 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00484 #   undef getdelim
00485 #   define getdelim rpl_getdelim
00486 #  endif
00487 _GL_FUNCDECL_RPL (getdelim, ssize_t,
00488                   (char **lineptr, size_t *linesize, int delimiter,
00489                    FILE *stream)
00490                   _GL_ARG_NONNULL ((1, 2, 4)));
00491 _GL_CXXALIAS_RPL (getdelim, ssize_t,
00492                   (char **lineptr, size_t *linesize, int delimiter,
00493                    FILE *stream));
00494 # else
00495 #  if !@HAVE_DECL_GETDELIM@
00496 _GL_FUNCDECL_SYS (getdelim, ssize_t,
00497                   (char **lineptr, size_t *linesize, int delimiter,
00498                    FILE *stream)
00499                   _GL_ARG_NONNULL ((1, 2, 4)));
00500 #  endif
00501 _GL_CXXALIAS_SYS (getdelim, ssize_t,
00502                   (char **lineptr, size_t *linesize, int delimiter,
00503                    FILE *stream));
00504 # endif
00505 _GL_CXXALIASWARN (getdelim);
00506 #elif defined GNULIB_POSIXCHECK
00507 # undef getdelim
00508 # if HAVE_RAW_DECL_GETDELIM
00509 _GL_WARN_ON_USE (getdelim, "getdelim is unportable - "
00510                  "use gnulib module getdelim for portability");
00511 # endif
00512 #endif
00513 
00514 #if @GNULIB_GETLINE@
00515 /* Read a line, up to (and including) the next newline, from STREAM, store it
00516    in *LINEPTR (and NUL-terminate it).
00517    *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE
00518    bytes of space.  It is realloc'd as necessary.
00519    Return the number of bytes read and stored at *LINEPTR (not including the
00520    NUL terminator), or -1 on error or EOF.  */
00521 # if @REPLACE_GETLINE@
00522 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00523 #   undef getline
00524 #   define getline rpl_getline
00525 #  endif
00526 _GL_FUNCDECL_RPL (getline, ssize_t,
00527                   (char **lineptr, size_t *linesize, FILE *stream)
00528                   _GL_ARG_NONNULL ((1, 2, 3)));
00529 _GL_CXXALIAS_RPL (getline, ssize_t,
00530                   (char **lineptr, size_t *linesize, FILE *stream));
00531 # else
00532 #  if !@HAVE_DECL_GETLINE@
00533 _GL_FUNCDECL_SYS (getline, ssize_t,
00534                   (char **lineptr, size_t *linesize, FILE *stream)
00535                   _GL_ARG_NONNULL ((1, 2, 3)));
00536 #  endif
00537 _GL_CXXALIAS_SYS (getline, ssize_t,
00538                   (char **lineptr, size_t *linesize, FILE *stream));
00539 # endif
00540 # if @HAVE_DECL_GETLINE@
00541 _GL_CXXALIASWARN (getline);
00542 # endif
00543 #elif defined GNULIB_POSIXCHECK
00544 # undef getline
00545 # if HAVE_RAW_DECL_GETLINE
00546 _GL_WARN_ON_USE (getline, "getline is unportable - "
00547                  "use gnulib module getline for portability");
00548 # endif
00549 #endif
00550 
00551 #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
00552 struct obstack;
00553 /* Grow an obstack with formatted output.  Return the number of
00554    bytes added to OBS.  No trailing nul byte is added, and the
00555    object should be closed with obstack_finish before use.  Upon
00556    memory allocation error, call obstack_alloc_failed_handler.  Upon
00557    other error, return -1.  */
00558 # if @REPLACE_OBSTACK_PRINTF@
00559 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00560 #   define obstack_printf rpl_obstack_printf
00561 #  endif
00562 _GL_FUNCDECL_RPL (obstack_printf, int,
00563                   (struct obstack *obs, const char *format, ...)
00564                   __attribute__ ((__format__ (__printf__, 2, 3)))
00565                   _GL_ARG_NONNULL ((1, 2)));
00566 _GL_CXXALIAS_RPL (obstack_printf, int,
00567                   (struct obstack *obs, const char *format, ...));
00568 # else
00569 #  if !@HAVE_DECL_OBSTACK_PRINTF@
00570 _GL_FUNCDECL_SYS (obstack_printf, int,
00571                   (struct obstack *obs, const char *format, ...)
00572                   __attribute__ ((__format__ (__printf__, 2, 3)))
00573                   _GL_ARG_NONNULL ((1, 2)));
00574 #  endif
00575 _GL_CXXALIAS_SYS (obstack_printf, int,
00576                   (struct obstack *obs, const char *format, ...));
00577 # endif
00578 _GL_CXXALIASWARN (obstack_printf);
00579 # if @REPLACE_OBSTACK_PRINTF@
00580 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00581 #   define obstack_vprintf rpl_obstack_vprintf
00582 #  endif
00583 _GL_FUNCDECL_RPL (obstack_vprintf, int,
00584                   (struct obstack *obs, const char *format, va_list args)
00585                   __attribute__ ((__format__ (__printf__, 2, 0)))
00586                   _GL_ARG_NONNULL ((1, 2)));
00587 _GL_CXXALIAS_RPL (obstack_vprintf, int,
00588                   (struct obstack *obs, const char *format, va_list args));
00589 # else
00590 #  if !@HAVE_DECL_OBSTACK_PRINTF@
00591 _GL_FUNCDECL_SYS (obstack_vprintf, int,
00592                   (struct obstack *obs, const char *format, va_list args)
00593                   __attribute__ ((__format__ (__printf__, 2, 0)))
00594                   _GL_ARG_NONNULL ((1, 2)));
00595 #  endif
00596 _GL_CXXALIAS_SYS (obstack_vprintf, int,
00597                   (struct obstack *obs, const char *format, va_list args));
00598 # endif
00599 _GL_CXXALIASWARN (obstack_vprintf);
00600 #endif
00601 
00602 #if @GNULIB_PERROR@
00603 /* Print a message to standard error, describing the value of ERRNO,
00604    (if STRING is not NULL and not empty) prefixed with STRING and ": ",
00605    and terminated with a newline.  */
00606 # if @REPLACE_PERROR@
00607 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00608 #   define perror rpl_perror
00609 #  endif
00610 _GL_FUNCDECL_RPL (perror, void, (const char *string));
00611 _GL_CXXALIAS_RPL (perror, void, (const char *string));
00612 # else
00613 _GL_CXXALIAS_SYS (perror, void, (const char *string));
00614 # endif
00615 _GL_CXXALIASWARN (perror);
00616 #elif defined GNULIB_POSIXCHECK
00617 # undef perror
00618 /* Assume perror is always declared.  */
00619 _GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - "
00620                  "use gnulib module perror for portability");
00621 #endif
00622 
00623 #if @GNULIB_POPEN@
00624 # if @REPLACE_POPEN@
00625 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00626 #   undef popen
00627 #   define popen rpl_popen
00628 #  endif
00629 _GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode)
00630                                  _GL_ARG_NONNULL ((1, 2)));
00631 _GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode));
00632 # else
00633 _GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode));
00634 # endif
00635 _GL_CXXALIASWARN (popen);
00636 #elif defined GNULIB_POSIXCHECK
00637 # undef popen
00638 # if HAVE_RAW_DECL_POPEN
00639 _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - "
00640                  "use gnulib module popen or pipe for more portability");
00641 # endif
00642 #endif
00643 
00644 #if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@
00645 # if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \
00646      || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
00647 #  if defined __GNUC__
00648 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00649 /* Don't break __attribute__((format(printf,M,N))).  */
00650 #    define printf __printf__
00651 #   endif
00652 _GL_FUNCDECL_RPL_1 (__printf__, int,
00653                     (const char *format, ...)
00654                     __asm__ (@ASM_SYMBOL_PREFIX@
00655                              _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf))
00656                     __attribute__ ((__format__ (__printf__, 1, 2)))
00657                     _GL_ARG_NONNULL ((1)));
00658 _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...));
00659 #  else
00660 _GL_FUNCDECL_RPL (printf, int,
00661                   (const char *format, ...)
00662                   __attribute__ ((__format__ (__printf__, 1, 2)))
00663                   _GL_ARG_NONNULL ((1)));
00664 _GL_CXXALIAS_RPL (printf, int, (const char *format, ...));
00665 #  endif
00666 #  define GNULIB_overrides_printf 1
00667 # else
00668 _GL_CXXALIAS_SYS (printf, int, (const char *format, ...));
00669 # endif
00670 _GL_CXXALIASWARN (printf);
00671 #endif
00672 #if !@GNULIB_PRINTF_POSIX@ && defined GNULIB_POSIXCHECK
00673 # if !GNULIB_overrides_printf
00674 #  undef printf
00675 # endif
00676 /* Assume printf is always declared.  */
00677 _GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - "
00678                  "use gnulib module printf-posix for portable "
00679                  "POSIX compliance");
00680 #endif
00681 
00682 #if @GNULIB_PUTC@
00683 # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
00684 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00685 #   undef putc
00686 #   define putc rpl_fputc
00687 #  endif
00688 _GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2)));
00689 _GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream));
00690 # else
00691 _GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream));
00692 # endif
00693 _GL_CXXALIASWARN (putc);
00694 #endif
00695 
00696 #if @GNULIB_PUTCHAR@
00697 # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
00698 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00699 #   undef putchar
00700 #   define putchar rpl_putchar
00701 #  endif
00702 _GL_FUNCDECL_RPL (putchar, int, (int c));
00703 _GL_CXXALIAS_RPL (putchar, int, (int c));
00704 # else
00705 _GL_CXXALIAS_SYS (putchar, int, (int c));
00706 # endif
00707 _GL_CXXALIASWARN (putchar);
00708 #endif
00709 
00710 #if @GNULIB_PUTS@
00711 # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
00712 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00713 #   undef puts
00714 #   define puts rpl_puts
00715 #  endif
00716 _GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1)));
00717 _GL_CXXALIAS_RPL (puts, int, (const char *string));
00718 # else
00719 _GL_CXXALIAS_SYS (puts, int, (const char *string));
00720 # endif
00721 _GL_CXXALIASWARN (puts);
00722 #endif
00723 
00724 #if @GNULIB_REMOVE@
00725 # if @REPLACE_REMOVE@
00726 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00727 #   undef remove
00728 #   define remove rpl_remove
00729 #  endif
00730 _GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1)));
00731 _GL_CXXALIAS_RPL (remove, int, (const char *name));
00732 # else
00733 _GL_CXXALIAS_SYS (remove, int, (const char *name));
00734 # endif
00735 _GL_CXXALIASWARN (remove);
00736 #elif defined GNULIB_POSIXCHECK
00737 # undef remove
00738 /* Assume remove is always declared.  */
00739 _GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - "
00740                  "use gnulib module remove for more portability");
00741 #endif
00742 
00743 #if @GNULIB_RENAME@
00744 # if @REPLACE_RENAME@
00745 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00746 #   undef rename
00747 #   define rename rpl_rename
00748 #  endif
00749 _GL_FUNCDECL_RPL (rename, int,
00750                   (const char *old_filename, const char *new_filename)
00751                   _GL_ARG_NONNULL ((1, 2)));
00752 _GL_CXXALIAS_RPL (rename, int,
00753                   (const char *old_filename, const char *new_filename));
00754 # else
00755 _GL_CXXALIAS_SYS (rename, int,
00756                   (const char *old_filename, const char *new_filename));
00757 # endif
00758 _GL_CXXALIASWARN (rename);
00759 #elif defined GNULIB_POSIXCHECK
00760 # undef rename
00761 /* Assume rename is always declared.  */
00762 _GL_WARN_ON_USE (rename, "rename is buggy on some platforms - "
00763                  "use gnulib module rename for more portability");
00764 #endif
00765 
00766 #if @GNULIB_RENAMEAT@
00767 # if @REPLACE_RENAMEAT@
00768 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00769 #   undef renameat
00770 #   define renameat rpl_renameat
00771 #  endif
00772 _GL_FUNCDECL_RPL (renameat, int,
00773                   (int fd1, char const *file1, int fd2, char const *file2)
00774                   _GL_ARG_NONNULL ((2, 4)));
00775 _GL_CXXALIAS_RPL (renameat, int,
00776                   (int fd1, char const *file1, int fd2, char const *file2));
00777 # else
00778 #  if !@HAVE_RENAMEAT@
00779 _GL_FUNCDECL_SYS (renameat, int,
00780                   (int fd1, char const *file1, int fd2, char const *file2)
00781                   _GL_ARG_NONNULL ((2, 4)));
00782 #  endif
00783 _GL_CXXALIAS_SYS (renameat, int,
00784                   (int fd1, char const *file1, int fd2, char const *file2));
00785 # endif
00786 _GL_CXXALIASWARN (renameat);
00787 #elif defined GNULIB_POSIXCHECK
00788 # undef renameat
00789 # if HAVE_RAW_DECL_RENAMEAT
00790 _GL_WARN_ON_USE (renameat, "renameat is not portable - "
00791                  "use gnulib module renameat for portability");
00792 # endif
00793 #endif
00794 
00795 #if @GNULIB_SNPRINTF@
00796 # if @REPLACE_SNPRINTF@
00797 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00798 #   define snprintf rpl_snprintf
00799 #  endif
00800 _GL_FUNCDECL_RPL (snprintf, int,
00801                   (char *str, size_t size, const char *format, ...)
00802                   __attribute__ ((__format__ (__printf__, 3, 4)))
00803                   _GL_ARG_NONNULL ((3)));
00804 _GL_CXXALIAS_RPL (snprintf, int,
00805                   (char *str, size_t size, const char *format, ...));
00806 # else
00807 #  if !@HAVE_DECL_SNPRINTF@
00808 _GL_FUNCDECL_SYS (snprintf, int,
00809                   (char *str, size_t size, const char *format, ...)
00810                   __attribute__ ((__format__ (__printf__, 3, 4)))
00811                   _GL_ARG_NONNULL ((3)));
00812 #  endif
00813 _GL_CXXALIAS_SYS (snprintf, int,
00814                   (char *str, size_t size, const char *format, ...));
00815 # endif
00816 _GL_CXXALIASWARN (snprintf);
00817 #elif defined GNULIB_POSIXCHECK
00818 # undef snprintf
00819 # if HAVE_RAW_DECL_SNPRINTF
00820 _GL_WARN_ON_USE (snprintf, "snprintf is unportable - "
00821                  "use gnulib module snprintf for portability");
00822 # endif
00823 #endif
00824 
00825 /* Some people would argue that sprintf should be handled like gets
00826    (for example, OpenBSD issues a link warning for both functions),
00827    since both can cause security holes due to buffer overruns.
00828    However, we believe that sprintf can be used safely, and is more
00829    efficient than snprintf in those safe cases; and as proof of our
00830    belief, we use sprintf in several gnulib modules.  So this header
00831    intentionally avoids adding a warning to sprintf except when
00832    GNULIB_POSIXCHECK is defined.  */
00833 
00834 #if @GNULIB_SPRINTF_POSIX@
00835 # if @REPLACE_SPRINTF@
00836 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00837 #   define sprintf rpl_sprintf
00838 #  endif
00839 _GL_FUNCDECL_RPL (sprintf, int, (char *str, const char *format, ...)
00840                                 __attribute__ ((__format__ (__printf__, 2, 3)))
00841                                 _GL_ARG_NONNULL ((1, 2)));
00842 _GL_CXXALIAS_RPL (sprintf, int, (char *str, const char *format, ...));
00843 # else
00844 _GL_CXXALIAS_SYS (sprintf, int, (char *str, const char *format, ...));
00845 # endif
00846 _GL_CXXALIASWARN (sprintf);
00847 #elif defined GNULIB_POSIXCHECK
00848 # undef sprintf
00849 /* Assume sprintf is always declared.  */
00850 _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - "
00851                  "use gnulib module sprintf-posix for portable "
00852                  "POSIX compliance");
00853 #endif
00854 
00855 #if @GNULIB_TMPFILE@
00856 # if @REPLACE_TMPFILE@
00857 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00858 #   define tmpfile rpl_tmpfile
00859 #  endif
00860 _GL_FUNCDECL_RPL (tmpfile, FILE *, (void));
00861 _GL_CXXALIAS_RPL (tmpfile, FILE *, (void));
00862 # else
00863 _GL_CXXALIAS_SYS (tmpfile, FILE *, (void));
00864 # endif
00865 _GL_CXXALIASWARN (tmpfile);
00866 #elif defined GNULIB_POSIXCHECK
00867 # undef tmpfile
00868 # if HAVE_RAW_DECL_TMPFILE
00869 _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - "
00870                  "use gnulib module tmpfile for portability");
00871 # endif
00872 #endif
00873 
00874 #if @GNULIB_VASPRINTF@
00875 /* Write formatted output to a string dynamically allocated with malloc().
00876    If the memory allocation succeeds, store the address of the string in
00877    *RESULT and return the number of resulting bytes, excluding the trailing
00878    NUL.  Upon memory allocation error, or some other error, return -1.  */
00879 # if @REPLACE_VASPRINTF@
00880 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00881 #   define asprintf rpl_asprintf
00882 #  endif
00883 _GL_FUNCDECL_RPL (asprintf, int,
00884                   (char **result, const char *format, ...)
00885                   __attribute__ ((__format__ (__printf__, 2, 3)))
00886                   _GL_ARG_NONNULL ((1, 2)));
00887 _GL_CXXALIAS_RPL (asprintf, int,
00888                   (char **result, const char *format, ...));
00889 # else
00890 #  if !@HAVE_VASPRINTF@
00891 _GL_FUNCDECL_SYS (asprintf, int,
00892                   (char **result, const char *format, ...)
00893                   __attribute__ ((__format__ (__printf__, 2, 3)))
00894                   _GL_ARG_NONNULL ((1, 2)));
00895 #  endif
00896 _GL_CXXALIAS_SYS (asprintf, int,
00897                   (char **result, const char *format, ...));
00898 # endif
00899 _GL_CXXALIASWARN (asprintf);
00900 # if @REPLACE_VASPRINTF@
00901 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00902 #   define vasprintf rpl_vasprintf
00903 #  endif
00904 _GL_FUNCDECL_RPL (vasprintf, int,
00905                   (char **result, const char *format, va_list args)
00906                   __attribute__ ((__format__ (__printf__, 2, 0)))
00907                   _GL_ARG_NONNULL ((1, 2)));
00908 _GL_CXXALIAS_RPL (vasprintf, int,
00909                   (char **result, const char *format, va_list args));
00910 # else
00911 #  if !@HAVE_VASPRINTF@
00912 _GL_FUNCDECL_SYS (vasprintf, int,
00913                   (char **result, const char *format, va_list args)
00914                   __attribute__ ((__format__ (__printf__, 2, 0)))
00915                   _GL_ARG_NONNULL ((1, 2)));
00916 #  endif
00917 _GL_CXXALIAS_SYS (vasprintf, int,
00918                   (char **result, const char *format, va_list args));
00919 # endif
00920 _GL_CXXALIASWARN (vasprintf);
00921 #endif
00922 
00923 #if @GNULIB_VDPRINTF@
00924 # if @REPLACE_VDPRINTF@
00925 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00926 #   define vdprintf rpl_vdprintf
00927 #  endif
00928 _GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *format, va_list args)
00929                                  __attribute__ ((__format__ (__printf__, 2, 0)))
00930                                  _GL_ARG_NONNULL ((2)));
00931 _GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *format, va_list args));
00932 # else
00933 #  if !@HAVE_VDPRINTF@
00934 _GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *format, va_list args)
00935                                  __attribute__ ((__format__ (__printf__, 2, 0)))
00936                                  _GL_ARG_NONNULL ((2)));
00937 #  endif
00938 /* Need to cast, because on Solaris, the third parameter will likely be
00939                                                     __va_list args.  */
00940 _GL_CXXALIAS_SYS_CAST (vdprintf, int,
00941                        (int fd, const char *format, va_list args));
00942 # endif
00943 _GL_CXXALIASWARN (vdprintf);
00944 #elif defined GNULIB_POSIXCHECK
00945 # undef vdprintf
00946 # if HAVE_RAW_DECL_VDPRINTF
00947 _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - "
00948                  "use gnulib module vdprintf for portability");
00949 # endif
00950 #endif
00951 
00952 #if @GNULIB_VFPRINTF_POSIX@ || @GNULIB_VFPRINTF@
00953 # if (@GNULIB_VFPRINTF_POSIX@ && @REPLACE_VFPRINTF@) \
00954      || (@GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
00955 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00956 #   define vfprintf rpl_vfprintf
00957 #  endif
00958 #  define GNULIB_overrides_vfprintf 1
00959 _GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)
00960                                  __attribute__ ((__format__ (__printf__, 2, 0)))
00961                                  _GL_ARG_NONNULL ((1, 2)));
00962 _GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args));
00963 # else
00964 /* Need to cast, because on Solaris, the third parameter is
00965                                                       __va_list args
00966    and GCC's fixincludes did not change this to __gnuc_va_list.  */
00967 _GL_CXXALIAS_SYS_CAST (vfprintf, int,
00968                        (FILE *fp, const char *format, va_list args));
00969 # endif
00970 _GL_CXXALIASWARN (vfprintf);
00971 #endif
00972 #if !@GNULIB_VFPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
00973 # if !GNULIB_overrides_vfprintf
00974 #  undef vfprintf
00975 # endif
00976 /* Assume vfprintf is always declared.  */
00977 _GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - "
00978                  "use gnulib module vfprintf-posix for portable "
00979                       "POSIX compliance");
00980 #endif
00981 
00982 #if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@
00983 # if (@GNULIB_VPRINTF_POSIX@ && @REPLACE_VPRINTF@) \
00984      || (@GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
00985 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00986 #   define vprintf rpl_vprintf
00987 #  endif
00988 #  define GNULIB_overrides_vprintf 1
00989 _GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args)
00990                                 __attribute__ ((__format__ (__printf__, 1, 0)))
00991                                 _GL_ARG_NONNULL ((1)));
00992 _GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args));
00993 # else
00994 /* Need to cast, because on Solaris, the second parameter is
00995                                                           __va_list args
00996    and GCC's fixincludes did not change this to __gnuc_va_list.  */
00997 _GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args));
00998 # endif
00999 _GL_CXXALIASWARN (vprintf);
01000 #endif
01001 #if !@GNULIB_VPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
01002 # if !GNULIB_overrides_vprintf
01003 #  undef vprintf
01004 # endif
01005 /* Assume vprintf is always declared.  */
01006 _GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - "
01007                  "use gnulib module vprintf-posix for portable "
01008                  "POSIX compliance");
01009 #endif
01010 
01011 #if @GNULIB_VSNPRINTF@
01012 # if @REPLACE_VSNPRINTF@
01013 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
01014 #   define vsnprintf rpl_vsnprintf
01015 #  endif
01016 _GL_FUNCDECL_RPL (vsnprintf, int,
01017                   (char *str, size_t size, const char *format, va_list args)
01018                   __attribute__ ((__format__ (__printf__, 3, 0)))
01019                   _GL_ARG_NONNULL ((3)));
01020 _GL_CXXALIAS_RPL (vsnprintf, int,
01021                   (char *str, size_t size, const char *format, va_list args));
01022 # else
01023 #  if !@HAVE_DECL_VSNPRINTF@
01024 _GL_FUNCDECL_SYS (vsnprintf, int,
01025                   (char *str, size_t size, const char *format, va_list args)
01026                   __attribute__ ((__format__ (__printf__, 3, 0)))
01027                   _GL_ARG_NONNULL ((3)));
01028 #  endif
01029 _GL_CXXALIAS_SYS (vsnprintf, int,
01030                   (char *str, size_t size, const char *format, va_list args));
01031 # endif
01032 _GL_CXXALIASWARN (vsnprintf);
01033 #elif defined GNULIB_POSIXCHECK
01034 # undef vsnprintf
01035 # if HAVE_RAW_DECL_VSNPRINTF
01036 _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - "
01037                  "use gnulib module vsnprintf for portability");
01038 # endif
01039 #endif
01040 
01041 #if @GNULIB_VSPRINTF_POSIX@
01042 # if @REPLACE_VSPRINTF@
01043 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
01044 #   define vsprintf rpl_vsprintf
01045 #  endif
01046 _GL_FUNCDECL_RPL (vsprintf, int,
01047                   (char *str, const char *format, va_list args)
01048                   __attribute__ ((__format__ (__printf__, 2, 0)))
01049                   _GL_ARG_NONNULL ((1, 2)));
01050 _GL_CXXALIAS_RPL (vsprintf, int,
01051                   (char *str, const char *format, va_list args));
01052 # else
01053 /* Need to cast, because on Solaris, the third parameter is
01054                                                        __va_list args
01055    and GCC's fixincludes did not change this to __gnuc_va_list.  */
01056 _GL_CXXALIAS_SYS_CAST (vsprintf, int,
01057                        (char *str, const char *format, va_list args));
01058 # endif
01059 _GL_CXXALIASWARN (vsprintf);
01060 #elif defined GNULIB_POSIXCHECK
01061 # undef vsprintf
01062 /* Assume vsprintf is always declared.  */
01063 _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - "
01064                  "use gnulib module vsprintf-posix for portable "
01065                       "POSIX compliance");
01066 #endif
01067 
01068 
01069 #endif /* _GL_STDIO_H */
01070 #endif /* _GL_STDIO_H */
01071 #endif