Blame gl/stdio.in.h

Packit Service 4684c1
/* A GNU-like <stdio.h>.
Packit Service 4684c1
Packit Service 4684c1
   Copyright (C) 2004, 2007-2020 Free Software Foundation, Inc.
Packit Service 4684c1
Packit Service 4684c1
   This program is free software; you can redistribute it and/or modify
Packit Service 4684c1
   it under the terms of the GNU Lesser General Public License as published by
Packit Service 4684c1
   the Free Software Foundation; either version 2.1, or (at your option)
Packit Service 4684c1
   any later version.
Packit Service 4684c1
Packit Service 4684c1
   This program is distributed in the hope that it will be useful,
Packit Service 4684c1
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 4684c1
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service 4684c1
   GNU Lesser General Public License for more details.
Packit Service 4684c1
Packit Service 4684c1
   You should have received a copy of the GNU Lesser General Public License
Packit Service 4684c1
   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
Packit Service 4684c1
Packit Service 4684c1
#if __GNUC__ >= 3
Packit Service 4684c1
@PRAGMA_SYSTEM_HEADER@
Packit Service 4684c1
#endif
Packit Service 4684c1
@PRAGMA_COLUMNS@
Packit Service 4684c1
Packit Service 4684c1
#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H
Packit Service 4684c1
/* Special invocation convention:
Packit Service 4684c1
   - Inside glibc header files.
Packit Service 4684c1
   - On OSF/1 5.1 we have a sequence of nested includes
Packit Service 4684c1
     <stdio.h> -> <getopt.h> -> <ctype.h> -> <sys/localedef.h> ->
Packit Service 4684c1
     <sys/lc_core.h> -> <nl_types.h> -> <mesg.h> -> <stdio.h>.
Packit Service 4684c1
     In this situation, the functions are not yet declared, therefore we cannot
Packit Service 4684c1
     provide the C++ aliases.  */
Packit Service 4684c1
Packit Service 4684c1
#@INCLUDE_NEXT@ @NEXT_STDIO_H@
Packit Service 4684c1
Packit Service 4684c1
#else
Packit Service 4684c1
/* Normal invocation convention.  */
Packit Service 4684c1
Packit Service 4684c1
#ifndef _@GUARD_PREFIX@_STDIO_H
Packit Service 4684c1
Packit Service 4684c1
#define _GL_ALREADY_INCLUDING_STDIO_H
Packit Service 4684c1
Packit Service 4684c1
/* The include_next requires a split double-inclusion guard.  */
Packit Service 4684c1
#@INCLUDE_NEXT@ @NEXT_STDIO_H@
Packit Service 4684c1
Packit Service 4684c1
#undef _GL_ALREADY_INCLUDING_STDIO_H
Packit Service 4684c1
Packit Service 4684c1
#ifndef _@GUARD_PREFIX@_STDIO_H
Packit Service 4684c1
#define _@GUARD_PREFIX@_STDIO_H
Packit Service 4684c1
Packit Service 4684c1
/* Get va_list.  Needed on many systems, including glibc 2.8.  */
Packit Service 4684c1
#include <stdarg.h>
Packit Service 4684c1
Packit Service 4684c1
#include <stddef.h>
Packit Service 4684c1
Packit Service 4684c1
/* Get off_t and ssize_t.  Needed on many systems, including glibc 2.8
Packit Service 4684c1
   and eglibc 2.11.2.
Packit Service 4684c1
   May also define off_t to a 64-bit type on native Windows.  */
Packit Service 4684c1
#include <sys/types.h>
Packit Service 4684c1
Packit Service 4684c1
/* The __attribute__ feature is available in gcc versions 2.5 and later.
Packit Service 4684c1
   The __-protected variants of the attributes 'format' and 'printf' are
Packit Service 4684c1
   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
Packit Service 4684c1
   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
Packit Service 4684c1
   gnulib and libintl do '#define printf __printf__' when they override
Packit Service 4684c1
   the 'printf' function.  */
Packit Service 4684c1
#ifndef _GL_ATTRIBUTE_FORMAT
Packit Service 4684c1
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
Packit Service 4684c1
#  define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
Packit Service 4684c1
# else
Packit Service 4684c1
#  define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
/* _GL_ATTRIBUTE_FORMAT_PRINTF
Packit Service 4684c1
   indicates to GCC that the function takes a format string and arguments,
Packit Service 4684c1
   where the format string directives are the ones standardized by ISO C99
Packit Service 4684c1
   and POSIX.  */
Packit Service 4684c1
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
Packit Service 4684c1
# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
Packit Service 4684c1
   _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument))
Packit Service 4684c1
#else
Packit Service 4684c1
# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
Packit Service 4684c1
   _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF,
Packit Service 4684c1
   except that it indicates to GCC that the supported format string directives
Packit Service 4684c1
   are the ones of the system printf(), rather than the ones standardized by
Packit Service 4684c1
   ISO C99 and POSIX.  */
Packit Service 4684c1
#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU
Packit Service 4684c1
# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \
Packit Service 4684c1
  _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument)
Packit Service 4684c1
#else
Packit Service 4684c1
# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \
Packit Service 4684c1
  _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
/* _GL_ATTRIBUTE_FORMAT_SCANF
Packit Service 4684c1
   indicates to GCC that the function takes a format string and arguments,
Packit Service 4684c1
   where the format string directives are the ones standardized by ISO C99
Packit Service 4684c1
   and POSIX.  */
Packit Service 4684c1
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
Packit Service 4684c1
# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \
Packit Service 4684c1
   _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument))
Packit Service 4684c1
#else
Packit Service 4684c1
# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \
Packit Service 4684c1
   _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument))
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
/* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF,
Packit Service 4684c1
   except that it indicates to GCC that the supported format string directives
Packit Service 4684c1
   are the ones of the system scanf(), rather than the ones standardized by
Packit Service 4684c1
   ISO C99 and POSIX.  */
Packit Service 4684c1
#define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \
Packit Service 4684c1
  _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument))
Packit Service 4684c1
Packit Service 4684c1
/* Solaris 10 and NetBSD 7.0 declare renameat in <unistd.h>, not in <stdio.h>.  */
Packit Service 4684c1
/* But in any case avoid namespace pollution on glibc systems.  */
Packit Service 4684c1
#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \
Packit Service 4684c1
    && ! defined __GLIBC__
Packit Service 4684c1
# include <unistd.h>
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
/* Android 4.3 declares renameat in <sys/stat.h>, not in <stdio.h>.  */
Packit Service 4684c1
/* But in any case avoid namespace pollution on glibc systems.  */
Packit Service 4684c1
#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \
Packit Service 4684c1
    && ! defined __GLIBC__
Packit Service 4684c1
# include <sys/stat.h>
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
/* MSVC declares 'perror' in <stdlib.h>, not in <stdio.h>.  We must include
Packit Service 4684c1
   it before we  #define perror rpl_perror.  */
Packit Service 4684c1
/* But in any case avoid namespace pollution on glibc systems.  */
Packit Service 4684c1
#if (@GNULIB_PERROR@ || defined GNULIB_POSIXCHECK) \
Packit Service 4684c1
    && (defined _WIN32 && ! defined __CYGWIN__) \
Packit Service 4684c1
    && ! defined __GLIBC__
Packit Service 4684c1
# include <stdlib.h>
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
/* MSVC declares 'remove' in <io.h>, not in <stdio.h>.  We must include
Packit Service 4684c1
   it before we  #define remove rpl_remove.  */
Packit Service 4684c1
/* MSVC declares 'rename' in <io.h>, not in <stdio.h>.  We must include
Packit Service 4684c1
   it before we  #define rename rpl_rename.  */
Packit Service 4684c1
/* But in any case avoid namespace pollution on glibc systems.  */
Packit Service 4684c1
#if (@GNULIB_REMOVE@ || @GNULIB_RENAME@ || defined GNULIB_POSIXCHECK) \
Packit Service 4684c1
    && (defined _WIN32 && ! defined __CYGWIN__) \
Packit Service 4684c1
    && ! defined __GLIBC__
Packit Service 4684c1
# include <io.h>
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
Packit Service 4684c1
Packit Service 4684c1
/* The definition of _GL_ARG_NONNULL is copied here.  */
Packit Service 4684c1
Packit Service 4684c1
/* The definition of _GL_WARN_ON_USE is copied here.  */
Packit Service 4684c1
Packit Service 4684c1
/* Macros for stringification.  */
Packit Service 4684c1
#define _GL_STDIO_STRINGIZE(token) #token
Packit Service 4684c1
#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token)
Packit Service 4684c1
Packit Service 4684c1
/* When also using extern inline, suppress the use of static inline in
Packit Service 4684c1
   standard headers of problematic Apple configurations, as Libc at
Packit Service 4684c1
   least through Libc-825.26 (2013-04-09) mishandles it; see, e.g.,
Packit Service 4684c1
   <https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html>.
Packit Service 4684c1
   Perhaps Apple will fix this some day.  */
Packit Service 4684c1
#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \
Packit Service 4684c1
     && defined __GNUC__ && defined __STDC__)
Packit Service 4684c1
# undef putc_unlocked
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_DPRINTF@
Packit Service 4684c1
# if @REPLACE_DPRINTF@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   define dprintf rpl_dprintf
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...)
Packit Service 4684c1
                                _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
Packit Service 4684c1
                                _GL_ARG_NONNULL ((2)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...));
Packit Service 4684c1
# else
Packit Service 4684c1
#  if !@HAVE_DPRINTF@
Packit Service 4684c1
_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...)
Packit Service 4684c1
                                _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
Packit Service 4684c1
                                _GL_ARG_NONNULL ((2)));
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...));
Packit Service 4684c1
# endif
Packit Service 4684c1
_GL_CXXALIASWARN (dprintf);
Packit Service 4684c1
#elif defined GNULIB_POSIXCHECK
Packit Service 4684c1
# undef dprintf
Packit Service 4684c1
# if HAVE_RAW_DECL_DPRINTF
Packit Service 4684c1
_GL_WARN_ON_USE (dprintf, "dprintf is unportable - "
Packit Service 4684c1
                 "use gnulib module dprintf for portability");
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_FCLOSE@
Packit Service 4684c1
/* Close STREAM and its underlying file descriptor.  */
Packit Service 4684c1
# if @REPLACE_FCLOSE@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   define fclose rpl_fclose
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (fclose, int, (FILE *stream));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (fclose, int, (FILE *stream));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (fclose);
Packit Service 4684c1
# endif
Packit Service 4684c1
#elif defined GNULIB_POSIXCHECK
Packit Service 4684c1
# undef fclose
Packit Service 4684c1
/* Assume fclose is always declared.  */
Packit Service 4684c1
_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - "
Packit Service 4684c1
                 "use gnulib module fclose for portable POSIX compliance");
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_FDOPEN@
Packit Service 4684c1
# if @REPLACE_FDOPEN@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef fdopen
Packit Service 4684c1
#   define fdopen rpl_fdopen
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode)
Packit Service 4684c1
                                  _GL_ARG_NONNULL ((2)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode));
Packit Service 4684c1
# endif
Packit Service 4684c1
_GL_CXXALIASWARN (fdopen);
Packit Service 4684c1
#elif defined GNULIB_POSIXCHECK
Packit Service 4684c1
# undef fdopen
Packit Service 4684c1
/* Assume fdopen is always declared.  */
Packit Service 4684c1
_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - "
Packit Service 4684c1
                 "use gnulib module fdopen for portability");
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_FFLUSH@
Packit Service 4684c1
/* Flush all pending data on STREAM according to POSIX rules.  Both
Packit Service 4684c1
   output and seekable input streams are supported.
Packit Service 4684c1
   Note! LOSS OF DATA can occur if fflush is applied on an input stream
Packit Service 4684c1
   that is _not_seekable_ or on an update stream that is _not_seekable_
Packit Service 4684c1
   and in which the most recent operation was input.  Seekability can
Packit Service 4684c1
   be tested with lseek(fileno(fp),0,SEEK_CUR).  */
Packit Service 4684c1
# if @REPLACE_FFLUSH@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   define fflush rpl_fflush
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream));
Packit Service 4684c1
_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (fflush);
Packit Service 4684c1
# endif
Packit Service 4684c1
#elif defined GNULIB_POSIXCHECK
Packit Service 4684c1
# undef fflush
Packit Service 4684c1
/* Assume fflush is always declared.  */
Packit Service 4684c1
_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - "
Packit Service 4684c1
                 "use gnulib module fflush for portable POSIX compliance");
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_FGETC@
Packit Service 4684c1
# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef fgetc
Packit Service 4684c1
#   define fgetc rpl_fgetc
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (fgetc, int, (FILE *stream));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (fgetc, int, (FILE *stream));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (fgetc);
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_FGETS@
Packit Service 4684c1
# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef fgets
Packit Service 4684c1
#   define fgets rpl_fgets
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (fgets, char *,
Packit Service 4684c1
                  (char *restrict s, int n, FILE *restrict stream)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 3)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (fgets, char *,
Packit Service 4684c1
                  (char *restrict s, int n, FILE *restrict stream));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (fgets, char *,
Packit Service 4684c1
                  (char *restrict s, int n, FILE *restrict stream));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (fgets);
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_FOPEN@
Packit Service 4684c1
# if @REPLACE_FOPEN@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef fopen
Packit Service 4684c1
#   define fopen rpl_fopen
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (fopen, FILE *,
Packit Service 4684c1
                  (const char *restrict filename, const char *restrict mode)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 2)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (fopen, FILE *,
Packit Service 4684c1
                  (const char *restrict filename, const char *restrict mode));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (fopen, FILE *,
Packit Service 4684c1
                  (const char *restrict filename, const char *restrict mode));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (fopen);
Packit Service 4684c1
# endif
Packit Service 4684c1
#elif defined GNULIB_POSIXCHECK
Packit Service 4684c1
# undef fopen
Packit Service 4684c1
/* Assume fopen is always declared.  */
Packit Service 4684c1
_GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - "
Packit Service 4684c1
                 "use gnulib module fopen for portability");
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_FPRINTF_POSIX@ || @GNULIB_FPRINTF@
Packit Service 4684c1
# if (@GNULIB_FPRINTF_POSIX@ && @REPLACE_FPRINTF@) \
Packit Service 4684c1
     || (@GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@))
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   define fprintf rpl_fprintf
Packit Service 4684c1
#  endif
Packit Service 4684c1
#  define GNULIB_overrides_fprintf 1
Packit Service 4684c1
#  if @GNULIB_FPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@
Packit Service 4684c1
_GL_FUNCDECL_RPL (fprintf, int,
Packit Service 4684c1
                  (FILE *restrict fp, const char *restrict format, ...)
Packit Service 4684c1
                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 2)));
Packit Service 4684c1
#  else
Packit Service 4684c1
_GL_FUNCDECL_RPL (fprintf, int,
Packit Service 4684c1
                  (FILE *restrict fp, const char *restrict format, ...)
Packit Service 4684c1
                  _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 2)));
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_CXXALIAS_RPL (fprintf, int,
Packit Service 4684c1
                  (FILE *restrict fp, const char *restrict format, ...));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (fprintf, int,
Packit Service 4684c1
                  (FILE *restrict fp, const char *restrict format, ...));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (fprintf);
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
#if !@GNULIB_FPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
Packit Service 4684c1
# if !GNULIB_overrides_fprintf
Packit Service 4684c1
#  undef fprintf
Packit Service 4684c1
# endif
Packit Service 4684c1
/* Assume fprintf is always declared.  */
Packit Service 4684c1
_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - "
Packit Service 4684c1
                 "use gnulib module fprintf-posix for portable "
Packit Service 4684c1
                 "POSIX compliance");
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_FPURGE@
Packit Service 4684c1
/* Discard all pending buffered I/O data on STREAM.
Packit Service 4684c1
   STREAM must not be wide-character oriented.
Packit Service 4684c1
   When discarding pending output, the file position is set back to where it
Packit Service 4684c1
   was before the write calls.  When discarding pending input, the file
Packit Service 4684c1
   position is advanced to match the end of the previously read input.
Packit Service 4684c1
   Return 0 if successful.  Upon error, return -1 and set errno.  */
Packit Service 4684c1
# if @REPLACE_FPURGE@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   define fpurge rpl_fpurge
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream));
Packit Service 4684c1
# else
Packit Service 4684c1
#  if !@HAVE_DECL_FPURGE@
Packit Service 4684c1
_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1)));
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream));
Packit Service 4684c1
# endif
Packit Service 4684c1
_GL_CXXALIASWARN (fpurge);
Packit Service 4684c1
#elif defined GNULIB_POSIXCHECK
Packit Service 4684c1
# undef fpurge
Packit Service 4684c1
# if HAVE_RAW_DECL_FPURGE
Packit Service 4684c1
_GL_WARN_ON_USE (fpurge, "fpurge is not always present - "
Packit Service 4684c1
                 "use gnulib module fpurge for portability");
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_FPUTC@
Packit Service 4684c1
# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef fputc
Packit Service 4684c1
#   define fputc rpl_fputc
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (fputc);
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_FPUTS@
Packit Service 4684c1
# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef fputs
Packit Service 4684c1
#   define fputs rpl_fputs
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (fputs, int,
Packit Service 4684c1
                  (const char *restrict string, FILE *restrict stream)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 2)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (fputs, int,
Packit Service 4684c1
                  (const char *restrict string, FILE *restrict stream));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (fputs, int,
Packit Service 4684c1
                  (const char *restrict string, FILE *restrict stream));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (fputs);
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_FREAD@
Packit Service 4684c1
# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef fread
Packit Service 4684c1
#   define fread rpl_fread
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (fread, size_t,
Packit Service 4684c1
                  (void *restrict ptr, size_t s, size_t n,
Packit Service 4684c1
                   FILE *restrict stream)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((4)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (fread, size_t,
Packit Service 4684c1
                  (void *restrict ptr, size_t s, size_t n,
Packit Service 4684c1
                   FILE *restrict stream));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (fread, size_t,
Packit Service 4684c1
                  (void *restrict ptr, size_t s, size_t n,
Packit Service 4684c1
                   FILE *restrict stream));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (fread);
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_FREOPEN@
Packit Service 4684c1
# if @REPLACE_FREOPEN@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef freopen
Packit Service 4684c1
#   define freopen rpl_freopen
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (freopen, FILE *,
Packit Service 4684c1
                  (const char *restrict filename, const char *restrict mode,
Packit Service 4684c1
                   FILE *restrict stream)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((2, 3)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (freopen, FILE *,
Packit Service 4684c1
                  (const char *restrict filename, const char *restrict mode,
Packit Service 4684c1
                   FILE *restrict stream));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (freopen, FILE *,
Packit Service 4684c1
                  (const char *restrict filename, const char *restrict mode,
Packit Service 4684c1
                   FILE *restrict stream));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (freopen);
Packit Service 4684c1
# endif
Packit Service 4684c1
#elif defined GNULIB_POSIXCHECK
Packit Service 4684c1
# undef freopen
Packit Service 4684c1
/* Assume freopen is always declared.  */
Packit Service 4684c1
_GL_WARN_ON_USE (freopen,
Packit Service 4684c1
                 "freopen on native Windows platforms is not POSIX compliant - "
Packit Service 4684c1
                 "use gnulib module freopen for portability");
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_FSCANF@
Packit Service 4684c1
# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef fscanf
Packit Service 4684c1
#   define fscanf rpl_fscanf
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (fscanf, int,
Packit Service 4684c1
                  (FILE *restrict stream, const char *restrict format, ...)
Packit Service 4684c1
                  _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 2)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (fscanf, int,
Packit Service 4684c1
                  (FILE *restrict stream, const char *restrict format, ...));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (fscanf, int,
Packit Service 4684c1
                  (FILE *restrict stream, const char *restrict format, ...));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (fscanf);
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
/* Set up the following warnings, based on which modules are in use.
Packit Service 4684c1
   GNU Coding Standards discourage the use of fseek, since it imposes
Packit Service 4684c1
   an arbitrary limitation on some 32-bit hosts.  Remember that the
Packit Service 4684c1
   fseek module depends on the fseeko module, so we only have three
Packit Service 4684c1
   cases to consider:
Packit Service 4684c1
Packit Service 4684c1
   1. The developer is not using either module.  Issue a warning under
Packit Service 4684c1
   GNULIB_POSIXCHECK for both functions, to remind them that both
Packit Service 4684c1
   functions have bugs on some systems.  _GL_NO_LARGE_FILES has no
Packit Service 4684c1
   impact on this warning.
Packit Service 4684c1
Packit Service 4684c1
   2. The developer is using both modules.  They may be unaware of the
Packit Service 4684c1
   arbitrary limitations of fseek, so issue a warning under
Packit Service 4684c1
   GNULIB_POSIXCHECK.  On the other hand, they may be using both
Packit Service 4684c1
   modules intentionally, so the developer can define
Packit Service 4684c1
   _GL_NO_LARGE_FILES in the compilation units where the use of fseek
Packit Service 4684c1
   is safe, to silence the warning.
Packit Service 4684c1
Packit Service 4684c1
   3. The developer is using the fseeko module, but not fseek.  Gnulib
Packit Service 4684c1
   guarantees that fseek will still work around platform bugs in that
Packit Service 4684c1
   case, but we presume that the developer is aware of the pitfalls of
Packit Service 4684c1
   fseek and was trying to avoid it, so issue a warning even when
Packit Service 4684c1
   GNULIB_POSIXCHECK is undefined.  Again, _GL_NO_LARGE_FILES can be
Packit Service 4684c1
   defined to silence the warning in particular compilation units.
Packit Service 4684c1
   In C++ compilations with GNULIB_NAMESPACE, in order to avoid that
Packit Service 4684c1
   fseek gets defined as a macro, it is recommended that the developer
Packit Service 4684c1
   uses the fseek module, even if he is not calling the fseek function.
Packit Service 4684c1
Packit Service 4684c1
   Most gnulib clients that perform stream operations should fall into
Packit Service 4684c1
   category 3.  */
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_FSEEK@
Packit Service 4684c1
# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES
Packit Service 4684c1
#  define _GL_FSEEK_WARN /* Category 2, above.  */
Packit Service 4684c1
#  undef fseek
Packit Service 4684c1
# endif
Packit Service 4684c1
# if @REPLACE_FSEEK@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef fseek
Packit Service 4684c1
#   define fseek rpl_fseek
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence)
Packit Service 4684c1
                              _GL_ARG_NONNULL ((1)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (fseek);
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_FSEEKO@
Packit Service 4684c1
# if !@GNULIB_FSEEK@ && !defined _GL_NO_LARGE_FILES
Packit Service 4684c1
#  define _GL_FSEEK_WARN /* Category 3, above.  */
Packit Service 4684c1
#  undef fseek
Packit Service 4684c1
# endif
Packit Service 4684c1
# if @REPLACE_FSEEKO@
Packit Service 4684c1
/* Provide an fseeko function that is aware of a preceding fflush(), and which
Packit Service 4684c1
   detects pipes.  */
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef fseeko
Packit Service 4684c1
#   define fseeko rpl_fseeko
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)
Packit Service 4684c1
                               _GL_ARG_NONNULL ((1)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence));
Packit Service 4684c1
# else
Packit Service 4684c1
#  if ! @HAVE_DECL_FSEEKO@
Packit Service 4684c1
_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)
Packit Service 4684c1
                               _GL_ARG_NONNULL ((1)));
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence));
Packit Service 4684c1
# endif
Packit Service 4684c1
_GL_CXXALIASWARN (fseeko);
Packit Service 4684c1
#elif defined GNULIB_POSIXCHECK
Packit Service 4684c1
# define _GL_FSEEK_WARN /* Category 1, above.  */
Packit Service 4684c1
# undef fseek
Packit Service 4684c1
# undef fseeko
Packit Service 4684c1
# if HAVE_RAW_DECL_FSEEKO
Packit Service 4684c1
_GL_WARN_ON_USE (fseeko, "fseeko is unportable - "
Packit Service 4684c1
                 "use gnulib module fseeko for portability");
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#ifdef _GL_FSEEK_WARN
Packit Service 4684c1
# undef _GL_FSEEK_WARN
Packit Service 4684c1
/* Here, either fseek is undefined (but C89 guarantees that it is
Packit Service 4684c1
   declared), or it is defined as rpl_fseek (declared above).  */
Packit Service 4684c1
_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB "
Packit Service 4684c1
                 "on 32-bit platforms - "
Packit Service 4684c1
                 "use fseeko function for handling of large files");
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
/* ftell, ftello.  See the comments on fseek/fseeko.  */
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_FTELL@
Packit Service 4684c1
# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES
Packit Service 4684c1
#  define _GL_FTELL_WARN /* Category 2, above.  */
Packit Service 4684c1
#  undef ftell
Packit Service 4684c1
# endif
Packit Service 4684c1
# if @REPLACE_FTELL@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef ftell
Packit Service 4684c1
#   define ftell rpl_ftell
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (ftell, long, (FILE *fp));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (ftell, long, (FILE *fp));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (ftell);
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_FTELLO@
Packit Service 4684c1
# if !@GNULIB_FTELL@ && !defined _GL_NO_LARGE_FILES
Packit Service 4684c1
#  define _GL_FTELL_WARN /* Category 3, above.  */
Packit Service 4684c1
#  undef ftell
Packit Service 4684c1
# endif
Packit Service 4684c1
# if @REPLACE_FTELLO@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef ftello
Packit Service 4684c1
#   define ftello rpl_ftello
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp));
Packit Service 4684c1
# else
Packit Service 4684c1
#  if ! @HAVE_DECL_FTELLO@
Packit Service 4684c1
_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1)));
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp));
Packit Service 4684c1
# endif
Packit Service 4684c1
_GL_CXXALIASWARN (ftello);
Packit Service 4684c1
#elif defined GNULIB_POSIXCHECK
Packit Service 4684c1
# define _GL_FTELL_WARN /* Category 1, above.  */
Packit Service 4684c1
# undef ftell
Packit Service 4684c1
# undef ftello
Packit Service 4684c1
# if HAVE_RAW_DECL_FTELLO
Packit Service 4684c1
_GL_WARN_ON_USE (ftello, "ftello is unportable - "
Packit Service 4684c1
                 "use gnulib module ftello for portability");
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#ifdef _GL_FTELL_WARN
Packit Service 4684c1
# undef _GL_FTELL_WARN
Packit Service 4684c1
/* Here, either ftell is undefined (but C89 guarantees that it is
Packit Service 4684c1
   declared), or it is defined as rpl_ftell (declared above).  */
Packit Service 4684c1
_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB "
Packit Service 4684c1
                 "on 32-bit platforms - "
Packit Service 4684c1
                 "use ftello function for handling of large files");
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_FWRITE@
Packit Service 4684c1
# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef fwrite
Packit Service 4684c1
#   define fwrite rpl_fwrite
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (fwrite, size_t,
Packit Service 4684c1
                  (const void *restrict ptr, size_t s, size_t n,
Packit Service 4684c1
                   FILE *restrict stream)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 4)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (fwrite, size_t,
Packit Service 4684c1
                  (const void *restrict ptr, size_t s, size_t n,
Packit Service 4684c1
                   FILE *restrict stream));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (fwrite, size_t,
Packit Service 4684c1
                  (const void *restrict ptr, size_t s, size_t n,
Packit Service 4684c1
                   FILE *restrict stream));
Packit Service 4684c1
Packit Service 4684c1
/* Work around bug 11959 when fortifying glibc 2.4 through 2.15
Packit Service 4684c1
   <https://sourceware.org/bugzilla/show_bug.cgi?id=11959>,
Packit Service 4684c1
   which sometimes causes an unwanted diagnostic for fwrite calls.
Packit Service 4684c1
   This affects only function declaration attributes under certain
Packit Service 4684c1
   versions of gcc and clang, and is not needed for C++.  */
Packit Service 4684c1
#  if (0 < __USE_FORTIFY_LEVEL                                          \
Packit Service 4684c1
       && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \
Packit Service 4684c1
       && 3 < __GNUC__ + (4 <= __GNUC_MINOR__)                          \
Packit Service 4684c1
       && !defined __cplusplus)
Packit Service 4684c1
#   undef fwrite
Packit Service 4684c1
#   undef fwrite_unlocked
Packit Service 4684c1
extern size_t __REDIRECT (rpl_fwrite,
Packit Service 4684c1
                          (const void *__restrict, size_t, size_t,
Packit Service 4684c1
                           FILE *__restrict),
Packit Service 4684c1
                          fwrite);
Packit Service 4684c1
extern size_t __REDIRECT (rpl_fwrite_unlocked,
Packit Service 4684c1
                          (const void *__restrict, size_t, size_t,
Packit Service 4684c1
                           FILE *__restrict),
Packit Service 4684c1
                          fwrite_unlocked);
Packit Service 4684c1
#   define fwrite rpl_fwrite
Packit Service 4684c1
#   define fwrite_unlocked rpl_fwrite_unlocked
Packit Service 4684c1
#  endif
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (fwrite);
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_GETC@
Packit Service 4684c1
# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef getc
Packit Service 4684c1
#   define getc rpl_fgetc
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
Packit Service 4684c1
_GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (getc, int, (FILE *stream));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (getc);
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_GETCHAR@
Packit Service 4684c1
# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef getchar
Packit Service 4684c1
#   define getchar rpl_getchar
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (getchar, int, (void));
Packit Service 4684c1
_GL_CXXALIAS_RPL (getchar, int, (void));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (getchar, int, (void));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (getchar);
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_GETDELIM@
Packit Service 4684c1
/* Read input, up to (and including) the next occurrence of DELIMITER, from
Packit Service 4684c1
   STREAM, store it in *LINEPTR (and NUL-terminate it).
Packit Service 4684c1
   *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE
Packit Service 4684c1
   bytes of space.  It is realloc'd as necessary.
Packit Service 4684c1
   Return the number of bytes read and stored at *LINEPTR (not including the
Packit Service 4684c1
   NUL terminator), or -1 on error or EOF.  */
Packit Service 4684c1
# if @REPLACE_GETDELIM@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef getdelim
Packit Service 4684c1
#   define getdelim rpl_getdelim
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (getdelim, ssize_t,
Packit Service 4684c1
                  (char **restrict lineptr, size_t *restrict linesize,
Packit Service 4684c1
                   int delimiter,
Packit Service 4684c1
                   FILE *restrict stream)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 2, 4)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (getdelim, ssize_t,
Packit Service 4684c1
                  (char **restrict lineptr, size_t *restrict linesize,
Packit Service 4684c1
                   int delimiter,
Packit Service 4684c1
                   FILE *restrict stream));
Packit Service 4684c1
# else
Packit Service 4684c1
#  if !@HAVE_DECL_GETDELIM@
Packit Service 4684c1
_GL_FUNCDECL_SYS (getdelim, ssize_t,
Packit Service 4684c1
                  (char **restrict lineptr, size_t *restrict linesize,
Packit Service 4684c1
                   int delimiter,
Packit Service 4684c1
                   FILE *restrict stream)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 2, 4)));
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_CXXALIAS_SYS (getdelim, ssize_t,
Packit Service 4684c1
                  (char **restrict lineptr, size_t *restrict linesize,
Packit Service 4684c1
                   int delimiter,
Packit Service 4684c1
                   FILE *restrict stream));
Packit Service 4684c1
# endif
Packit Service 4684c1
_GL_CXXALIASWARN (getdelim);
Packit Service 4684c1
#elif defined GNULIB_POSIXCHECK
Packit Service 4684c1
# undef getdelim
Packit Service 4684c1
# if HAVE_RAW_DECL_GETDELIM
Packit Service 4684c1
_GL_WARN_ON_USE (getdelim, "getdelim is unportable - "
Packit Service 4684c1
                 "use gnulib module getdelim for portability");
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_GETLINE@
Packit Service 4684c1
/* Read a line, up to (and including) the next newline, from STREAM, store it
Packit Service 4684c1
   in *LINEPTR (and NUL-terminate it).
Packit Service 4684c1
   *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE
Packit Service 4684c1
   bytes of space.  It is realloc'd as necessary.
Packit Service 4684c1
   Return the number of bytes read and stored at *LINEPTR (not including the
Packit Service 4684c1
   NUL terminator), or -1 on error or EOF.  */
Packit Service 4684c1
# if @REPLACE_GETLINE@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef getline
Packit Service 4684c1
#   define getline rpl_getline
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (getline, ssize_t,
Packit Service 4684c1
                  (char **restrict lineptr, size_t *restrict linesize,
Packit Service 4684c1
                   FILE *restrict stream)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 2, 3)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (getline, ssize_t,
Packit Service 4684c1
                  (char **restrict lineptr, size_t *restrict linesize,
Packit Service 4684c1
                   FILE *restrict stream));
Packit Service 4684c1
# else
Packit Service 4684c1
#  if !@HAVE_DECL_GETLINE@
Packit Service 4684c1
_GL_FUNCDECL_SYS (getline, ssize_t,
Packit Service 4684c1
                  (char **restrict lineptr, size_t *restrict linesize,
Packit Service 4684c1
                   FILE *restrict stream)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 2, 3)));
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_CXXALIAS_SYS (getline, ssize_t,
Packit Service 4684c1
                  (char **restrict lineptr, size_t *restrict linesize,
Packit Service 4684c1
                   FILE *restrict stream));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if @HAVE_DECL_GETLINE@
Packit Service 4684c1
_GL_CXXALIASWARN (getline);
Packit Service 4684c1
# endif
Packit Service 4684c1
#elif defined GNULIB_POSIXCHECK
Packit Service 4684c1
# undef getline
Packit Service 4684c1
# if HAVE_RAW_DECL_GETLINE
Packit Service 4684c1
_GL_WARN_ON_USE (getline, "getline is unportable - "
Packit Service 4684c1
                 "use gnulib module getline for portability");
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
/* It is very rare that the developer ever has full control of stdin,
Packit Service 4684c1
   so any use of gets warrants an unconditional warning; besides, C11
Packit Service 4684c1
   removed it.  */
Packit Service 4684c1
#undef gets
Packit Service 4684c1
#if HAVE_RAW_DECL_GETS && !defined __cplusplus
Packit Service 4684c1
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
Packit Service 4684c1
struct obstack;
Packit Service 4684c1
/* Grow an obstack with formatted output.  Return the number of
Packit Service 4684c1
   bytes added to OBS.  No trailing nul byte is added, and the
Packit Service 4684c1
   object should be closed with obstack_finish before use.  Upon
Packit Service 4684c1
   memory allocation error, call obstack_alloc_failed_handler.  Upon
Packit Service 4684c1
   other error, return -1.  */
Packit Service 4684c1
# if @REPLACE_OBSTACK_PRINTF@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   define obstack_printf rpl_obstack_printf
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (obstack_printf, int,
Packit Service 4684c1
                  (struct obstack *obs, const char *format, ...)
Packit Service 4684c1
                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 2)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (obstack_printf, int,
Packit Service 4684c1
                  (struct obstack *obs, const char *format, ...));
Packit Service 4684c1
# else
Packit Service 4684c1
#  if !@HAVE_DECL_OBSTACK_PRINTF@
Packit Service 4684c1
_GL_FUNCDECL_SYS (obstack_printf, int,
Packit Service 4684c1
                  (struct obstack *obs, const char *format, ...)
Packit Service 4684c1
                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 2)));
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_CXXALIAS_SYS (obstack_printf, int,
Packit Service 4684c1
                  (struct obstack *obs, const char *format, ...));
Packit Service 4684c1
# endif
Packit Service 4684c1
_GL_CXXALIASWARN (obstack_printf);
Packit Service 4684c1
# if @REPLACE_OBSTACK_PRINTF@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   define obstack_vprintf rpl_obstack_vprintf
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (obstack_vprintf, int,
Packit Service 4684c1
                  (struct obstack *obs, const char *format, va_list args)
Packit Service 4684c1
                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 2)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (obstack_vprintf, int,
Packit Service 4684c1
                  (struct obstack *obs, const char *format, va_list args));
Packit Service 4684c1
# else
Packit Service 4684c1
#  if !@HAVE_DECL_OBSTACK_PRINTF@
Packit Service 4684c1
_GL_FUNCDECL_SYS (obstack_vprintf, int,
Packit Service 4684c1
                  (struct obstack *obs, const char *format, va_list args)
Packit Service 4684c1
                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 2)));
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_CXXALIAS_SYS (obstack_vprintf, int,
Packit Service 4684c1
                  (struct obstack *obs, const char *format, va_list args));
Packit Service 4684c1
# endif
Packit Service 4684c1
_GL_CXXALIASWARN (obstack_vprintf);
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_PCLOSE@
Packit Service 4684c1
# if !@HAVE_PCLOSE@
Packit Service 4684c1
_GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
Packit Service 4684c1
# endif
Packit Service 4684c1
_GL_CXXALIAS_SYS (pclose, int, (FILE *stream));
Packit Service 4684c1
_GL_CXXALIASWARN (pclose);
Packit Service 4684c1
#elif defined GNULIB_POSIXCHECK
Packit Service 4684c1
# undef pclose
Packit Service 4684c1
# if HAVE_RAW_DECL_PCLOSE
Packit Service 4684c1
_GL_WARN_ON_USE (pclose, "pclose is unportable - "
Packit Service 4684c1
                 "use gnulib module pclose for more portability");
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_PERROR@
Packit Service 4684c1
/* Print a message to standard error, describing the value of ERRNO,
Packit Service 4684c1
   (if STRING is not NULL and not empty) prefixed with STRING and ": ",
Packit Service 4684c1
   and terminated with a newline.  */
Packit Service 4684c1
# if @REPLACE_PERROR@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   define perror rpl_perror
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (perror, void, (const char *string));
Packit Service 4684c1
_GL_CXXALIAS_RPL (perror, void, (const char *string));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (perror, void, (const char *string));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (perror);
Packit Service 4684c1
# endif
Packit Service 4684c1
#elif defined GNULIB_POSIXCHECK
Packit Service 4684c1
# undef perror
Packit Service 4684c1
/* Assume perror is always declared.  */
Packit Service 4684c1
_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - "
Packit Service 4684c1
                 "use gnulib module perror for portability");
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_POPEN@
Packit Service 4684c1
# if @REPLACE_POPEN@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef popen
Packit Service 4684c1
#   define popen rpl_popen
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode)
Packit Service 4684c1
                                 _GL_ARG_NONNULL ((1, 2)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode));
Packit Service 4684c1
# else
Packit Service 4684c1
#  if !@HAVE_POPEN@
Packit Service 4684c1
_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode)
Packit Service 4684c1
                                 _GL_ARG_NONNULL ((1, 2)));
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode));
Packit Service 4684c1
# endif
Packit Service 4684c1
_GL_CXXALIASWARN (popen);
Packit Service 4684c1
#elif defined GNULIB_POSIXCHECK
Packit Service 4684c1
# undef popen
Packit Service 4684c1
# if HAVE_RAW_DECL_POPEN
Packit Service 4684c1
_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - "
Packit Service 4684c1
                 "use gnulib module popen or pipe for more portability");
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@
Packit Service 4684c1
# if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \
Packit Service 4684c1
     || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@))
Packit Service 4684c1
#  if defined __GNUC__
Packit Service 4684c1
#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
/* Don't break __attribute__((format(printf,M,N))).  */
Packit Service 4684c1
#    define printf __printf__
Packit Service 4684c1
#   endif
Packit Service 4684c1
#   if @GNULIB_PRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@
Packit Service 4684c1
_GL_FUNCDECL_RPL_1 (__printf__, int,
Packit Service 4684c1
                    (const char *restrict format, ...)
Packit Service 4684c1
                    __asm__ (@ASM_SYMBOL_PREFIX@
Packit Service 4684c1
                             _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf))
Packit Service 4684c1
                    _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2)
Packit Service 4684c1
                    _GL_ARG_NONNULL ((1)));
Packit Service 4684c1
#   else
Packit Service 4684c1
_GL_FUNCDECL_RPL_1 (__printf__, int,
Packit Service 4684c1
                    (const char *restrict format, ...)
Packit Service 4684c1
                    __asm__ (@ASM_SYMBOL_PREFIX@
Packit Service 4684c1
                             _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf))
Packit Service 4684c1
                    _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2)
Packit Service 4684c1
                    _GL_ARG_NONNULL ((1)));
Packit Service 4684c1
#   endif
Packit Service 4684c1
_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...));
Packit Service 4684c1
#  else
Packit Service 4684c1
#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#    define printf rpl_printf
Packit Service 4684c1
#   endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (printf, int,
Packit Service 4684c1
                  (const char *restrict format, ...)
Packit Service 4684c1
                  _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...));
Packit Service 4684c1
#  endif
Packit Service 4684c1
#  define GNULIB_overrides_printf 1
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (printf, int, (const char *restrict format, ...));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (printf);
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
#if !@GNULIB_PRINTF_POSIX@ && defined GNULIB_POSIXCHECK
Packit Service 4684c1
# if !GNULIB_overrides_printf
Packit Service 4684c1
#  undef printf
Packit Service 4684c1
# endif
Packit Service 4684c1
/* Assume printf is always declared.  */
Packit Service 4684c1
_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - "
Packit Service 4684c1
                 "use gnulib module printf-posix for portable "
Packit Service 4684c1
                 "POSIX compliance");
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_PUTC@
Packit Service 4684c1
# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef putc
Packit Service 4684c1
#   define putc rpl_fputc
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2)));
Packit Service 4684c1
_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (putc);
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_PUTCHAR@
Packit Service 4684c1
# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef putchar
Packit Service 4684c1
#   define putchar rpl_putchar
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (putchar, int, (int c));
Packit Service 4684c1
_GL_CXXALIAS_RPL (putchar, int, (int c));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (putchar, int, (int c));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (putchar);
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_PUTS@
Packit Service 4684c1
# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef puts
Packit Service 4684c1
#   define puts rpl_puts
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (puts, int, (const char *string));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (puts, int, (const char *string));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (puts);
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_REMOVE@
Packit Service 4684c1
# if @REPLACE_REMOVE@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef remove
Packit Service 4684c1
#   define remove rpl_remove
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (remove, int, (const char *name));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (remove, int, (const char *name));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (remove);
Packit Service 4684c1
# endif
Packit Service 4684c1
#elif defined GNULIB_POSIXCHECK
Packit Service 4684c1
# undef remove
Packit Service 4684c1
/* Assume remove is always declared.  */
Packit Service 4684c1
_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - "
Packit Service 4684c1
                 "use gnulib module remove for more portability");
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_RENAME@
Packit Service 4684c1
# if @REPLACE_RENAME@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef rename
Packit Service 4684c1
#   define rename rpl_rename
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (rename, int,
Packit Service 4684c1
                  (const char *old_filename, const char *new_filename)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 2)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (rename, int,
Packit Service 4684c1
                  (const char *old_filename, const char *new_filename));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (rename, int,
Packit Service 4684c1
                  (const char *old_filename, const char *new_filename));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (rename);
Packit Service 4684c1
# endif
Packit Service 4684c1
#elif defined GNULIB_POSIXCHECK
Packit Service 4684c1
# undef rename
Packit Service 4684c1
/* Assume rename is always declared.  */
Packit Service 4684c1
_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - "
Packit Service 4684c1
                 "use gnulib module rename for more portability");
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_RENAMEAT@
Packit Service 4684c1
# if @REPLACE_RENAMEAT@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef renameat
Packit Service 4684c1
#   define renameat rpl_renameat
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (renameat, int,
Packit Service 4684c1
                  (int fd1, char const *file1, int fd2, char const *file2)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((2, 4)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (renameat, int,
Packit Service 4684c1
                  (int fd1, char const *file1, int fd2, char const *file2));
Packit Service 4684c1
# else
Packit Service 4684c1
#  if !@HAVE_RENAMEAT@
Packit Service 4684c1
_GL_FUNCDECL_SYS (renameat, int,
Packit Service 4684c1
                  (int fd1, char const *file1, int fd2, char const *file2)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((2, 4)));
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_CXXALIAS_SYS (renameat, int,
Packit Service 4684c1
                  (int fd1, char const *file1, int fd2, char const *file2));
Packit Service 4684c1
# endif
Packit Service 4684c1
_GL_CXXALIASWARN (renameat);
Packit Service 4684c1
#elif defined GNULIB_POSIXCHECK
Packit Service 4684c1
# undef renameat
Packit Service 4684c1
# if HAVE_RAW_DECL_RENAMEAT
Packit Service 4684c1
_GL_WARN_ON_USE (renameat, "renameat is not portable - "
Packit Service 4684c1
                 "use gnulib module renameat for portability");
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_SCANF@
Packit Service 4684c1
# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
Packit Service 4684c1
#  if defined __GNUC__
Packit Service 4684c1
#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#    undef scanf
Packit Service 4684c1
/* Don't break __attribute__((format(scanf,M,N))).  */
Packit Service 4684c1
#    define scanf __scanf__
Packit Service 4684c1
#   endif
Packit Service 4684c1
_GL_FUNCDECL_RPL_1 (__scanf__, int,
Packit Service 4684c1
                    (const char *restrict format, ...)
Packit Service 4684c1
                    __asm__ (@ASM_SYMBOL_PREFIX@
Packit Service 4684c1
                             _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf))
Packit Service 4684c1
                    _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2)
Packit Service 4684c1
                    _GL_ARG_NONNULL ((1)));
Packit Service 4684c1
_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *restrict format, ...));
Packit Service 4684c1
#  else
Packit Service 4684c1
#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#    undef scanf
Packit Service 4684c1
#    define scanf rpl_scanf
Packit Service 4684c1
#   endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (scanf, int, (const char *restrict format, ...)
Packit Service 4684c1
                              _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2)
Packit Service 4684c1
                              _GL_ARG_NONNULL ((1)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (scanf, int, (const char *restrict format, ...));
Packit Service 4684c1
#  endif
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (scanf, int, (const char *restrict format, ...));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (scanf);
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_SNPRINTF@
Packit Service 4684c1
# if @REPLACE_SNPRINTF@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   define snprintf rpl_snprintf
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (snprintf, int,
Packit Service 4684c1
                  (char *restrict str, size_t size,
Packit Service 4684c1
                   const char *restrict format, ...)
Packit Service 4684c1
                  _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((3)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (snprintf, int,
Packit Service 4684c1
                  (char *restrict str, size_t size,
Packit Service 4684c1
                   const char *restrict format, ...));
Packit Service 4684c1
# else
Packit Service 4684c1
#  if !@HAVE_DECL_SNPRINTF@
Packit Service 4684c1
_GL_FUNCDECL_SYS (snprintf, int,
Packit Service 4684c1
                  (char *restrict str, size_t size,
Packit Service 4684c1
                   const char *restrict format, ...)
Packit Service 4684c1
                  _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((3)));
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_CXXALIAS_SYS (snprintf, int,
Packit Service 4684c1
                  (char *restrict str, size_t size,
Packit Service 4684c1
                   const char *restrict format, ...));
Packit Service 4684c1
# endif
Packit Service 4684c1
_GL_CXXALIASWARN (snprintf);
Packit Service 4684c1
#elif defined GNULIB_POSIXCHECK
Packit Service 4684c1
# undef snprintf
Packit Service 4684c1
# if HAVE_RAW_DECL_SNPRINTF
Packit Service 4684c1
_GL_WARN_ON_USE (snprintf, "snprintf is unportable - "
Packit Service 4684c1
                 "use gnulib module snprintf for portability");
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
/* Some people would argue that all sprintf uses should be warned about
Packit Service 4684c1
   (for example, OpenBSD issues a link warning for it),
Packit Service 4684c1
   since it can cause security holes due to buffer overruns.
Packit Service 4684c1
   However, we believe that sprintf can be used safely, and is more
Packit Service 4684c1
   efficient than snprintf in those safe cases; and as proof of our
Packit Service 4684c1
   belief, we use sprintf in several gnulib modules.  So this header
Packit Service 4684c1
   intentionally avoids adding a warning to sprintf except when
Packit Service 4684c1
   GNULIB_POSIXCHECK is defined.  */
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_SPRINTF_POSIX@
Packit Service 4684c1
# if @REPLACE_SPRINTF@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   define sprintf rpl_sprintf
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (sprintf, int,
Packit Service 4684c1
                  (char *restrict str, const char *restrict format, ...)
Packit Service 4684c1
                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 2)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (sprintf, int,
Packit Service 4684c1
                  (char *restrict str, const char *restrict format, ...));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (sprintf, int,
Packit Service 4684c1
                  (char *restrict str, const char *restrict format, ...));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (sprintf);
Packit Service 4684c1
# endif
Packit Service 4684c1
#elif defined GNULIB_POSIXCHECK
Packit Service 4684c1
# undef sprintf
Packit Service 4684c1
/* Assume sprintf is always declared.  */
Packit Service 4684c1
_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - "
Packit Service 4684c1
                 "use gnulib module sprintf-posix for portable "
Packit Service 4684c1
                 "POSIX compliance");
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_TMPFILE@
Packit Service 4684c1
# if @REPLACE_TMPFILE@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   define tmpfile rpl_tmpfile
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (tmpfile, FILE *, (void));
Packit Service 4684c1
_GL_CXXALIAS_RPL (tmpfile, FILE *, (void));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (tmpfile, FILE *, (void));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (tmpfile);
Packit Service 4684c1
# endif
Packit Service 4684c1
#elif defined GNULIB_POSIXCHECK
Packit Service 4684c1
# undef tmpfile
Packit Service 4684c1
# if HAVE_RAW_DECL_TMPFILE
Packit Service 4684c1
_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - "
Packit Service 4684c1
                 "use gnulib module tmpfile for portability");
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_VASPRINTF@
Packit Service 4684c1
/* Write formatted output to a string dynamically allocated with malloc().
Packit Service 4684c1
   If the memory allocation succeeds, store the address of the string in
Packit Service 4684c1
   *RESULT and return the number of resulting bytes, excluding the trailing
Packit Service 4684c1
   NUL.  Upon memory allocation error, or some other error, return -1.  */
Packit Service 4684c1
# if @REPLACE_VASPRINTF@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   define asprintf rpl_asprintf
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (asprintf, int,
Packit Service 4684c1
                  (char **result, const char *format, ...)
Packit Service 4684c1
                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 2)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (asprintf, int,
Packit Service 4684c1
                  (char **result, const char *format, ...));
Packit Service 4684c1
# else
Packit Service 4684c1
#  if !@HAVE_VASPRINTF@
Packit Service 4684c1
_GL_FUNCDECL_SYS (asprintf, int,
Packit Service 4684c1
                  (char **result, const char *format, ...)
Packit Service 4684c1
                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 2)));
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_CXXALIAS_SYS (asprintf, int,
Packit Service 4684c1
                  (char **result, const char *format, ...));
Packit Service 4684c1
# endif
Packit Service 4684c1
_GL_CXXALIASWARN (asprintf);
Packit Service 4684c1
# if @REPLACE_VASPRINTF@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   define vasprintf rpl_vasprintf
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (vasprintf, int,
Packit Service 4684c1
                  (char **result, const char *format, va_list args)
Packit Service 4684c1
                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 2)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (vasprintf, int,
Packit Service 4684c1
                  (char **result, const char *format, va_list args));
Packit Service 4684c1
# else
Packit Service 4684c1
#  if !@HAVE_VASPRINTF@
Packit Service 4684c1
_GL_FUNCDECL_SYS (vasprintf, int,
Packit Service 4684c1
                  (char **result, const char *format, va_list args)
Packit Service 4684c1
                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 2)));
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_CXXALIAS_SYS (vasprintf, int,
Packit Service 4684c1
                  (char **result, const char *format, va_list args));
Packit Service 4684c1
# endif
Packit Service 4684c1
_GL_CXXALIASWARN (vasprintf);
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_VDPRINTF@
Packit Service 4684c1
# if @REPLACE_VDPRINTF@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   define vdprintf rpl_vdprintf
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (vdprintf, int,
Packit Service 4684c1
                  (int fd, const char *restrict format, va_list args)
Packit Service 4684c1
                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((2)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (vdprintf, int,
Packit Service 4684c1
                  (int fd, const char *restrict format, va_list args));
Packit Service 4684c1
# else
Packit Service 4684c1
#  if !@HAVE_VDPRINTF@
Packit Service 4684c1
_GL_FUNCDECL_SYS (vdprintf, int,
Packit Service 4684c1
                  (int fd, const char *restrict format, va_list args)
Packit Service 4684c1
                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((2)));
Packit Service 4684c1
#  endif
Packit Service 4684c1
/* Need to cast, because on Solaris, the third parameter will likely be
Packit Service 4684c1
                                                    __va_list args.  */
Packit Service 4684c1
_GL_CXXALIAS_SYS_CAST (vdprintf, int,
Packit Service 4684c1
                       (int fd, const char *restrict format, va_list args));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (vdprintf);
Packit Service 4684c1
# endif
Packit Service 4684c1
#elif defined GNULIB_POSIXCHECK
Packit Service 4684c1
# undef vdprintf
Packit Service 4684c1
# if HAVE_RAW_DECL_VDPRINTF
Packit Service 4684c1
_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - "
Packit Service 4684c1
                 "use gnulib module vdprintf for portability");
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_VFPRINTF_POSIX@ || @GNULIB_VFPRINTF@
Packit Service 4684c1
# if (@GNULIB_VFPRINTF_POSIX@ && @REPLACE_VFPRINTF@) \
Packit Service 4684c1
     || (@GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@))
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   define vfprintf rpl_vfprintf
Packit Service 4684c1
#  endif
Packit Service 4684c1
#  define GNULIB_overrides_vfprintf 1
Packit Service 4684c1
#  if @GNULIB_VFPRINTF_POSIX@
Packit Service 4684c1
_GL_FUNCDECL_RPL (vfprintf, int,
Packit Service 4684c1
                  (FILE *restrict fp,
Packit Service 4684c1
                   const char *restrict format, va_list args)
Packit Service 4684c1
                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 2)));
Packit Service 4684c1
#  else
Packit Service 4684c1
_GL_FUNCDECL_RPL (vfprintf, int,
Packit Service 4684c1
                  (FILE *restrict fp,
Packit Service 4684c1
                   const char *restrict format, va_list args)
Packit Service 4684c1
                  _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 2)));
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_CXXALIAS_RPL (vfprintf, int,
Packit Service 4684c1
                  (FILE *restrict fp,
Packit Service 4684c1
                   const char *restrict format, va_list args));
Packit Service 4684c1
# else
Packit Service 4684c1
/* Need to cast, because on Solaris, the third parameter is
Packit Service 4684c1
                                                      __va_list args
Packit Service 4684c1
   and GCC's fixincludes did not change this to __gnuc_va_list.  */
Packit Service 4684c1
_GL_CXXALIAS_SYS_CAST (vfprintf, int,
Packit Service 4684c1
                       (FILE *restrict fp,
Packit Service 4684c1
                        const char *restrict format, va_list args));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (vfprintf);
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
#if !@GNULIB_VFPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
Packit Service 4684c1
# if !GNULIB_overrides_vfprintf
Packit Service 4684c1
#  undef vfprintf
Packit Service 4684c1
# endif
Packit Service 4684c1
/* Assume vfprintf is always declared.  */
Packit Service 4684c1
_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - "
Packit Service 4684c1
                 "use gnulib module vfprintf-posix for portable "
Packit Service 4684c1
                      "POSIX compliance");
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_VFSCANF@
Packit Service 4684c1
# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef vfscanf
Packit Service 4684c1
#   define vfscanf rpl_vfscanf
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (vfscanf, int,
Packit Service 4684c1
                  (FILE *restrict stream,
Packit Service 4684c1
                   const char *restrict format, va_list args)
Packit Service 4684c1
                  _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 2)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (vfscanf, int,
Packit Service 4684c1
                  (FILE *restrict stream,
Packit Service 4684c1
                   const char *restrict format, va_list args));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (vfscanf, int,
Packit Service 4684c1
                  (FILE *restrict stream,
Packit Service 4684c1
                   const char *restrict format, va_list args));
Packit Service 4684c1
# endif
Packit Service 4684c1
_GL_CXXALIASWARN (vfscanf);
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@
Packit Service 4684c1
# if (@GNULIB_VPRINTF_POSIX@ && @REPLACE_VPRINTF@) \
Packit Service 4684c1
     || (@GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@))
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   define vprintf rpl_vprintf
Packit Service 4684c1
#  endif
Packit Service 4684c1
#  define GNULIB_overrides_vprintf 1
Packit Service 4684c1
#  if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@
Packit Service 4684c1
_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args)
Packit Service 4684c1
                                _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0)
Packit Service 4684c1
                                _GL_ARG_NONNULL ((1)));
Packit Service 4684c1
#  else
Packit Service 4684c1
_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args)
Packit Service 4684c1
                                _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0)
Packit Service 4684c1
                                _GL_ARG_NONNULL ((1)));
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_CXXALIAS_RPL (vprintf, int, (const char *restrict format, va_list args));
Packit Service 4684c1
# else
Packit Service 4684c1
/* Need to cast, because on Solaris, the second parameter is
Packit Service 4684c1
                                                          __va_list args
Packit Service 4684c1
   and GCC's fixincludes did not change this to __gnuc_va_list.  */
Packit Service 4684c1
_GL_CXXALIAS_SYS_CAST (vprintf, int,
Packit Service 4684c1
                       (const char *restrict format, va_list args));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (vprintf);
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
#if !@GNULIB_VPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
Packit Service 4684c1
# if !GNULIB_overrides_vprintf
Packit Service 4684c1
#  undef vprintf
Packit Service 4684c1
# endif
Packit Service 4684c1
/* Assume vprintf is always declared.  */
Packit Service 4684c1
_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - "
Packit Service 4684c1
                 "use gnulib module vprintf-posix for portable "
Packit Service 4684c1
                 "POSIX compliance");
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_VSCANF@
Packit Service 4684c1
# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   undef vscanf
Packit Service 4684c1
#   define vscanf rpl_vscanf
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (vscanf, int, (const char *restrict format, va_list args)
Packit Service 4684c1
                               _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0)
Packit Service 4684c1
                               _GL_ARG_NONNULL ((1)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args));
Packit Service 4684c1
# else
Packit Service 4684c1
_GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args));
Packit Service 4684c1
# endif
Packit Service 4684c1
_GL_CXXALIASWARN (vscanf);
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_VSNPRINTF@
Packit Service 4684c1
# if @REPLACE_VSNPRINTF@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   define vsnprintf rpl_vsnprintf
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (vsnprintf, int,
Packit Service 4684c1
                  (char *restrict str, size_t size,
Packit Service 4684c1
                   const char *restrict format, va_list args)
Packit Service 4684c1
                  _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((3)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (vsnprintf, int,
Packit Service 4684c1
                  (char *restrict str, size_t size,
Packit Service 4684c1
                   const char *restrict format, va_list args));
Packit Service 4684c1
# else
Packit Service 4684c1
#  if !@HAVE_DECL_VSNPRINTF@
Packit Service 4684c1
_GL_FUNCDECL_SYS (vsnprintf, int,
Packit Service 4684c1
                  (char *restrict str, size_t size,
Packit Service 4684c1
                   const char *restrict format, va_list args)
Packit Service 4684c1
                  _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((3)));
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_CXXALIAS_SYS (vsnprintf, int,
Packit Service 4684c1
                  (char *restrict str, size_t size,
Packit Service 4684c1
                   const char *restrict format, va_list args));
Packit Service 4684c1
# endif
Packit Service 4684c1
_GL_CXXALIASWARN (vsnprintf);
Packit Service 4684c1
#elif defined GNULIB_POSIXCHECK
Packit Service 4684c1
# undef vsnprintf
Packit Service 4684c1
# if HAVE_RAW_DECL_VSNPRINTF
Packit Service 4684c1
_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - "
Packit Service 4684c1
                 "use gnulib module vsnprintf for portability");
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if @GNULIB_VSPRINTF_POSIX@
Packit Service 4684c1
# if @REPLACE_VSPRINTF@
Packit Service 4684c1
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service 4684c1
#   define vsprintf rpl_vsprintf
Packit Service 4684c1
#  endif
Packit Service 4684c1
_GL_FUNCDECL_RPL (vsprintf, int,
Packit Service 4684c1
                  (char *restrict str,
Packit Service 4684c1
                   const char *restrict format, va_list args)
Packit Service 4684c1
                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
Packit Service 4684c1
                  _GL_ARG_NONNULL ((1, 2)));
Packit Service 4684c1
_GL_CXXALIAS_RPL (vsprintf, int,
Packit Service 4684c1
                  (char *restrict str,
Packit Service 4684c1
                   const char *restrict format, va_list args));
Packit Service 4684c1
# else
Packit Service 4684c1
/* Need to cast, because on Solaris, the third parameter is
Packit Service 4684c1
                                                       __va_list args
Packit Service 4684c1
   and GCC's fixincludes did not change this to __gnuc_va_list.  */
Packit Service 4684c1
_GL_CXXALIAS_SYS_CAST (vsprintf, int,
Packit Service 4684c1
                       (char *restrict str,
Packit Service 4684c1
                        const char *restrict format, va_list args));
Packit Service 4684c1
# endif
Packit Service 4684c1
# if __GLIBC__ >= 2
Packit Service 4684c1
_GL_CXXALIASWARN (vsprintf);
Packit Service 4684c1
# endif
Packit Service 4684c1
#elif defined GNULIB_POSIXCHECK
Packit Service 4684c1
# undef vsprintf
Packit Service 4684c1
/* Assume vsprintf is always declared.  */
Packit Service 4684c1
_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - "
Packit Service 4684c1
                 "use gnulib module vsprintf-posix for portable "
Packit Service 4684c1
                      "POSIX compliance");
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#endif /* _@GUARD_PREFIX@_STDIO_H */
Packit Service 4684c1
#endif /* _@GUARD_PREFIX@_STDIO_H */
Packit Service 4684c1
#endif