Home | History | Annotate | Download | only in linux-lib
      1 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
      2 /* A GNU-like <stdio.h>.
      3 
      4    Copyright (C) 2004, 2007-2012 Free Software Foundation, Inc.
      5 
      6    This program is free software; you can redistribute it and/or modify
      7    it under the terms of the GNU General Public License as published by
      8    the Free Software Foundation; either version 3, or (at your option)
      9    any later version.
     10 
     11    This program is distributed in the hope that it will be useful,
     12    but WITHOUT ANY WARRANTY; without even the implied warranty of
     13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     14    GNU General Public License for more details.
     15 
     16    You should have received a copy of the GNU General Public License
     17    along with this program; if not, see <http://www.gnu.org/licenses/>.  */
     18 
     19 #if __GNUC__ >= 3
     20 #pragma GCC system_header
     21 #endif
     22 
     23 
     24 #if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H
     25 /* Special invocation convention:
     26    - Inside glibc header files.
     27    - On OSF/1 5.1 we have a sequence of nested includes
     28      <stdio.h> -> <getopt.h> -> <ctype.h> -> <sys/localedef.h> ->
     29      <sys/lc_core.h> -> <nl_types.h> -> <mesg.h> -> <stdio.h>.
     30      In this situation, the functions are not yet declared, therefore we cannot
     31      provide the C++ aliases.  */
     32 
     33 #include_next <stdio.h>
     34 
     35 #else
     36 /* Normal invocation convention.  */
     37 
     38 #ifndef _GL_STDIO_H
     39 
     40 #define _GL_ALREADY_INCLUDING_STDIO_H
     41 
     42 /* The include_next requires a split double-inclusion guard.  */
     43 #include_next <stdio.h>
     44 
     45 #undef _GL_ALREADY_INCLUDING_STDIO_H
     46 
     47 #ifndef _GL_STDIO_H
     48 #define _GL_STDIO_H
     49 
     50 _GL_INLINE_HEADER_BEGIN
     51 #ifndef _GL_STDIO_INLINE
     52 # define _GL_STDIO_INLINE _GL_INLINE
     53 #endif
     54 
     55 /* Get va_list.  Needed on many systems, including glibc 2.8.  */
     56 #include <stdarg.h>
     57 
     58 #include <stddef.h>
     59 
     60 /* Get off_t and ssize_t.  Needed on many systems, including glibc 2.8
     61    and eglibc 2.11.2.
     62    May also define off_t to a 64-bit type on native Windows.  */
     63 #include <sys/types.h>
     64 
     65 /* The __attribute__ feature is available in gcc versions 2.5 and later.
     66    The __-protected variants of the attributes 'format' and 'printf' are
     67    accepted by gcc versions 2.6.4 (effectively 2.7) and later.
     68    We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
     69    gnulib and libintl do '#define printf __printf__' when they override
     70    the 'printf' function.  */
     71 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
     72 # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
     73 #else
     74 # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
     75 #endif
     76 
     77 /* _GL_ATTRIBUTE_FORMAT_PRINTF
     78    indicates to GCC that the function takes a format string and arguments,
     79    where the format string directives are the ones standardized by ISO C99
     80    and POSIX.  */
     81 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
     82 # define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
     83    _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument))
     84 #else
     85 # define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
     86    _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
     87 #endif
     88 
     89 /* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF,
     90    except that it indicates to GCC that the supported format string directives
     91    are the ones of the system printf(), rather than the ones standardized by
     92    ISO C99 and POSIX.  */
     93 #define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \
     94   _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
     95 
     96 /* _GL_ATTRIBUTE_FORMAT_SCANF
     97    indicates to GCC that the function takes a format string and arguments,
     98    where the format string directives are the ones standardized by ISO C99
     99    and POSIX.  */
    100 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
    101 # define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \
    102    _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument))
    103 #else
    104 # define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \
    105    _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument))
    106 #endif
    107 
    108 /* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF,
    109    except that it indicates to GCC that the supported format string directives
    110    are the ones of the system scanf(), rather than the ones standardized by
    111    ISO C99 and POSIX.  */
    112 #define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \
    113   _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument))
    114 
    115 /* Solaris 10 declares renameat in <unistd.h>, not in <stdio.h>.  */
    116 /* But in any case avoid namespace pollution on glibc systems.  */
    117 #if (0 || defined GNULIB_POSIXCHECK) && defined __sun \
    118     && ! defined __GLIBC__
    119 # include <unistd.h>
    120 #endif
    121 
    122 
    123 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
    124 #ifndef _GL_CXXDEFS_H
    125 #define _GL_CXXDEFS_H
    126 
    127 /* The three most frequent use cases of these macros are:
    128 
    129    * For providing a substitute for a function that is missing on some
    130      platforms, but is declared and works fine on the platforms on which
    131      it exists:
    132 
    133        #if @GNULIB_FOO@
    134        # if !@HAVE_FOO@
    135        _GL_FUNCDECL_SYS (foo, ...);
    136        # endif
    137        _GL_CXXALIAS_SYS (foo, ...);
    138        _GL_CXXALIASWARN (foo);
    139        #elif defined GNULIB_POSIXCHECK
    140        ...
    141        #endif
    142 
    143    * For providing a replacement for a function that exists on all platforms,
    144      but is broken/insufficient and needs to be replaced on some platforms:
    145 
    146        #if @GNULIB_FOO@
    147        # if @REPLACE_FOO@
    148        #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    149        #   undef foo
    150        #   define foo rpl_foo
    151        #  endif
    152        _GL_FUNCDECL_RPL (foo, ...);
    153        _GL_CXXALIAS_RPL (foo, ...);
    154        # else
    155        _GL_CXXALIAS_SYS (foo, ...);
    156        # endif
    157        _GL_CXXALIASWARN (foo);
    158        #elif defined GNULIB_POSIXCHECK
    159        ...
    160        #endif
    161 
    162    * For providing a replacement for a function that exists on some platforms
    163      but is broken/insufficient and needs to be replaced on some of them and
    164      is additionally either missing or undeclared on some other platforms:
    165 
    166        #if @GNULIB_FOO@
    167        # if @REPLACE_FOO@
    168        #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    169        #   undef foo
    170        #   define foo rpl_foo
    171        #  endif
    172        _GL_FUNCDECL_RPL (foo, ...);
    173        _GL_CXXALIAS_RPL (foo, ...);
    174        # else
    175        #  if !@HAVE_FOO@   or   if !@HAVE_DECL_FOO@
    176        _GL_FUNCDECL_SYS (foo, ...);
    177        #  endif
    178        _GL_CXXALIAS_SYS (foo, ...);
    179        # endif
    180        _GL_CXXALIASWARN (foo);
    181        #elif defined GNULIB_POSIXCHECK
    182        ...
    183        #endif
    184 */
    185 
    186 /* _GL_EXTERN_C declaration;
    187    performs the declaration with C linkage.  */
    188 #if defined __cplusplus
    189 # define _GL_EXTERN_C extern "C"
    190 #else
    191 # define _GL_EXTERN_C extern
    192 #endif
    193 
    194 /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
    195    declares a replacement function, named rpl_func, with the given prototype,
    196    consisting of return type, parameters, and attributes.
    197    Example:
    198      _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
    199                                   _GL_ARG_NONNULL ((1)));
    200  */
    201 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
    202   _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
    203 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
    204   _GL_EXTERN_C rettype rpl_func parameters_and_attributes
    205 
    206 /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
    207    declares the system function, named func, with the given prototype,
    208    consisting of return type, parameters, and attributes.
    209    Example:
    210      _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
    211                                   _GL_ARG_NONNULL ((1)));
    212  */
    213 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
    214   _GL_EXTERN_C rettype func parameters_and_attributes
    215 
    216 /* _GL_CXXALIAS_RPL (func, rettype, parameters);
    217    declares a C++ alias called GNULIB_NAMESPACE::func
    218    that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
    219    Example:
    220      _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
    221  */
    222 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \
    223   _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
    224 #if defined __cplusplus && defined GNULIB_NAMESPACE
    225 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
    226     namespace GNULIB_NAMESPACE                                \
    227     {                                                         \
    228       rettype (*const func) parameters = ::rpl_func;          \
    229     }                                                         \
    230     _GL_EXTERN_C int _gl_cxxalias_dummy
    231 #else
    232 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
    233     _GL_EXTERN_C int _gl_cxxalias_dummy
    234 #endif
    235 
    236 /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
    237    is like  _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
    238    except that the C function rpl_func may have a slightly different
    239    declaration.  A cast is used to silence the "invalid conversion" error
    240    that would otherwise occur.  */
    241 #if defined __cplusplus && defined GNULIB_NAMESPACE
    242 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
    243     namespace GNULIB_NAMESPACE                                     \
    244     {                                                              \
    245       rettype (*const func) parameters =                           \
    246         reinterpret_cast<rettype(*)parameters>(::rpl_func);        \
    247     }                                                              \
    248     _GL_EXTERN_C int _gl_cxxalias_dummy
    249 #else
    250 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
    251     _GL_EXTERN_C int _gl_cxxalias_dummy
    252 #endif
    253 
    254 /* _GL_CXXALIAS_SYS (func, rettype, parameters);
    255    declares a C++ alias called GNULIB_NAMESPACE::func
    256    that redirects to the system provided function func, if GNULIB_NAMESPACE
    257    is defined.
    258    Example:
    259      _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
    260  */
    261 #if defined __cplusplus && defined GNULIB_NAMESPACE
    262   /* If we were to write
    263        rettype (*const func) parameters = ::func;
    264      like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls
    265      better (remove an indirection through a 'static' pointer variable),
    266      but then the _GL_CXXALIASWARN macro below would cause a warning not only
    267      for uses of ::func but also for uses of GNULIB_NAMESPACE::func.  */
    268 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
    269     namespace GNULIB_NAMESPACE                     \
    270     {                                              \
    271       static rettype (*func) parameters = ::func;  \
    272     }                                              \
    273     _GL_EXTERN_C int _gl_cxxalias_dummy
    274 #else
    275 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
    276     _GL_EXTERN_C int _gl_cxxalias_dummy
    277 #endif
    278 
    279 /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
    280    is like  _GL_CXXALIAS_SYS (func, rettype, parameters);
    281    except that the C function func may have a slightly different declaration.
    282    A cast is used to silence the "invalid conversion" error that would
    283    otherwise occur.  */
    284 #if defined __cplusplus && defined GNULIB_NAMESPACE
    285 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
    286     namespace GNULIB_NAMESPACE                          \
    287     {                                                   \
    288       static rettype (*func) parameters =               \
    289         reinterpret_cast<rettype(*)parameters>(::func); \
    290     }                                                   \
    291     _GL_EXTERN_C int _gl_cxxalias_dummy
    292 #else
    293 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
    294     _GL_EXTERN_C int _gl_cxxalias_dummy
    295 #endif
    296 
    297 /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
    298    is like  _GL_CXXALIAS_SYS (func, rettype, parameters);
    299    except that the C function is picked among a set of overloaded functions,
    300    namely the one with rettype2 and parameters2.  Two consecutive casts
    301    are used to silence the "cannot find a match" and "invalid conversion"
    302    errors that would otherwise occur.  */
    303 #if defined __cplusplus && defined GNULIB_NAMESPACE
    304   /* The outer cast must be a reinterpret_cast.
    305      The inner cast: When the function is defined as a set of overloaded
    306      functions, it works as a static_cast<>, choosing the designated variant.
    307      When the function is defined as a single variant, it works as a
    308      reinterpret_cast<>. The parenthesized cast syntax works both ways.  */
    309 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
    310     namespace GNULIB_NAMESPACE                                                \
    311     {                                                                         \
    312       static rettype (*func) parameters =                                     \
    313         reinterpret_cast<rettype(*)parameters>(                               \
    314           (rettype2(*)parameters2)(::func));                                  \
    315     }                                                                         \
    316     _GL_EXTERN_C int _gl_cxxalias_dummy
    317 #else
    318 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
    319     _GL_EXTERN_C int _gl_cxxalias_dummy
    320 #endif
    321 
    322 /* _GL_CXXALIASWARN (func);
    323    causes a warning to be emitted when ::func is used but not when
    324    GNULIB_NAMESPACE::func is used.  func must be defined without overloaded
    325    variants.  */
    326 #if defined __cplusplus && defined GNULIB_NAMESPACE
    327 # define _GL_CXXALIASWARN(func) \
    328    _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
    329 # define _GL_CXXALIASWARN_1(func,namespace) \
    330    _GL_CXXALIASWARN_2 (func, namespace)
    331 /* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
    332    we enable the warning only when not optimizing.  */
    333 # if !__OPTIMIZE__
    334 #  define _GL_CXXALIASWARN_2(func,namespace) \
    335     _GL_WARN_ON_USE (func, \
    336                      "The symbol ::" #func " refers to the system function. " \
    337                      "Use " #namespace "::" #func " instead.")
    338 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
    339 #  define _GL_CXXALIASWARN_2(func,namespace) \
    340      extern __typeof__ (func) func
    341 # else
    342 #  define _GL_CXXALIASWARN_2(func,namespace) \
    343      _GL_EXTERN_C int _gl_cxxalias_dummy
    344 # endif
    345 #else
    346 # define _GL_CXXALIASWARN(func) \
    347     _GL_EXTERN_C int _gl_cxxalias_dummy
    348 #endif
    349 
    350 /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
    351    causes a warning to be emitted when the given overloaded variant of ::func
    352    is used but not when GNULIB_NAMESPACE::func is used.  */
    353 #if defined __cplusplus && defined GNULIB_NAMESPACE
    354 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
    355    _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
    356                         GNULIB_NAMESPACE)
    357 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
    358    _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
    359 /* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
    360    we enable the warning only when not optimizing.  */
    361 # if !__OPTIMIZE__
    362 #  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
    363     _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
    364                          "The symbol ::" #func " refers to the system function. " \
    365                          "Use " #namespace "::" #func " instead.")
    366 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
    367 #  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
    368      extern __typeof__ (func) func
    369 # else
    370 #  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
    371      _GL_EXTERN_C int _gl_cxxalias_dummy
    372 # endif
    373 #else
    374 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
    375     _GL_EXTERN_C int _gl_cxxalias_dummy
    376 #endif
    377 
    378 #endif /* _GL_CXXDEFS_H */
    379 
    380 /* The definition of _GL_ARG_NONNULL is copied here.  */
    381 /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
    382    that the values passed as arguments n, ..., m must be non-NULL pointers.
    383    n = 1 stands for the first argument, n = 2 for the second argument etc.  */
    384 #ifndef _GL_ARG_NONNULL
    385 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
    386 #  define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
    387 # else
    388 #  define _GL_ARG_NONNULL(params)
    389 # endif
    390 #endif
    391 
    392 /* The definition of _GL_WARN_ON_USE is copied here.  */
    393 #ifndef _GL_WARN_ON_USE
    394 
    395 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
    396 /* A compiler attribute is available in gcc versions 4.3.0 and later.  */
    397 #  define _GL_WARN_ON_USE(function, message) \
    398 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
    399 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
    400 /* Verify the existence of the function.  */
    401 #  define _GL_WARN_ON_USE(function, message) \
    402 extern __typeof__ (function) function
    403 # else /* Unsupported.  */
    404 #  define _GL_WARN_ON_USE(function, message) \
    405 _GL_WARN_EXTERN_C int _gl_warn_on_use
    406 # endif
    407 #endif
    408 
    409 /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
    410    is like _GL_WARN_ON_USE (function, "string"), except that the function is
    411    declared with the given prototype, consisting of return type, parameters,
    412    and attributes.
    413    This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
    414    not work in this case.  */
    415 #ifndef _GL_WARN_ON_USE_CXX
    416 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
    417 #  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
    418 extern rettype function parameters_and_attributes \
    419      __attribute__ ((__warning__ (msg)))
    420 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
    421 /* Verify the existence of the function.  */
    422 #  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
    423 extern rettype function parameters_and_attributes
    424 # else /* Unsupported.  */
    425 #  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
    426 _GL_WARN_EXTERN_C int _gl_warn_on_use
    427 # endif
    428 #endif
    429 
    430 /* _GL_WARN_EXTERN_C declaration;
    431    performs the declaration with C linkage.  */
    432 #ifndef _GL_WARN_EXTERN_C
    433 # if defined __cplusplus
    434 #  define _GL_WARN_EXTERN_C extern "C"
    435 # else
    436 #  define _GL_WARN_EXTERN_C extern
    437 # endif
    438 #endif
    439 
    440 /* Macros for stringification.  */
    441 #define _GL_STDIO_STRINGIZE(token) #token
    442 #define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token)
    443 
    444 
    445 #if 0
    446 # if 0
    447 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    448 #   define dprintf rpl_dprintf
    449 #  endif
    450 _GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *format, ...)
    451                                 _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
    452                                 _GL_ARG_NONNULL ((2)));
    453 _GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *format, ...));
    454 # else
    455 #  if !1
    456 _GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *format, ...)
    457                                 _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
    458                                 _GL_ARG_NONNULL ((2)));
    459 #  endif
    460 _GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *format, ...));
    461 # endif
    462 _GL_CXXALIASWARN (dprintf);
    463 #elif defined GNULIB_POSIXCHECK
    464 # undef dprintf
    465 # if HAVE_RAW_DECL_DPRINTF
    466 _GL_WARN_ON_USE (dprintf, "dprintf is unportable - "
    467                  "use gnulib module dprintf for portability");
    468 # endif
    469 #endif
    470 
    471 #if 0
    472 /* Close STREAM and its underlying file descriptor.  */
    473 # if 0
    474 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    475 #   define fclose rpl_fclose
    476 #  endif
    477 _GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
    478 _GL_CXXALIAS_RPL (fclose, int, (FILE *stream));
    479 # else
    480 _GL_CXXALIAS_SYS (fclose, int, (FILE *stream));
    481 # endif
    482 _GL_CXXALIASWARN (fclose);
    483 #elif defined GNULIB_POSIXCHECK
    484 # undef fclose
    485 /* Assume fclose is always declared.  */
    486 _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - "
    487                  "use gnulib module fclose for portable POSIX compliance");
    488 #endif
    489 
    490 #if 0
    491 # if 0
    492 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    493 #   undef fdopen
    494 #   define fdopen rpl_fdopen
    495 #  endif
    496 _GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode)
    497                                   _GL_ARG_NONNULL ((2)));
    498 _GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode));
    499 # else
    500 _GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode));
    501 # endif
    502 _GL_CXXALIASWARN (fdopen);
    503 #elif defined GNULIB_POSIXCHECK
    504 # undef fdopen
    505 /* Assume fdopen is always declared.  */
    506 _GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - "
    507                  "use gnulib module fdopen for portability");
    508 #endif
    509 
    510 #if 0
    511 /* Flush all pending data on STREAM according to POSIX rules.  Both
    512    output and seekable input streams are supported.
    513    Note! LOSS OF DATA can occur if fflush is applied on an input stream
    514    that is _not_seekable_ or on an update stream that is _not_seekable_
    515    and in which the most recent operation was input.  Seekability can
    516    be tested with lseek(fileno(fp),0,SEEK_CUR).  */
    517 # if 0
    518 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    519 #   define fflush rpl_fflush
    520 #  endif
    521 _GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream));
    522 _GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream));
    523 # else
    524 _GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream));
    525 # endif
    526 _GL_CXXALIASWARN (fflush);
    527 #elif defined GNULIB_POSIXCHECK
    528 # undef fflush
    529 /* Assume fflush is always declared.  */
    530 _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - "
    531                  "use gnulib module fflush for portable POSIX compliance");
    532 #endif
    533 
    534 #if 1
    535 # if 0 && 0
    536 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    537 #   undef fgetc
    538 #   define fgetc rpl_fgetc
    539 #  endif
    540 _GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
    541 _GL_CXXALIAS_RPL (fgetc, int, (FILE *stream));
    542 # else
    543 _GL_CXXALIAS_SYS (fgetc, int, (FILE *stream));
    544 # endif
    545 _GL_CXXALIASWARN (fgetc);
    546 #endif
    547 
    548 #if 1
    549 # if 0 && 0
    550 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    551 #   undef fgets
    552 #   define fgets rpl_fgets
    553 #  endif
    554 _GL_FUNCDECL_RPL (fgets, char *, (char *s, int n, FILE *stream)
    555                                  _GL_ARG_NONNULL ((1, 3)));
    556 _GL_CXXALIAS_RPL (fgets, char *, (char *s, int n, FILE *stream));
    557 # else
    558 _GL_CXXALIAS_SYS (fgets, char *, (char *s, int n, FILE *stream));
    559 # endif
    560 _GL_CXXALIASWARN (fgets);
    561 #endif
    562 
    563 #if 1
    564 # if 0
    565 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    566 #   undef fopen
    567 #   define fopen rpl_fopen
    568 #  endif
    569 _GL_FUNCDECL_RPL (fopen, FILE *, (const char *filename, const char *mode)
    570                                  _GL_ARG_NONNULL ((1, 2)));
    571 _GL_CXXALIAS_RPL (fopen, FILE *, (const char *filename, const char *mode));
    572 # else
    573 _GL_CXXALIAS_SYS (fopen, FILE *, (const char *filename, const char *mode));
    574 # endif
    575 _GL_CXXALIASWARN (fopen);
    576 #elif defined GNULIB_POSIXCHECK
    577 # undef fopen
    578 /* Assume fopen is always declared.  */
    579 _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - "
    580                  "use gnulib module fopen for portability");
    581 #endif
    582 
    583 #if 1 || 1
    584 # if (1 && 1) \
    585      || (1 && 0 && (0 || 0))
    586 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    587 #   define fprintf rpl_fprintf
    588 #  endif
    589 #  define GNULIB_overrides_fprintf 1
    590 #  if 1 || 1
    591 _GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...)
    592                                 _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
    593                                 _GL_ARG_NONNULL ((1, 2)));
    594 #  else
    595 _GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...)
    596                                 _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3)
    597                                 _GL_ARG_NONNULL ((1, 2)));
    598 #  endif
    599 _GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...));
    600 # else
    601 _GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...));
    602 # endif
    603 _GL_CXXALIASWARN (fprintf);
    604 #endif
    605 #if !1 && defined GNULIB_POSIXCHECK
    606 # if !GNULIB_overrides_fprintf
    607 #  undef fprintf
    608 # endif
    609 /* Assume fprintf is always declared.  */
    610 _GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - "
    611                  "use gnulib module fprintf-posix for portable "
    612                  "POSIX compliance");
    613 #endif
    614 
    615 #if 0
    616 /* Discard all pending buffered I/O data on STREAM.
    617    STREAM must not be wide-character oriented.
    618    When discarding pending output, the file position is set back to where it
    619    was before the write calls.  When discarding pending input, the file
    620    position is advanced to match the end of the previously read input.
    621    Return 0 if successful.  Upon error, return -1 and set errno.  */
    622 # if 0
    623 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    624 #   define fpurge rpl_fpurge
    625 #  endif
    626 _GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1)));
    627 _GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream));
    628 # else
    629 #  if !1
    630 _GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1)));
    631 #  endif
    632 _GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream));
    633 # endif
    634 _GL_CXXALIASWARN (fpurge);
    635 #elif defined GNULIB_POSIXCHECK
    636 # undef fpurge
    637 # if HAVE_RAW_DECL_FPURGE
    638 _GL_WARN_ON_USE (fpurge, "fpurge is not always present - "
    639                  "use gnulib module fpurge for portability");
    640 # endif
    641 #endif
    642 
    643 #if 1
    644 # if 0 && (0 || 0)
    645 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    646 #   undef fputc
    647 #   define fputc rpl_fputc
    648 #  endif
    649 _GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2)));
    650 _GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream));
    651 # else
    652 _GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream));
    653 # endif
    654 _GL_CXXALIASWARN (fputc);
    655 #endif
    656 
    657 #if 1
    658 # if 0 && (0 || 0)
    659 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    660 #   undef fputs
    661 #   define fputs rpl_fputs
    662 #  endif
    663 _GL_FUNCDECL_RPL (fputs, int, (const char *string, FILE *stream)
    664                               _GL_ARG_NONNULL ((1, 2)));
    665 _GL_CXXALIAS_RPL (fputs, int, (const char *string, FILE *stream));
    666 # else
    667 _GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream));
    668 # endif
    669 _GL_CXXALIASWARN (fputs);
    670 #endif
    671 
    672 #if 1
    673 # if 0 && 0
    674 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    675 #   undef fread
    676 #   define fread rpl_fread
    677 #  endif
    678 _GL_FUNCDECL_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream)
    679                                  _GL_ARG_NONNULL ((4)));
    680 _GL_CXXALIAS_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream));
    681 # else
    682 _GL_CXXALIAS_SYS (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream));
    683 # endif
    684 _GL_CXXALIASWARN (fread);
    685 #endif
    686 
    687 #if 0
    688 # if 0
    689 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    690 #   undef freopen
    691 #   define freopen rpl_freopen
    692 #  endif
    693 _GL_FUNCDECL_RPL (freopen, FILE *,
    694                   (const char *filename, const char *mode, FILE *stream)
    695                   _GL_ARG_NONNULL ((2, 3)));
    696 _GL_CXXALIAS_RPL (freopen, FILE *,
    697                   (const char *filename, const char *mode, FILE *stream));
    698 # else
    699 _GL_CXXALIAS_SYS (freopen, FILE *,
    700                   (const char *filename, const char *mode, FILE *stream));
    701 # endif
    702 _GL_CXXALIASWARN (freopen);
    703 #elif defined GNULIB_POSIXCHECK
    704 # undef freopen
    705 /* Assume freopen is always declared.  */
    706 _GL_WARN_ON_USE (freopen,
    707                  "freopen on native Windows platforms is not POSIX compliant - "
    708                  "use gnulib module freopen for portability");
    709 #endif
    710 
    711 #if 1
    712 # if 0 && 0
    713 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    714 #   undef fscanf
    715 #   define fscanf rpl_fscanf
    716 #  endif
    717 _GL_FUNCDECL_RPL (fscanf, int, (FILE *stream, const char *format, ...)
    718                                _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3)
    719                                _GL_ARG_NONNULL ((1, 2)));
    720 _GL_CXXALIAS_RPL (fscanf, int, (FILE *stream, const char *format, ...));
    721 # else
    722 _GL_CXXALIAS_SYS (fscanf, int, (FILE *stream, const char *format, ...));
    723 # endif
    724 _GL_CXXALIASWARN (fscanf);
    725 #endif
    726 
    727 
    728 /* Set up the following warnings, based on which modules are in use.
    729    GNU Coding Standards discourage the use of fseek, since it imposes
    730    an arbitrary limitation on some 32-bit hosts.  Remember that the
    731    fseek module depends on the fseeko module, so we only have three
    732    cases to consider:
    733 
    734    1. The developer is not using either module.  Issue a warning under
    735    GNULIB_POSIXCHECK for both functions, to remind them that both
    736    functions have bugs on some systems.  _GL_NO_LARGE_FILES has no
    737    impact on this warning.
    738 
    739    2. The developer is using both modules.  They may be unaware of the
    740    arbitrary limitations of fseek, so issue a warning under
    741    GNULIB_POSIXCHECK.  On the other hand, they may be using both
    742    modules intentionally, so the developer can define
    743    _GL_NO_LARGE_FILES in the compilation units where the use of fseek
    744    is safe, to silence the warning.
    745 
    746    3. The developer is using the fseeko module, but not fseek.  Gnulib
    747    guarantees that fseek will still work around platform bugs in that
    748    case, but we presume that the developer is aware of the pitfalls of
    749    fseek and was trying to avoid it, so issue a warning even when
    750    GNULIB_POSIXCHECK is undefined.  Again, _GL_NO_LARGE_FILES can be
    751    defined to silence the warning in particular compilation units.
    752    In C++ compilations with GNULIB_NAMESPACE, in order to avoid that
    753    fseek gets defined as a macro, it is recommended that the developer
    754    uses the fseek module, even if he is not calling the fseek function.
    755 
    756    Most gnulib clients that perform stream operations should fall into
    757    category 3.  */
    758 
    759 #if 0
    760 # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES
    761 #  define _GL_FSEEK_WARN /* Category 2, above.  */
    762 #  undef fseek
    763 # endif
    764 # if 0
    765 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    766 #   undef fseek
    767 #   define fseek rpl_fseek
    768 #  endif
    769 _GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence)
    770                               _GL_ARG_NONNULL ((1)));
    771 _GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence));
    772 # else
    773 _GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence));
    774 # endif
    775 _GL_CXXALIASWARN (fseek);
    776 #endif
    777 
    778 #if 0
    779 # if !0 && !defined _GL_NO_LARGE_FILES
    780 #  define _GL_FSEEK_WARN /* Category 3, above.  */
    781 #  undef fseek
    782 # endif
    783 # if 0
    784 /* Provide an fseeko function that is aware of a preceding fflush(), and which
    785    detects pipes.  */
    786 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    787 #   undef fseeko
    788 #   define fseeko rpl_fseeko
    789 #  endif
    790 _GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)
    791                                _GL_ARG_NONNULL ((1)));
    792 _GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence));
    793 # else
    794 #  if ! 1
    795 _GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)
    796                                _GL_ARG_NONNULL ((1)));
    797 #  endif
    798 _GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence));
    799 # endif
    800 _GL_CXXALIASWARN (fseeko);
    801 #elif defined GNULIB_POSIXCHECK
    802 # define _GL_FSEEK_WARN /* Category 1, above.  */
    803 # undef fseek
    804 # undef fseeko
    805 # if HAVE_RAW_DECL_FSEEKO
    806 _GL_WARN_ON_USE (fseeko, "fseeko is unportable - "
    807                  "use gnulib module fseeko for portability");
    808 # endif
    809 #endif
    810 
    811 #ifdef _GL_FSEEK_WARN
    812 # undef _GL_FSEEK_WARN
    813 /* Here, either fseek is undefined (but C89 guarantees that it is
    814    declared), or it is defined as rpl_fseek (declared above).  */
    815 _GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB "
    816                  "on 32-bit platforms - "
    817                  "use fseeko function for handling of large files");
    818 #endif
    819 
    820 
    821 /* ftell, ftello.  See the comments on fseek/fseeko.  */
    822 
    823 #if 0
    824 # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES
    825 #  define _GL_FTELL_WARN /* Category 2, above.  */
    826 #  undef ftell
    827 # endif
    828 # if 0
    829 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    830 #   undef ftell
    831 #   define ftell rpl_ftell
    832 #  endif
    833 _GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1)));
    834 _GL_CXXALIAS_RPL (ftell, long, (FILE *fp));
    835 # else
    836 _GL_CXXALIAS_SYS (ftell, long, (FILE *fp));
    837 # endif
    838 _GL_CXXALIASWARN (ftell);
    839 #endif
    840 
    841 #if 0
    842 # if !0 && !defined _GL_NO_LARGE_FILES
    843 #  define _GL_FTELL_WARN /* Category 3, above.  */
    844 #  undef ftell
    845 # endif
    846 # if 0
    847 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    848 #   undef ftello
    849 #   define ftello rpl_ftello
    850 #  endif
    851 _GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1)));
    852 _GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp));
    853 # else
    854 #  if ! 1
    855 _GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1)));
    856 #  endif
    857 _GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp));
    858 # endif
    859 _GL_CXXALIASWARN (ftello);
    860 #elif defined GNULIB_POSIXCHECK
    861 # define _GL_FTELL_WARN /* Category 1, above.  */
    862 # undef ftell
    863 # undef ftello
    864 # if HAVE_RAW_DECL_FTELLO
    865 _GL_WARN_ON_USE (ftello, "ftello is unportable - "
    866                  "use gnulib module ftello for portability");
    867 # endif
    868 #endif
    869 
    870 #ifdef _GL_FTELL_WARN
    871 # undef _GL_FTELL_WARN
    872 /* Here, either ftell is undefined (but C89 guarantees that it is
    873    declared), or it is defined as rpl_ftell (declared above).  */
    874 _GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB "
    875                  "on 32-bit platforms - "
    876                  "use ftello function for handling of large files");
    877 #endif
    878 
    879 
    880 #if 1
    881 # if 0 && (0 || 0)
    882 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    883 #   undef fwrite
    884 #   define fwrite rpl_fwrite
    885 #  endif
    886 _GL_FUNCDECL_RPL (fwrite, size_t,
    887                   (const void *ptr, size_t s, size_t n, FILE *stream)
    888                   _GL_ARG_NONNULL ((1, 4)));
    889 _GL_CXXALIAS_RPL (fwrite, size_t,
    890                   (const void *ptr, size_t s, size_t n, FILE *stream));
    891 # else
    892 _GL_CXXALIAS_SYS (fwrite, size_t,
    893                   (const void *ptr, size_t s, size_t n, FILE *stream));
    894 
    895 /* Work around glibc bug 11959
    896    <http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>,
    897    which sometimes causes an unwanted diagnostic for fwrite calls.
    898    This affects only function declaration attributes, so it's not
    899    needed for C++.  */
    900 #  if !defined __cplusplus && 0 < __USE_FORTIFY_LEVEL
    901 _GL_STDIO_INLINE size_t _GL_ARG_NONNULL ((1, 4))
    902 rpl_fwrite (const void *ptr, size_t s, size_t n, FILE *stream)
    903 {
    904   size_t r = fwrite (ptr, s, n, stream);
    905   (void) r;
    906   return r;
    907 }
    908 #   undef fwrite
    909 #   define fwrite rpl_fwrite
    910 #  endif
    911 # endif
    912 _GL_CXXALIASWARN (fwrite);
    913 #endif
    914 
    915 #if 1
    916 # if 0 && 0
    917 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    918 #   undef getc
    919 #   define getc rpl_fgetc
    920 #  endif
    921 _GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
    922 _GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream));
    923 # else
    924 _GL_CXXALIAS_SYS (getc, int, (FILE *stream));
    925 # endif
    926 _GL_CXXALIASWARN (getc);
    927 #endif
    928 
    929 #if 1
    930 # if 0 && 0
    931 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    932 #   undef getchar
    933 #   define getchar rpl_getchar
    934 #  endif
    935 _GL_FUNCDECL_RPL (getchar, int, (void));
    936 _GL_CXXALIAS_RPL (getchar, int, (void));
    937 # else
    938 _GL_CXXALIAS_SYS (getchar, int, (void));
    939 # endif
    940 _GL_CXXALIASWARN (getchar);
    941 #endif
    942 
    943 #if 1
    944 /* Read input, up to (and including) the next occurrence of DELIMITER, from
    945    STREAM, store it in *LINEPTR (and NUL-terminate it).
    946    *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE
    947    bytes of space.  It is realloc'd as necessary.
    948    Return the number of bytes read and stored at *LINEPTR (not including the
    949    NUL terminator), or -1 on error or EOF.  */
    950 # if 0
    951 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    952 #   undef getdelim
    953 #   define getdelim rpl_getdelim
    954 #  endif
    955 _GL_FUNCDECL_RPL (getdelim, ssize_t,
    956                   (char **lineptr, size_t *linesize, int delimiter,
    957                    FILE *stream)
    958                   _GL_ARG_NONNULL ((1, 2, 4)));
    959 _GL_CXXALIAS_RPL (getdelim, ssize_t,
    960                   (char **lineptr, size_t *linesize, int delimiter,
    961                    FILE *stream));
    962 # else
    963 #  if !1
    964 _GL_FUNCDECL_SYS (getdelim, ssize_t,
    965                   (char **lineptr, size_t *linesize, int delimiter,
    966                    FILE *stream)
    967                   _GL_ARG_NONNULL ((1, 2, 4)));
    968 #  endif
    969 _GL_CXXALIAS_SYS (getdelim, ssize_t,
    970                   (char **lineptr, size_t *linesize, int delimiter,
    971                    FILE *stream));
    972 # endif
    973 _GL_CXXALIASWARN (getdelim);
    974 #elif defined GNULIB_POSIXCHECK
    975 # undef getdelim
    976 # if HAVE_RAW_DECL_GETDELIM
    977 _GL_WARN_ON_USE (getdelim, "getdelim is unportable - "
    978                  "use gnulib module getdelim for portability");
    979 # endif
    980 #endif
    981 
    982 #if 1
    983 /* Read a line, up to (and including) the next newline, from STREAM, store it
    984    in *LINEPTR (and NUL-terminate it).
    985    *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE
    986    bytes of space.  It is realloc'd as necessary.
    987    Return the number of bytes read and stored at *LINEPTR (not including the
    988    NUL terminator), or -1 on error or EOF.  */
    989 # if 0
    990 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    991 #   undef getline
    992 #   define getline rpl_getline
    993 #  endif
    994 _GL_FUNCDECL_RPL (getline, ssize_t,
    995                   (char **lineptr, size_t *linesize, FILE *stream)
    996                   _GL_ARG_NONNULL ((1, 2, 3)));
    997 _GL_CXXALIAS_RPL (getline, ssize_t,
    998                   (char **lineptr, size_t *linesize, FILE *stream));
    999 # else
   1000 #  if !1
   1001 _GL_FUNCDECL_SYS (getline, ssize_t,
   1002                   (char **lineptr, size_t *linesize, FILE *stream)
   1003                   _GL_ARG_NONNULL ((1, 2, 3)));
   1004 #  endif
   1005 _GL_CXXALIAS_SYS (getline, ssize_t,
   1006                   (char **lineptr, size_t *linesize, FILE *stream));
   1007 # endif
   1008 # if 1
   1009 _GL_CXXALIASWARN (getline);
   1010 # endif
   1011 #elif defined GNULIB_POSIXCHECK
   1012 # undef getline
   1013 # if HAVE_RAW_DECL_GETLINE
   1014 _GL_WARN_ON_USE (getline, "getline is unportable - "
   1015                  "use gnulib module getline for portability");
   1016 # endif
   1017 #endif
   1018 
   1019 /* It is very rare that the developer ever has full control of stdin,
   1020    so any use of gets warrants an unconditional warning; besides, C11
   1021    removed it.  */
   1022 #undef gets
   1023 #if HAVE_RAW_DECL_GETS
   1024 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
   1025 #endif
   1026 
   1027 
   1028 #if 1 || 0
   1029 struct obstack;
   1030 /* Grow an obstack with formatted output.  Return the number of
   1031    bytes added to OBS.  No trailing nul byte is added, and the
   1032    object should be closed with obstack_finish before use.  Upon
   1033    memory allocation error, call obstack_alloc_failed_handler.  Upon
   1034    other error, return -1.  */
   1035 # if 0
   1036 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1037 #   define obstack_printf rpl_obstack_printf
   1038 #  endif
   1039 _GL_FUNCDECL_RPL (obstack_printf, int,
   1040                   (struct obstack *obs, const char *format, ...)
   1041                   _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
   1042                   _GL_ARG_NONNULL ((1, 2)));
   1043 _GL_CXXALIAS_RPL (obstack_printf, int,
   1044                   (struct obstack *obs, const char *format, ...));
   1045 # else
   1046 #  if !1
   1047 _GL_FUNCDECL_SYS (obstack_printf, int,
   1048                   (struct obstack *obs, const char *format, ...)
   1049                   _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
   1050                   _GL_ARG_NONNULL ((1, 2)));
   1051 #  endif
   1052 _GL_CXXALIAS_SYS (obstack_printf, int,
   1053                   (struct obstack *obs, const char *format, ...));
   1054 # endif
   1055 _GL_CXXALIASWARN (obstack_printf);
   1056 # if 0
   1057 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1058 #   define obstack_vprintf rpl_obstack_vprintf
   1059 #  endif
   1060 _GL_FUNCDECL_RPL (obstack_vprintf, int,
   1061                   (struct obstack *obs, const char *format, va_list args)
   1062                   _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
   1063                   _GL_ARG_NONNULL ((1, 2)));
   1064 _GL_CXXALIAS_RPL (obstack_vprintf, int,
   1065                   (struct obstack *obs, const char *format, va_list args));
   1066 # else
   1067 #  if !1
   1068 _GL_FUNCDECL_SYS (obstack_vprintf, int,
   1069                   (struct obstack *obs, const char *format, va_list args)
   1070                   _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
   1071                   _GL_ARG_NONNULL ((1, 2)));
   1072 #  endif
   1073 _GL_CXXALIAS_SYS (obstack_vprintf, int,
   1074                   (struct obstack *obs, const char *format, va_list args));
   1075 # endif
   1076 _GL_CXXALIASWARN (obstack_vprintf);
   1077 #endif
   1078 
   1079 #if 0
   1080 # if !1
   1081 _GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
   1082 # endif
   1083 _GL_CXXALIAS_SYS (pclose, int, (FILE *stream));
   1084 _GL_CXXALIASWARN (pclose);
   1085 #elif defined GNULIB_POSIXCHECK
   1086 # undef pclose
   1087 # if HAVE_RAW_DECL_PCLOSE
   1088 _GL_WARN_ON_USE (pclose, "pclose is unportable - "
   1089                  "use gnulib module pclose for more portability");
   1090 # endif
   1091 #endif
   1092 
   1093 #if 1
   1094 /* Print a message to standard error, describing the value of ERRNO,
   1095    (if STRING is not NULL and not empty) prefixed with STRING and ": ",
   1096    and terminated with a newline.  */
   1097 # if 0
   1098 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1099 #   define perror rpl_perror
   1100 #  endif
   1101 _GL_FUNCDECL_RPL (perror, void, (const char *string));
   1102 _GL_CXXALIAS_RPL (perror, void, (const char *string));
   1103 # else
   1104 _GL_CXXALIAS_SYS (perror, void, (const char *string));
   1105 # endif
   1106 _GL_CXXALIASWARN (perror);
   1107 #elif defined GNULIB_POSIXCHECK
   1108 # undef perror
   1109 /* Assume perror is always declared.  */
   1110 _GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - "
   1111                  "use gnulib module perror for portability");
   1112 #endif
   1113 
   1114 #if 0
   1115 # if 0
   1116 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1117 #   undef popen
   1118 #   define popen rpl_popen
   1119 #  endif
   1120 _GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode)
   1121                                  _GL_ARG_NONNULL ((1, 2)));
   1122 _GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode));
   1123 # else
   1124 #  if !1
   1125 _GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode)
   1126                                  _GL_ARG_NONNULL ((1, 2)));
   1127 #  endif
   1128 _GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode));
   1129 # endif
   1130 _GL_CXXALIASWARN (popen);
   1131 #elif defined GNULIB_POSIXCHECK
   1132 # undef popen
   1133 # if HAVE_RAW_DECL_POPEN
   1134 _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - "
   1135                  "use gnulib module popen or pipe for more portability");
   1136 # endif
   1137 #endif
   1138 
   1139 #if 1 || 1
   1140 # if (1 && 1) \
   1141      || (1 && 0 && (0 || 0))
   1142 #  if defined __GNUC__
   1143 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1144 /* Don't break __attribute__((format(printf,M,N))).  */
   1145 #    define printf __printf__
   1146 #   endif
   1147 #   if 1 || 1
   1148 _GL_FUNCDECL_RPL_1 (__printf__, int,
   1149                     (const char *format, ...)
   1150                     __asm__ (""
   1151                              _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf))
   1152                     _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2)
   1153                     _GL_ARG_NONNULL ((1)));
   1154 #   else
   1155 _GL_FUNCDECL_RPL_1 (__printf__, int,
   1156                     (const char *format, ...)
   1157                     __asm__ (""
   1158                              _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf))
   1159                     _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2)
   1160                     _GL_ARG_NONNULL ((1)));
   1161 #   endif
   1162 _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...));
   1163 #  else
   1164 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1165 #    define printf rpl_printf
   1166 #   endif
   1167 _GL_FUNCDECL_RPL (printf, int,
   1168                   (const char *format, ...)
   1169                   _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2)
   1170                   _GL_ARG_NONNULL ((1)));
   1171 _GL_CXXALIAS_RPL (printf, int, (const char *format, ...));
   1172 #  endif
   1173 #  define GNULIB_overrides_printf 1
   1174 # else
   1175 _GL_CXXALIAS_SYS (printf, int, (const char *format, ...));
   1176 # endif
   1177 _GL_CXXALIASWARN (printf);
   1178 #endif
   1179 #if !1 && defined GNULIB_POSIXCHECK
   1180 # if !GNULIB_overrides_printf
   1181 #  undef printf
   1182 # endif
   1183 /* Assume printf is always declared.  */
   1184 _GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - "
   1185                  "use gnulib module printf-posix for portable "
   1186                  "POSIX compliance");
   1187 #endif
   1188 
   1189 #if 1
   1190 # if 0 && (0 || 0)
   1191 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1192 #   undef putc
   1193 #   define putc rpl_fputc
   1194 #  endif
   1195 _GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2)));
   1196 _GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream));
   1197 # else
   1198 _GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream));
   1199 # endif
   1200 _GL_CXXALIASWARN (putc);
   1201 #endif
   1202 
   1203 #if 1
   1204 # if 0 && (0 || 0)
   1205 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1206 #   undef putchar
   1207 #   define putchar rpl_putchar
   1208 #  endif
   1209 _GL_FUNCDECL_RPL (putchar, int, (int c));
   1210 _GL_CXXALIAS_RPL (putchar, int, (int c));
   1211 # else
   1212 _GL_CXXALIAS_SYS (putchar, int, (int c));
   1213 # endif
   1214 _GL_CXXALIASWARN (putchar);
   1215 #endif
   1216 
   1217 #if 1
   1218 # if 0 && (0 || 0)
   1219 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1220 #   undef puts
   1221 #   define puts rpl_puts
   1222 #  endif
   1223 _GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1)));
   1224 _GL_CXXALIAS_RPL (puts, int, (const char *string));
   1225 # else
   1226 _GL_CXXALIAS_SYS (puts, int, (const char *string));
   1227 # endif
   1228 _GL_CXXALIASWARN (puts);
   1229 #endif
   1230 
   1231 #if 0
   1232 # if 0
   1233 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1234 #   undef remove
   1235 #   define remove rpl_remove
   1236 #  endif
   1237 _GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1)));
   1238 _GL_CXXALIAS_RPL (remove, int, (const char *name));
   1239 # else
   1240 _GL_CXXALIAS_SYS (remove, int, (const char *name));
   1241 # endif
   1242 _GL_CXXALIASWARN (remove);
   1243 #elif defined GNULIB_POSIXCHECK
   1244 # undef remove
   1245 /* Assume remove is always declared.  */
   1246 _GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - "
   1247                  "use gnulib module remove for more portability");
   1248 #endif
   1249 
   1250 #if 0
   1251 # if 0
   1252 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1253 #   undef rename
   1254 #   define rename rpl_rename
   1255 #  endif
   1256 _GL_FUNCDECL_RPL (rename, int,
   1257                   (const char *old_filename, const char *new_filename)
   1258                   _GL_ARG_NONNULL ((1, 2)));
   1259 _GL_CXXALIAS_RPL (rename, int,
   1260                   (const char *old_filename, const char *new_filename));
   1261 # else
   1262 _GL_CXXALIAS_SYS (rename, int,
   1263                   (const char *old_filename, const char *new_filename));
   1264 # endif
   1265 _GL_CXXALIASWARN (rename);
   1266 #elif defined GNULIB_POSIXCHECK
   1267 # undef rename
   1268 /* Assume rename is always declared.  */
   1269 _GL_WARN_ON_USE (rename, "rename is buggy on some platforms - "
   1270                  "use gnulib module rename for more portability");
   1271 #endif
   1272 
   1273 #if 0
   1274 # if 0
   1275 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1276 #   undef renameat
   1277 #   define renameat rpl_renameat
   1278 #  endif
   1279 _GL_FUNCDECL_RPL (renameat, int,
   1280                   (int fd1, char const *file1, int fd2, char const *file2)
   1281                   _GL_ARG_NONNULL ((2, 4)));
   1282 _GL_CXXALIAS_RPL (renameat, int,
   1283                   (int fd1, char const *file1, int fd2, char const *file2));
   1284 # else
   1285 #  if !1
   1286 _GL_FUNCDECL_SYS (renameat, int,
   1287                   (int fd1, char const *file1, int fd2, char const *file2)
   1288                   _GL_ARG_NONNULL ((2, 4)));
   1289 #  endif
   1290 _GL_CXXALIAS_SYS (renameat, int,
   1291                   (int fd1, char const *file1, int fd2, char const *file2));
   1292 # endif
   1293 _GL_CXXALIASWARN (renameat);
   1294 #elif defined GNULIB_POSIXCHECK
   1295 # undef renameat
   1296 # if HAVE_RAW_DECL_RENAMEAT
   1297 _GL_WARN_ON_USE (renameat, "renameat is not portable - "
   1298                  "use gnulib module renameat for portability");
   1299 # endif
   1300 #endif
   1301 
   1302 #if 1
   1303 # if 0 && 0
   1304 #  if defined __GNUC__
   1305 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1306 #    undef scanf
   1307 /* Don't break __attribute__((format(scanf,M,N))).  */
   1308 #    define scanf __scanf__
   1309 #   endif
   1310 _GL_FUNCDECL_RPL_1 (__scanf__, int,
   1311                     (const char *format, ...)
   1312                     __asm__ (""
   1313                              _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf))
   1314                     _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2)
   1315                     _GL_ARG_NONNULL ((1)));
   1316 _GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *format, ...));
   1317 #  else
   1318 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1319 #    undef scanf
   1320 #    define scanf rpl_scanf
   1321 #   endif
   1322 _GL_FUNCDECL_RPL (scanf, int, (const char *format, ...)
   1323                               _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2)
   1324                               _GL_ARG_NONNULL ((1)));
   1325 _GL_CXXALIAS_RPL (scanf, int, (const char *format, ...));
   1326 #  endif
   1327 # else
   1328 _GL_CXXALIAS_SYS (scanf, int, (const char *format, ...));
   1329 # endif
   1330 _GL_CXXALIASWARN (scanf);
   1331 #endif
   1332 
   1333 #if 1
   1334 # if 1
   1335 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1336 #   define snprintf rpl_snprintf
   1337 #  endif
   1338 _GL_FUNCDECL_RPL (snprintf, int,
   1339                   (char *str, size_t size, const char *format, ...)
   1340                   _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4)
   1341                   _GL_ARG_NONNULL ((3)));
   1342 _GL_CXXALIAS_RPL (snprintf, int,
   1343                   (char *str, size_t size, const char *format, ...));
   1344 # else
   1345 #  if !1
   1346 _GL_FUNCDECL_SYS (snprintf, int,
   1347                   (char *str, size_t size, const char *format, ...)
   1348                   _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4)
   1349                   _GL_ARG_NONNULL ((3)));
   1350 #  endif
   1351 _GL_CXXALIAS_SYS (snprintf, int,
   1352                   (char *str, size_t size, const char *format, ...));
   1353 # endif
   1354 _GL_CXXALIASWARN (snprintf);
   1355 #elif defined GNULIB_POSIXCHECK
   1356 # undef snprintf
   1357 # if HAVE_RAW_DECL_SNPRINTF
   1358 _GL_WARN_ON_USE (snprintf, "snprintf is unportable - "
   1359                  "use gnulib module snprintf for portability");
   1360 # endif
   1361 #endif
   1362 
   1363 /* Some people would argue that all sprintf uses should be warned about
   1364    (for example, OpenBSD issues a link warning for it),
   1365    since it can cause security holes due to buffer overruns.
   1366    However, we believe that sprintf can be used safely, and is more
   1367    efficient than snprintf in those safe cases; and as proof of our
   1368    belief, we use sprintf in several gnulib modules.  So this header
   1369    intentionally avoids adding a warning to sprintf except when
   1370    GNULIB_POSIXCHECK is defined.  */
   1371 
   1372 #if 1
   1373 # if 1
   1374 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1375 #   define sprintf rpl_sprintf
   1376 #  endif
   1377 _GL_FUNCDECL_RPL (sprintf, int, (char *str, const char *format, ...)
   1378                                 _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
   1379                                 _GL_ARG_NONNULL ((1, 2)));
   1380 _GL_CXXALIAS_RPL (sprintf, int, (char *str, const char *format, ...));
   1381 # else
   1382 _GL_CXXALIAS_SYS (sprintf, int, (char *str, const char *format, ...));
   1383 # endif
   1384 _GL_CXXALIASWARN (sprintf);
   1385 #elif defined GNULIB_POSIXCHECK
   1386 # undef sprintf
   1387 /* Assume sprintf is always declared.  */
   1388 _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - "
   1389                  "use gnulib module sprintf-posix for portable "
   1390                  "POSIX compliance");
   1391 #endif
   1392 
   1393 #if 0
   1394 # if 0
   1395 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1396 #   define tmpfile rpl_tmpfile
   1397 #  endif
   1398 _GL_FUNCDECL_RPL (tmpfile, FILE *, (void));
   1399 _GL_CXXALIAS_RPL (tmpfile, FILE *, (void));
   1400 # else
   1401 _GL_CXXALIAS_SYS (tmpfile, FILE *, (void));
   1402 # endif
   1403 _GL_CXXALIASWARN (tmpfile);
   1404 #elif defined GNULIB_POSIXCHECK
   1405 # undef tmpfile
   1406 # if HAVE_RAW_DECL_TMPFILE
   1407 _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - "
   1408                  "use gnulib module tmpfile for portability");
   1409 # endif
   1410 #endif
   1411 
   1412 #if 0
   1413 /* Write formatted output to a string dynamically allocated with malloc().
   1414    If the memory allocation succeeds, store the address of the string in
   1415    *RESULT and return the number of resulting bytes, excluding the trailing
   1416    NUL.  Upon memory allocation error, or some other error, return -1.  */
   1417 # if 0
   1418 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1419 #   define asprintf rpl_asprintf
   1420 #  endif
   1421 _GL_FUNCDECL_RPL (asprintf, int,
   1422                   (char **result, const char *format, ...)
   1423                   _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
   1424                   _GL_ARG_NONNULL ((1, 2)));
   1425 _GL_CXXALIAS_RPL (asprintf, int,
   1426                   (char **result, const char *format, ...));
   1427 # else
   1428 #  if !1
   1429 _GL_FUNCDECL_SYS (asprintf, int,
   1430                   (char **result, const char *format, ...)
   1431                   _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
   1432                   _GL_ARG_NONNULL ((1, 2)));
   1433 #  endif
   1434 _GL_CXXALIAS_SYS (asprintf, int,
   1435                   (char **result, const char *format, ...));
   1436 # endif
   1437 _GL_CXXALIASWARN (asprintf);
   1438 # if 0
   1439 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1440 #   define vasprintf rpl_vasprintf
   1441 #  endif
   1442 _GL_FUNCDECL_RPL (vasprintf, int,
   1443                   (char **result, const char *format, va_list args)
   1444                   _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
   1445                   _GL_ARG_NONNULL ((1, 2)));
   1446 _GL_CXXALIAS_RPL (vasprintf, int,
   1447                   (char **result, const char *format, va_list args));
   1448 # else
   1449 #  if !1
   1450 _GL_FUNCDECL_SYS (vasprintf, int,
   1451                   (char **result, const char *format, va_list args)
   1452                   _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
   1453                   _GL_ARG_NONNULL ((1, 2)));
   1454 #  endif
   1455 _GL_CXXALIAS_SYS (vasprintf, int,
   1456                   (char **result, const char *format, va_list args));
   1457 # endif
   1458 _GL_CXXALIASWARN (vasprintf);
   1459 #endif
   1460 
   1461 #if 0
   1462 # if 0
   1463 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1464 #   define vdprintf rpl_vdprintf
   1465 #  endif
   1466 _GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *format, va_list args)
   1467                                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
   1468                                  _GL_ARG_NONNULL ((2)));
   1469 _GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *format, va_list args));
   1470 # else
   1471 #  if !1
   1472 _GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *format, va_list args)
   1473                                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
   1474                                  _GL_ARG_NONNULL ((2)));
   1475 #  endif
   1476 /* Need to cast, because on Solaris, the third parameter will likely be
   1477                                                     __va_list args.  */
   1478 _GL_CXXALIAS_SYS_CAST (vdprintf, int,
   1479                        (int fd, const char *format, va_list args));
   1480 # endif
   1481 _GL_CXXALIASWARN (vdprintf);
   1482 #elif defined GNULIB_POSIXCHECK
   1483 # undef vdprintf
   1484 # if HAVE_RAW_DECL_VDPRINTF
   1485 _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - "
   1486                  "use gnulib module vdprintf for portability");
   1487 # endif
   1488 #endif
   1489 
   1490 #if 1 || 1
   1491 # if (1 && 1) \
   1492      || (1 && 0 && (0 || 0))
   1493 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1494 #   define vfprintf rpl_vfprintf
   1495 #  endif
   1496 #  define GNULIB_overrides_vfprintf 1
   1497 #  if 1
   1498 _GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)
   1499                                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
   1500                                  _GL_ARG_NONNULL ((1, 2)));
   1501 #  else
   1502 _GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)
   1503                                  _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0)
   1504                                  _GL_ARG_NONNULL ((1, 2)));
   1505 #  endif
   1506 _GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args));
   1507 # else
   1508 /* Need to cast, because on Solaris, the third parameter is
   1509                                                       __va_list args
   1510    and GCC's fixincludes did not change this to __gnuc_va_list.  */
   1511 _GL_CXXALIAS_SYS_CAST (vfprintf, int,
   1512                        (FILE *fp, const char *format, va_list args));
   1513 # endif
   1514 _GL_CXXALIASWARN (vfprintf);
   1515 #endif
   1516 #if !1 && defined GNULIB_POSIXCHECK
   1517 # if !GNULIB_overrides_vfprintf
   1518 #  undef vfprintf
   1519 # endif
   1520 /* Assume vfprintf is always declared.  */
   1521 _GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - "
   1522                  "use gnulib module vfprintf-posix for portable "
   1523                       "POSIX compliance");
   1524 #endif
   1525 
   1526 #if 0
   1527 # if 0 && 0
   1528 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1529 #   undef vfscanf
   1530 #   define vfscanf rpl_vfscanf
   1531 #  endif
   1532 _GL_FUNCDECL_RPL (vfscanf, int,
   1533                   (FILE *stream, const char *format, va_list args)
   1534                   _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0)
   1535                   _GL_ARG_NONNULL ((1, 2)));
   1536 _GL_CXXALIAS_RPL (vfscanf, int,
   1537                   (FILE *stream, const char *format, va_list args));
   1538 # else
   1539 _GL_CXXALIAS_SYS (vfscanf, int,
   1540                   (FILE *stream, const char *format, va_list args));
   1541 # endif
   1542 _GL_CXXALIASWARN (vfscanf);
   1543 #endif
   1544 
   1545 #if 0 || 1
   1546 # if (0 && 0) \
   1547      || (1 && 0 && (0 || 0))
   1548 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1549 #   define vprintf rpl_vprintf
   1550 #  endif
   1551 #  define GNULIB_overrides_vprintf 1
   1552 #  if 0 || 1
   1553 _GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args)
   1554                                 _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0)
   1555                                 _GL_ARG_NONNULL ((1)));
   1556 #  else
   1557 _GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args)
   1558                                 _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0)
   1559                                 _GL_ARG_NONNULL ((1)));
   1560 #  endif
   1561 _GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args));
   1562 # else
   1563 /* Need to cast, because on Solaris, the second parameter is
   1564                                                           __va_list args
   1565    and GCC's fixincludes did not change this to __gnuc_va_list.  */
   1566 _GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args));
   1567 # endif
   1568 _GL_CXXALIASWARN (vprintf);
   1569 #endif
   1570 #if !0 && defined GNULIB_POSIXCHECK
   1571 # if !GNULIB_overrides_vprintf
   1572 #  undef vprintf
   1573 # endif
   1574 /* Assume vprintf is always declared.  */
   1575 _GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - "
   1576                  "use gnulib module vprintf-posix for portable "
   1577                  "POSIX compliance");
   1578 #endif
   1579 
   1580 #if 0
   1581 # if 0 && 0
   1582 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1583 #   undef vscanf
   1584 #   define vscanf rpl_vscanf
   1585 #  endif
   1586 _GL_FUNCDECL_RPL (vscanf, int, (const char *format, va_list args)
   1587                                _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0)
   1588                                _GL_ARG_NONNULL ((1)));
   1589 _GL_CXXALIAS_RPL (vscanf, int, (const char *format, va_list args));
   1590 # else
   1591 _GL_CXXALIAS_SYS (vscanf, int, (const char *format, va_list args));
   1592 # endif
   1593 _GL_CXXALIASWARN (vscanf);
   1594 #endif
   1595 
   1596 #if 1
   1597 # if 1
   1598 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1599 #   define vsnprintf rpl_vsnprintf
   1600 #  endif
   1601 _GL_FUNCDECL_RPL (vsnprintf, int,
   1602                   (char *str, size_t size, const char *format, va_list args)
   1603                   _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0)
   1604                   _GL_ARG_NONNULL ((3)));
   1605 _GL_CXXALIAS_RPL (vsnprintf, int,
   1606                   (char *str, size_t size, const char *format, va_list args));
   1607 # else
   1608 #  if !1
   1609 _GL_FUNCDECL_SYS (vsnprintf, int,
   1610                   (char *str, size_t size, const char *format, va_list args)
   1611                   _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0)
   1612                   _GL_ARG_NONNULL ((3)));
   1613 #  endif
   1614 _GL_CXXALIAS_SYS (vsnprintf, int,
   1615                   (char *str, size_t size, const char *format, va_list args));
   1616 # endif
   1617 _GL_CXXALIASWARN (vsnprintf);
   1618 #elif defined GNULIB_POSIXCHECK
   1619 # undef vsnprintf
   1620 # if HAVE_RAW_DECL_VSNPRINTF
   1621 _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - "
   1622                  "use gnulib module vsnprintf for portability");
   1623 # endif
   1624 #endif
   1625 
   1626 #if 1
   1627 # if 1
   1628 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
   1629 #   define vsprintf rpl_vsprintf
   1630 #  endif
   1631 _GL_FUNCDECL_RPL (vsprintf, int,
   1632                   (char *str, const char *format, va_list args)
   1633                   _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
   1634                   _GL_ARG_NONNULL ((1, 2)));
   1635 _GL_CXXALIAS_RPL (vsprintf, int,
   1636                   (char *str, const char *format, va_list args));
   1637 # else
   1638 /* Need to cast, because on Solaris, the third parameter is
   1639                                                        __va_list args
   1640    and GCC's fixincludes did not change this to __gnuc_va_list.  */
   1641 _GL_CXXALIAS_SYS_CAST (vsprintf, int,
   1642                        (char *str, const char *format, va_list args));
   1643 # endif
   1644 _GL_CXXALIASWARN (vsprintf);
   1645 #elif defined GNULIB_POSIXCHECK
   1646 # undef vsprintf
   1647 /* Assume vsprintf is always declared.  */
   1648 _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - "
   1649                  "use gnulib module vsprintf-posix for portable "
   1650                       "POSIX compliance");
   1651 #endif
   1652 
   1653 _GL_INLINE_HEADER_END
   1654 
   1655 #endif /* _GL_STDIO_H */
   1656 #endif /* _GL_STDIO_H */
   1657 #endif
   1658