Blame lib/stdlib.in.h

Packit Service a2489d
/* A GNU-like <stdlib.h>.
Packit Service a2489d
Packit Service a2489d
   Copyright (C) 1995, 2001-2004, 2006-2018 Free Software Foundation, Inc.
Packit Service a2489d
Packit Service a2489d
   This program is free software: you can redistribute it and/or modify
Packit Service a2489d
   it under the terms of the GNU General Public License as published by
Packit Service a2489d
   the Free Software Foundation; either version 3 of the License, or
Packit Service a2489d
   (at your option) any later version.
Packit Service a2489d
Packit Service a2489d
   This program is distributed in the hope that it will be useful,
Packit Service a2489d
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service a2489d
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service a2489d
   GNU General Public License for more details.
Packit Service a2489d
Packit Service a2489d
   You should have received a copy of the GNU General Public License
Packit Service a2489d
   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
Packit Service a2489d
Packit Service a2489d
#if __GNUC__ >= 3
Packit Service a2489d
@PRAGMA_SYSTEM_HEADER@
Packit Service a2489d
#endif
Packit Service a2489d
@PRAGMA_COLUMNS@
Packit Service a2489d
Packit Service a2489d
#if defined __need_system_stdlib_h || defined __need_malloc_and_calloc
Packit Service a2489d
/* Special invocation conventions inside some gnulib header files,
Packit Service a2489d
   and inside some glibc header files, respectively.  */
Packit Service a2489d
Packit Service a2489d
#@INCLUDE_NEXT@ @NEXT_STDLIB_H@
Packit Service a2489d
Packit Service a2489d
#else
Packit Service a2489d
/* Normal invocation convention.  */
Packit Service a2489d
Packit Service a2489d
#ifndef _@GUARD_PREFIX@_STDLIB_H
Packit Service a2489d
Packit Service a2489d
/* The include_next requires a split double-inclusion guard.  */
Packit Service a2489d
#@INCLUDE_NEXT@ @NEXT_STDLIB_H@
Packit Service a2489d
Packit Service a2489d
#ifndef _@GUARD_PREFIX@_STDLIB_H
Packit Service a2489d
#define _@GUARD_PREFIX@_STDLIB_H
Packit Service a2489d
Packit Service a2489d
/* NetBSD 5.0 mis-defines NULL.  */
Packit Service a2489d
#include <stddef.h>
Packit Service a2489d
Packit Service a2489d
/* MirBSD 10 defines WEXITSTATUS in <sys/wait.h>, not in <stdlib.h>.  */
Packit Service a2489d
#if @GNULIB_SYSTEM_POSIX@ && !defined WEXITSTATUS
Packit Service a2489d
# include <sys/wait.h>
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
/* Solaris declares getloadavg() in <sys/loadavg.h>.  */
Packit Service a2489d
#if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@
Packit Service a2489d
/* OpenIndiana has a bug: <sys/time.h> must be included before
Packit Service a2489d
   <sys/loadavg.h>.  */
Packit Service a2489d
# include <sys/time.h>
Packit Service a2489d
# include <sys/loadavg.h>
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
/* Native Windows platforms declare mktemp() in <io.h>.  */
Packit Service a2489d
#if 0 && (defined _WIN32 && ! defined __CYGWIN__)
Packit Service a2489d
# include <io.h>
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_RANDOM_R@
Packit Service a2489d
Packit Service a2489d
/* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included
Packit Service a2489d
   from <stdlib.h> if _REENTRANT is defined.  Include it whenever we need
Packit Service a2489d
   'struct random_data'.  */
Packit Service a2489d
# if @HAVE_RANDOM_H@
Packit Service a2489d
#  include <random.h>
Packit Service a2489d
# endif
Packit Service a2489d
Packit Service a2489d
# if !@HAVE_STRUCT_RANDOM_DATA@ || @REPLACE_RANDOM_R@ || !@HAVE_RANDOM_R@
Packit Service a2489d
#  include <stdint.h>
Packit Service a2489d
# endif
Packit Service a2489d
Packit Service a2489d
# if !@HAVE_STRUCT_RANDOM_DATA@
Packit Service a2489d
/* Define 'struct random_data'.
Packit Service a2489d
   But allow multiple gnulib generated <stdlib.h> replacements to coexist.  */
Packit Service a2489d
#  if !GNULIB_defined_struct_random_data
Packit Service a2489d
struct random_data
Packit Service a2489d
{
Packit Service a2489d
  int32_t *fptr;                /* Front pointer.  */
Packit Service a2489d
  int32_t *rptr;                /* Rear pointer.  */
Packit Service a2489d
  int32_t *state;               /* Array of state values.  */
Packit Service a2489d
  int rand_type;                /* Type of random number generator.  */
Packit Service a2489d
  int rand_deg;                 /* Degree of random number generator.  */
Packit Service a2489d
  int rand_sep;                 /* Distance between front and rear.  */
Packit Service a2489d
  int32_t *end_ptr;             /* Pointer behind state table.  */
Packit Service a2489d
};
Packit Service a2489d
#   define GNULIB_defined_struct_random_data 1
Packit Service a2489d
#  endif
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !(defined _WIN32 && ! defined __CYGWIN__)
Packit Service a2489d
/* On Mac OS X 10.3, only <unistd.h> declares mkstemp.  */
Packit Service a2489d
/* On Mac OS X 10.5, only <unistd.h> declares mkstemps.  */
Packit Service a2489d
/* On Cygwin 1.7.1, only <unistd.h> declares getsubopt.  */
Packit Service a2489d
/* But avoid namespace pollution on glibc systems and native Windows.  */
Packit Service a2489d
# include <unistd.h>
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
/* The __attribute__ feature is available in gcc versions 2.5 and later.
Packit Service a2489d
   The attribute __pure__ was added in gcc 2.96.  */
Packit Service a2489d
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
Packit Service a2489d
# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
Packit Service a2489d
#else
Packit Service a2489d
# define _GL_ATTRIBUTE_PURE /* empty */
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
/* The definition of _Noreturn is copied here.  */
Packit Service a2489d
Packit Service a2489d
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
Packit Service a2489d
Packit Service a2489d
/* The definition of _GL_ARG_NONNULL is copied here.  */
Packit Service a2489d
Packit Service a2489d
/* The definition of _GL_WARN_ON_USE is copied here.  */
Packit Service a2489d
Packit Service a2489d
Packit Service a2489d
/* Some systems do not define EXIT_*, despite otherwise supporting C89.  */
Packit Service a2489d
#ifndef EXIT_SUCCESS
Packit Service a2489d
# define EXIT_SUCCESS 0
Packit Service a2489d
#endif
Packit Service a2489d
/* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere
Packit Service a2489d
   with proper operation of xargs.  */
Packit Service a2489d
#ifndef EXIT_FAILURE
Packit Service a2489d
# define EXIT_FAILURE 1
Packit Service a2489d
#elif EXIT_FAILURE != 1
Packit Service a2489d
# undef EXIT_FAILURE
Packit Service a2489d
# define EXIT_FAILURE 1
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
Packit Service a2489d
#if @GNULIB__EXIT@
Packit Service a2489d
/* Terminate the current process with the given return code, without running
Packit Service a2489d
   the 'atexit' handlers.  */
Packit Service a2489d
# if !@HAVE__EXIT@
Packit Service a2489d
_GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (_Exit, void, (int status));
Packit Service a2489d
_GL_CXXALIASWARN (_Exit);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef _Exit
Packit Service a2489d
# if HAVE_RAW_DECL__EXIT
Packit Service a2489d
_GL_WARN_ON_USE (_Exit, "_Exit is unportable - "
Packit Service a2489d
                 "use gnulib module _Exit for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_ATOLL@
Packit Service a2489d
/* Parse a signed decimal integer.
Packit Service a2489d
   Returns the value of the integer.  Errors are not detected.  */
Packit Service a2489d
# if !@HAVE_ATOLL@
Packit Service a2489d
_GL_FUNCDECL_SYS (atoll, long long, (const char *string)
Packit Service a2489d
                                    _GL_ATTRIBUTE_PURE
Packit Service a2489d
                                    _GL_ARG_NONNULL ((1)));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (atoll, long long, (const char *string));
Packit Service a2489d
_GL_CXXALIASWARN (atoll);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef atoll
Packit Service a2489d
# if HAVE_RAW_DECL_ATOLL
Packit Service a2489d
_GL_WARN_ON_USE (atoll, "atoll is unportable - "
Packit Service a2489d
                 "use gnulib module atoll for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_CALLOC_POSIX@
Packit Service a2489d
# if @REPLACE_CALLOC@
Packit Service a2489d
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2489d
#   undef calloc
Packit Service a2489d
#   define calloc rpl_calloc
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size));
Packit Service a2489d
_GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size));
Packit Service a2489d
# else
Packit Service a2489d
_GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIASWARN (calloc);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef calloc
Packit Service a2489d
/* Assume calloc is always declared.  */
Packit Service a2489d
_GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - "
Packit Service a2489d
                 "use gnulib module calloc-posix for portability");
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_CANONICALIZE_FILE_NAME@
Packit Service a2489d
# if @REPLACE_CANONICALIZE_FILE_NAME@
Packit Service a2489d
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2489d
#   define canonicalize_file_name rpl_canonicalize_file_name
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name)
Packit Service a2489d
                                                  _GL_ARG_NONNULL ((1)));
Packit Service a2489d
_GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name));
Packit Service a2489d
# else
Packit Service a2489d
#  if !@HAVE_CANONICALIZE_FILE_NAME@
Packit Service a2489d
_GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name)
Packit Service a2489d
                                                  _GL_ARG_NONNULL ((1)));
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIASWARN (canonicalize_file_name);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef canonicalize_file_name
Packit Service a2489d
# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
Packit Service a2489d
_GL_WARN_ON_USE (canonicalize_file_name,
Packit Service a2489d
                 "canonicalize_file_name is unportable - "
Packit Service a2489d
                 "use gnulib module canonicalize-lgpl for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_GETLOADAVG@
Packit Service a2489d
/* Store max(NELEM,3) load average numbers in LOADAVG[].
Packit Service a2489d
   The three numbers are the load average of the last 1 minute, the last 5
Packit Service a2489d
   minutes, and the last 15 minutes, respectively.
Packit Service a2489d
   LOADAVG is an array of NELEM numbers.  */
Packit Service a2489d
# if !@HAVE_DECL_GETLOADAVG@
Packit Service a2489d
_GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem)
Packit Service a2489d
                                   _GL_ARG_NONNULL ((1)));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem));
Packit Service a2489d
_GL_CXXALIASWARN (getloadavg);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef getloadavg
Packit Service a2489d
# if HAVE_RAW_DECL_GETLOADAVG
Packit Service a2489d
_GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
Packit Service a2489d
                 "use gnulib module getloadavg for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_GETSUBOPT@
Packit Service a2489d
/* Assuming *OPTIONP is a comma separated list of elements of the form
Packit Service a2489d
   "token" or "token=value", getsubopt parses the first of these elements.
Packit Service a2489d
   If the first element refers to a "token" that is member of the given
Packit Service a2489d
   NULL-terminated array of tokens:
Packit Service a2489d
     - It replaces the comma with a NUL byte, updates *OPTIONP to point past
Packit Service a2489d
       the first option and the comma, sets *VALUEP to the value of the
Packit Service a2489d
       element (or NULL if it doesn't contain an "=" sign),
Packit Service a2489d
     - It returns the index of the "token" in the given array of tokens.
Packit Service a2489d
   Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined.
Packit Service a2489d
   For more details see the POSIX:2001 specification.
Packit Service a2489d
   http://www.opengroup.org/susv3xsh/getsubopt.html */
Packit Service a2489d
# if !@HAVE_GETSUBOPT@
Packit Service a2489d
_GL_FUNCDECL_SYS (getsubopt, int,
Packit Service a2489d
                  (char **optionp, char *const *tokens, char **valuep)
Packit Service a2489d
                  _GL_ARG_NONNULL ((1, 2, 3)));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (getsubopt, int,
Packit Service a2489d
                  (char **optionp, char *const *tokens, char **valuep));
Packit Service a2489d
_GL_CXXALIASWARN (getsubopt);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef getsubopt
Packit Service a2489d
# if HAVE_RAW_DECL_GETSUBOPT
Packit Service a2489d
_GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - "
Packit Service a2489d
                 "use gnulib module getsubopt for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_GRANTPT@
Packit Service a2489d
/* Change the ownership and access permission of the slave side of the
Packit Service a2489d
   pseudo-terminal whose master side is specified by FD.  */
Packit Service a2489d
# if !@HAVE_GRANTPT@
Packit Service a2489d
_GL_FUNCDECL_SYS (grantpt, int, (int fd));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (grantpt, int, (int fd));
Packit Service a2489d
_GL_CXXALIASWARN (grantpt);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef grantpt
Packit Service a2489d
# if HAVE_RAW_DECL_GRANTPT
Packit Service a2489d
_GL_WARN_ON_USE (grantpt, "grantpt is not portable - "
Packit Service a2489d
                 "use gnulib module grantpt for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
/* If _GL_USE_STDLIB_ALLOC is nonzero, the including module does not
Packit Service a2489d
   rely on GNU or POSIX semantics for malloc and realloc (for example,
Packit Service a2489d
   by never specifying a zero size), so it does not need malloc or
Packit Service a2489d
   realloc to be redefined.  */
Packit Service a2489d
#if @GNULIB_MALLOC_POSIX@
Packit Service a2489d
# if @REPLACE_MALLOC@
Packit Service a2489d
#  if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
Packit Service a2489d
        || _GL_USE_STDLIB_ALLOC)
Packit Service a2489d
#   undef malloc
Packit Service a2489d
#   define malloc rpl_malloc
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_FUNCDECL_RPL (malloc, void *, (size_t size));
Packit Service a2489d
_GL_CXXALIAS_RPL (malloc, void *, (size_t size));
Packit Service a2489d
# else
Packit Service a2489d
_GL_CXXALIAS_SYS (malloc, void *, (size_t size));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIASWARN (malloc);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
Packit Service a2489d
# undef malloc
Packit Service a2489d
/* Assume malloc is always declared.  */
Packit Service a2489d
_GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
Packit Service a2489d
                 "use gnulib module malloc-posix for portability");
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
/* Convert a multibyte character to a wide character.  */
Packit Service a2489d
#if @GNULIB_MBTOWC@
Packit Service a2489d
# if @REPLACE_MBTOWC@
Packit Service a2489d
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2489d
#   undef mbtowc
Packit Service a2489d
#   define mbtowc rpl_mbtowc
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
Packit Service a2489d
_GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
Packit Service a2489d
# else
Packit Service a2489d
_GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIASWARN (mbtowc);
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_MKDTEMP@
Packit Service a2489d
/* Create a unique temporary directory from TEMPLATE.
Packit Service a2489d
   The last six characters of TEMPLATE must be "XXXXXX";
Packit Service a2489d
   they are replaced with a string that makes the directory name unique.
Packit Service a2489d
   Returns TEMPLATE, or a null pointer if it cannot get a unique name.
Packit Service a2489d
   The directory is created mode 700.  */
Packit Service a2489d
# if !@HAVE_MKDTEMP@
Packit Service a2489d
_GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1)));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/));
Packit Service a2489d
_GL_CXXALIASWARN (mkdtemp);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef mkdtemp
Packit Service a2489d
# if HAVE_RAW_DECL_MKDTEMP
Packit Service a2489d
_GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - "
Packit Service a2489d
                 "use gnulib module mkdtemp for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_MKOSTEMP@
Packit Service a2489d
/* Create a unique temporary file from TEMPLATE.
Packit Service a2489d
   The last six characters of TEMPLATE must be "XXXXXX";
Packit Service a2489d
   they are replaced with a string that makes the file name unique.
Packit Service a2489d
   The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
Packit Service a2489d
   and O_TEXT, O_BINARY (defined in "binary-io.h").
Packit Service a2489d
   The file is then created, with the specified flags, ensuring it didn't exist
Packit Service a2489d
   before.
Packit Service a2489d
   The file is created read-write (mask at least 0600 & ~umask), but it may be
Packit Service a2489d
   world-readable and world-writable (mask 0666 & ~umask), depending on the
Packit Service a2489d
   implementation.
Packit Service a2489d
   Returns the open file descriptor if successful, otherwise -1 and errno
Packit Service a2489d
   set.  */
Packit Service a2489d
# if !@HAVE_MKOSTEMP@
Packit Service a2489d
_GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)
Packit Service a2489d
                                 _GL_ARG_NONNULL ((1)));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/));
Packit Service a2489d
_GL_CXXALIASWARN (mkostemp);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef mkostemp
Packit Service a2489d
# if HAVE_RAW_DECL_MKOSTEMP
Packit Service a2489d
_GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - "
Packit Service a2489d
                 "use gnulib module mkostemp for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_MKOSTEMPS@
Packit Service a2489d
/* Create a unique temporary file from TEMPLATE.
Packit Service a2489d
   The last six characters of TEMPLATE before a suffix of length
Packit Service a2489d
   SUFFIXLEN must be "XXXXXX";
Packit Service a2489d
   they are replaced with a string that makes the file name unique.
Packit Service a2489d
   The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
Packit Service a2489d
   and O_TEXT, O_BINARY (defined in "binary-io.h").
Packit Service a2489d
   The file is then created, with the specified flags, ensuring it didn't exist
Packit Service a2489d
   before.
Packit Service a2489d
   The file is created read-write (mask at least 0600 & ~umask), but it may be
Packit Service a2489d
   world-readable and world-writable (mask 0666 & ~umask), depending on the
Packit Service a2489d
   implementation.
Packit Service a2489d
   Returns the open file descriptor if successful, otherwise -1 and errno
Packit Service a2489d
   set.  */
Packit Service a2489d
# if !@HAVE_MKOSTEMPS@
Packit Service a2489d
_GL_FUNCDECL_SYS (mkostemps, int,
Packit Service a2489d
                  (char * /*template*/, int /*suffixlen*/, int /*flags*/)
Packit Service a2489d
                  _GL_ARG_NONNULL ((1)));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (mkostemps, int,
Packit Service a2489d
                  (char * /*template*/, int /*suffixlen*/, int /*flags*/));
Packit Service a2489d
_GL_CXXALIASWARN (mkostemps);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef mkostemps
Packit Service a2489d
# if HAVE_RAW_DECL_MKOSTEMPS
Packit Service a2489d
_GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - "
Packit Service a2489d
                 "use gnulib module mkostemps for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_MKSTEMP@
Packit Service a2489d
/* Create a unique temporary file from TEMPLATE.
Packit Service a2489d
   The last six characters of TEMPLATE must be "XXXXXX";
Packit Service a2489d
   they are replaced with a string that makes the file name unique.
Packit Service a2489d
   The file is then created, ensuring it didn't exist before.
Packit Service a2489d
   The file is created read-write (mask at least 0600 & ~umask), but it may be
Packit Service a2489d
   world-readable and world-writable (mask 0666 & ~umask), depending on the
Packit Service a2489d
   implementation.
Packit Service a2489d
   Returns the open file descriptor if successful, otherwise -1 and errno
Packit Service a2489d
   set.  */
Packit Service a2489d
# if @REPLACE_MKSTEMP@
Packit Service a2489d
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2489d
#   define mkstemp rpl_mkstemp
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1)));
Packit Service a2489d
_GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/));
Packit Service a2489d
# else
Packit Service a2489d
#  if ! @HAVE_MKSTEMP@
Packit Service a2489d
_GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1)));
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIASWARN (mkstemp);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef mkstemp
Packit Service a2489d
# if HAVE_RAW_DECL_MKSTEMP
Packit Service a2489d
_GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - "
Packit Service a2489d
                 "use gnulib module mkstemp for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_MKSTEMPS@
Packit Service a2489d
/* Create a unique temporary file from TEMPLATE.
Packit Service a2489d
   The last six characters of TEMPLATE prior to a suffix of length
Packit Service a2489d
   SUFFIXLEN must be "XXXXXX";
Packit Service a2489d
   they are replaced with a string that makes the file name unique.
Packit Service a2489d
   The file is then created, ensuring it didn't exist before.
Packit Service a2489d
   The file is created read-write (mask at least 0600 & ~umask), but it may be
Packit Service a2489d
   world-readable and world-writable (mask 0666 & ~umask), depending on the
Packit Service a2489d
   implementation.
Packit Service a2489d
   Returns the open file descriptor if successful, otherwise -1 and errno
Packit Service a2489d
   set.  */
Packit Service a2489d
# if !@HAVE_MKSTEMPS@
Packit Service a2489d
_GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)
Packit Service a2489d
                                 _GL_ARG_NONNULL ((1)));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/));
Packit Service a2489d
_GL_CXXALIASWARN (mkstemps);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef mkstemps
Packit Service a2489d
# if HAVE_RAW_DECL_MKSTEMPS
Packit Service a2489d
_GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - "
Packit Service a2489d
                 "use gnulib module mkstemps for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_POSIX_OPENPT@
Packit Service a2489d
/* Return an FD open to the master side of a pseudo-terminal.  Flags should
Packit Service a2489d
   include O_RDWR, and may also include O_NOCTTY.  */
Packit Service a2489d
# if !@HAVE_POSIX_OPENPT@
Packit Service a2489d
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (posix_openpt, int, (int flags));
Packit Service a2489d
_GL_CXXALIASWARN (posix_openpt);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef posix_openpt
Packit Service a2489d
# if HAVE_RAW_DECL_POSIX_OPENPT
Packit Service a2489d
_GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - "
Packit Service a2489d
                 "use gnulib module posix_openpt for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_PTSNAME@
Packit Service a2489d
/* Return the pathname of the pseudo-terminal slave associated with
Packit Service a2489d
   the master FD is open on, or NULL on errors.  */
Packit Service a2489d
# if @REPLACE_PTSNAME@
Packit Service a2489d
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2489d
#   undef ptsname
Packit Service a2489d
#   define ptsname rpl_ptsname
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_FUNCDECL_RPL (ptsname, char *, (int fd));
Packit Service a2489d
_GL_CXXALIAS_RPL (ptsname, char *, (int fd));
Packit Service a2489d
# else
Packit Service a2489d
#  if !@HAVE_PTSNAME@
Packit Service a2489d
_GL_FUNCDECL_SYS (ptsname, char *, (int fd));
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_CXXALIAS_SYS (ptsname, char *, (int fd));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIASWARN (ptsname);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef ptsname
Packit Service a2489d
# if HAVE_RAW_DECL_PTSNAME
Packit Service a2489d
_GL_WARN_ON_USE (ptsname, "ptsname is not portable - "
Packit Service a2489d
                 "use gnulib module ptsname for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_PTSNAME_R@
Packit Service a2489d
/* Set the pathname of the pseudo-terminal slave associated with
Packit Service a2489d
   the master FD is open on and return 0, or set errno and return
Packit Service a2489d
   non-zero on errors.  */
Packit Service a2489d
# if @REPLACE_PTSNAME_R@
Packit Service a2489d
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2489d
#   undef ptsname_r
Packit Service a2489d
#   define ptsname_r rpl_ptsname_r
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len));
Packit Service a2489d
_GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len));
Packit Service a2489d
# else
Packit Service a2489d
#  if !@HAVE_PTSNAME_R@
Packit Service a2489d
_GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIASWARN (ptsname_r);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef ptsname_r
Packit Service a2489d
# if HAVE_RAW_DECL_PTSNAME_R
Packit Service a2489d
_GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - "
Packit Service a2489d
                 "use gnulib module ptsname_r for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_PUTENV@
Packit Service a2489d
# if @REPLACE_PUTENV@
Packit Service a2489d
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2489d
#   undef putenv
Packit Service a2489d
#   define putenv rpl_putenv
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1)));
Packit Service a2489d
_GL_CXXALIAS_RPL (putenv, int, (char *string));
Packit Service a2489d
# else
Packit Service a2489d
_GL_CXXALIAS_SYS (putenv, int, (char *string));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIASWARN (putenv);
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_QSORT_R@
Packit Service a2489d
/* Sort an array of NMEMB elements, starting at address BASE, each element
Packit Service a2489d
   occupying SIZE bytes, in ascending order according to the comparison
Packit Service a2489d
   function COMPARE.  */
Packit Service a2489d
# if @REPLACE_QSORT_R@
Packit Service a2489d
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2489d
#   undef qsort_r
Packit Service a2489d
#   define qsort_r rpl_qsort_r
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
Packit Service a2489d
                                  int (*compare) (void const *, void const *,
Packit Service a2489d
                                                  void *),
Packit Service a2489d
                                  void *arg) _GL_ARG_NONNULL ((1, 4)));
Packit Service a2489d
_GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
Packit Service a2489d
                                  int (*compare) (void const *, void const *,
Packit Service a2489d
                                                  void *),
Packit Service a2489d
                                  void *arg));
Packit Service a2489d
# else
Packit Service a2489d
#  if !@HAVE_QSORT_R@
Packit Service a2489d
_GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
Packit Service a2489d
                                  int (*compare) (void const *, void const *,
Packit Service a2489d
                                                  void *),
Packit Service a2489d
                                  void *arg) _GL_ARG_NONNULL ((1, 4)));
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
Packit Service a2489d
                                  int (*compare) (void const *, void const *,
Packit Service a2489d
                                                  void *),
Packit Service a2489d
                                  void *arg));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIASWARN (qsort_r);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef qsort_r
Packit Service a2489d
# if HAVE_RAW_DECL_QSORT_R
Packit Service a2489d
_GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - "
Packit Service a2489d
                 "use gnulib module qsort_r for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_RANDOM_R@
Packit Service a2489d
# if !@HAVE_RANDOM_R@
Packit Service a2489d
#  ifndef RAND_MAX
Packit Service a2489d
#   define RAND_MAX 2147483647
Packit Service a2489d
#  endif
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_RANDOM@
Packit Service a2489d
# if !@HAVE_RANDOM@
Packit Service a2489d
_GL_FUNCDECL_SYS (random, long, (void));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (random, long, (void));
Packit Service a2489d
_GL_CXXALIASWARN (random);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef random
Packit Service a2489d
# if HAVE_RAW_DECL_RANDOM
Packit Service a2489d
_GL_WARN_ON_USE (random, "random is unportable - "
Packit Service a2489d
                 "use gnulib module random for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_RANDOM@
Packit Service a2489d
# if !@HAVE_RANDOM@
Packit Service a2489d
_GL_FUNCDECL_SYS (srandom, void, (unsigned int seed));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (srandom, void, (unsigned int seed));
Packit Service a2489d
_GL_CXXALIASWARN (srandom);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef srandom
Packit Service a2489d
# if HAVE_RAW_DECL_SRANDOM
Packit Service a2489d
_GL_WARN_ON_USE (srandom, "srandom is unportable - "
Packit Service a2489d
                 "use gnulib module random for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_RANDOM@
Packit Service a2489d
# if !@HAVE_RANDOM@ || !@HAVE_DECL_INITSTATE@
Packit Service a2489d
_GL_FUNCDECL_SYS (initstate, char *,
Packit Service a2489d
                  (unsigned int seed, char *buf, size_t buf_size)
Packit Service a2489d
                  _GL_ARG_NONNULL ((2)));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (initstate, char *,
Packit Service a2489d
                  (unsigned int seed, char *buf, size_t buf_size));
Packit Service a2489d
_GL_CXXALIASWARN (initstate);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef initstate
Packit Service a2489d
# if HAVE_RAW_DECL_INITSTATE_R
Packit Service a2489d
_GL_WARN_ON_USE (initstate, "initstate is unportable - "
Packit Service a2489d
                 "use gnulib module random for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_RANDOM@
Packit Service a2489d
# if !@HAVE_RANDOM@ || !@HAVE_DECL_SETSTATE@
Packit Service a2489d
_GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1)));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (setstate, char *, (char *arg_state));
Packit Service a2489d
_GL_CXXALIASWARN (setstate);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef setstate
Packit Service a2489d
# if HAVE_RAW_DECL_SETSTATE_R
Packit Service a2489d
_GL_WARN_ON_USE (setstate, "setstate is unportable - "
Packit Service a2489d
                 "use gnulib module random for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_RANDOM_R@
Packit Service a2489d
# if @REPLACE_RANDOM_R@
Packit Service a2489d
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2489d
#   undef random_r
Packit Service a2489d
#   define random_r rpl_random_r
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_FUNCDECL_RPL (random_r, int, (struct random_data *buf, int32_t *result)
Packit Service a2489d
                                 _GL_ARG_NONNULL ((1, 2)));
Packit Service a2489d
_GL_CXXALIAS_RPL (random_r, int, (struct random_data *buf, int32_t *result));
Packit Service a2489d
# else
Packit Service a2489d
#  if !@HAVE_RANDOM_R@
Packit Service a2489d
_GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result)
Packit Service a2489d
                                 _GL_ARG_NONNULL ((1, 2)));
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIASWARN (random_r);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef random_r
Packit Service a2489d
# if HAVE_RAW_DECL_RANDOM_R
Packit Service a2489d
_GL_WARN_ON_USE (random_r, "random_r is unportable - "
Packit Service a2489d
                 "use gnulib module random_r for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_RANDOM_R@
Packit Service a2489d
# if @REPLACE_RANDOM_R@
Packit Service a2489d
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2489d
#   undef srandom_r
Packit Service a2489d
#   define srandom_r rpl_srandom_r
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_FUNCDECL_RPL (srandom_r, int,
Packit Service a2489d
                  (unsigned int seed, struct random_data *rand_state)
Packit Service a2489d
                  _GL_ARG_NONNULL ((2)));
Packit Service a2489d
_GL_CXXALIAS_RPL (srandom_r, int,
Packit Service a2489d
                  (unsigned int seed, struct random_data *rand_state));
Packit Service a2489d
# else
Packit Service a2489d
#  if !@HAVE_RANDOM_R@
Packit Service a2489d
_GL_FUNCDECL_SYS (srandom_r, int,
Packit Service a2489d
                  (unsigned int seed, struct random_data *rand_state)
Packit Service a2489d
                  _GL_ARG_NONNULL ((2)));
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_CXXALIAS_SYS (srandom_r, int,
Packit Service a2489d
                  (unsigned int seed, struct random_data *rand_state));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIASWARN (srandom_r);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef srandom_r
Packit Service a2489d
# if HAVE_RAW_DECL_SRANDOM_R
Packit Service a2489d
_GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - "
Packit Service a2489d
                 "use gnulib module random_r for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_RANDOM_R@
Packit Service a2489d
# if @REPLACE_RANDOM_R@
Packit Service a2489d
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2489d
#   undef initstate_r
Packit Service a2489d
#   define initstate_r rpl_initstate_r
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_FUNCDECL_RPL (initstate_r, int,
Packit Service a2489d
                  (unsigned int seed, char *buf, size_t buf_size,
Packit Service a2489d
                   struct random_data *rand_state)
Packit Service a2489d
                  _GL_ARG_NONNULL ((2, 4)));
Packit Service a2489d
_GL_CXXALIAS_RPL (initstate_r, int,
Packit Service a2489d
                  (unsigned int seed, char *buf, size_t buf_size,
Packit Service a2489d
                   struct random_data *rand_state));
Packit Service a2489d
# else
Packit Service a2489d
#  if !@HAVE_RANDOM_R@
Packit Service a2489d
_GL_FUNCDECL_SYS (initstate_r, int,
Packit Service a2489d
                  (unsigned int seed, char *buf, size_t buf_size,
Packit Service a2489d
                   struct random_data *rand_state)
Packit Service a2489d
                  _GL_ARG_NONNULL ((2, 4)));
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_CXXALIAS_SYS (initstate_r, int,
Packit Service a2489d
                  (unsigned int seed, char *buf, size_t buf_size,
Packit Service a2489d
                   struct random_data *rand_state));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIASWARN (initstate_r);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef initstate_r
Packit Service a2489d
# if HAVE_RAW_DECL_INITSTATE_R
Packit Service a2489d
_GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - "
Packit Service a2489d
                 "use gnulib module random_r for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_RANDOM_R@
Packit Service a2489d
# if @REPLACE_RANDOM_R@
Packit Service a2489d
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2489d
#   undef setstate_r
Packit Service a2489d
#   define setstate_r rpl_setstate_r
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_FUNCDECL_RPL (setstate_r, int,
Packit Service a2489d
                  (char *arg_state, struct random_data *rand_state)
Packit Service a2489d
                  _GL_ARG_NONNULL ((1, 2)));
Packit Service a2489d
_GL_CXXALIAS_RPL (setstate_r, int,
Packit Service a2489d
                  (char *arg_state, struct random_data *rand_state));
Packit Service a2489d
# else
Packit Service a2489d
#  if !@HAVE_RANDOM_R@
Packit Service a2489d
_GL_FUNCDECL_SYS (setstate_r, int,
Packit Service a2489d
                  (char *arg_state, struct random_data *rand_state)
Packit Service a2489d
                  _GL_ARG_NONNULL ((1, 2)));
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_CXXALIAS_SYS (setstate_r, int,
Packit Service a2489d
                  (char *arg_state, struct random_data *rand_state));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIASWARN (setstate_r);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef setstate_r
Packit Service a2489d
# if HAVE_RAW_DECL_SETSTATE_R
Packit Service a2489d
_GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - "
Packit Service a2489d
                 "use gnulib module random_r for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_REALLOC_POSIX@
Packit Service a2489d
# if @REPLACE_REALLOC@
Packit Service a2489d
#  if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
Packit Service a2489d
        || _GL_USE_STDLIB_ALLOC)
Packit Service a2489d
#   undef realloc
Packit Service a2489d
#   define realloc rpl_realloc
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size));
Packit Service a2489d
_GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size));
Packit Service a2489d
# else
Packit Service a2489d
_GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIASWARN (realloc);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
Packit Service a2489d
# undef realloc
Packit Service a2489d
/* Assume realloc is always declared.  */
Packit Service a2489d
_GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - "
Packit Service a2489d
                 "use gnulib module realloc-posix for portability");
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_REALLOCARRAY@
Packit Service a2489d
# if ! @HAVE_REALLOCARRAY@
Packit Service a2489d
_GL_FUNCDECL_SYS (reallocarray, void *,
Packit Service a2489d
                  (void *ptr, size_t nmemb, size_t size));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (reallocarray, void *,
Packit Service a2489d
                  (void *ptr, size_t nmemb, size_t size));
Packit Service a2489d
_GL_CXXALIASWARN (reallocarray);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef reallocarray
Packit Service a2489d
# if HAVE_RAW_DECL_REALLOCARRAY
Packit Service a2489d
_GL_WARN_ON_USE (reallocarray, "reallocarray is not portable - "
Packit Service a2489d
                 "use gnulib module reallocarray for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_REALPATH@
Packit Service a2489d
# if @REPLACE_REALPATH@
Packit Service a2489d
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2489d
#   define realpath rpl_realpath
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved)
Packit Service a2489d
                                    _GL_ARG_NONNULL ((1)));
Packit Service a2489d
_GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved));
Packit Service a2489d
# else
Packit Service a2489d
#  if !@HAVE_REALPATH@
Packit Service a2489d
_GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved)
Packit Service a2489d
                                    _GL_ARG_NONNULL ((1)));
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIASWARN (realpath);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef realpath
Packit Service a2489d
# if HAVE_RAW_DECL_REALPATH
Packit Service a2489d
_GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module "
Packit Service a2489d
                 "canonicalize or canonicalize-lgpl for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_RPMATCH@
Packit Service a2489d
/* Test a user response to a question.
Packit Service a2489d
   Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear.  */
Packit Service a2489d
# if !@HAVE_RPMATCH@
Packit Service a2489d
_GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1)));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (rpmatch, int, (const char *response));
Packit Service a2489d
_GL_CXXALIASWARN (rpmatch);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef rpmatch
Packit Service a2489d
# if HAVE_RAW_DECL_RPMATCH
Packit Service a2489d
_GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - "
Packit Service a2489d
                 "use gnulib module rpmatch for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_SECURE_GETENV@
Packit Service a2489d
/* Look up NAME in the environment, returning 0 in insecure situations.  */
Packit Service a2489d
# if !@HAVE_SECURE_GETENV@
Packit Service a2489d
_GL_FUNCDECL_SYS (secure_getenv, char *,
Packit Service a2489d
                  (char const *name) _GL_ARG_NONNULL ((1)));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name));
Packit Service a2489d
_GL_CXXALIASWARN (secure_getenv);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef secure_getenv
Packit Service a2489d
# if HAVE_RAW_DECL_SECURE_GETENV
Packit Service a2489d
_GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - "
Packit Service a2489d
                 "use gnulib module secure_getenv for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_SETENV@
Packit Service a2489d
/* Set NAME to VALUE in the environment.
Packit Service a2489d
   If REPLACE is nonzero, overwrite an existing value.  */
Packit Service a2489d
# if @REPLACE_SETENV@
Packit Service a2489d
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2489d
#   undef setenv
Packit Service a2489d
#   define setenv rpl_setenv
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_FUNCDECL_RPL (setenv, int,
Packit Service a2489d
                  (const char *name, const char *value, int replace)
Packit Service a2489d
                  _GL_ARG_NONNULL ((1)));
Packit Service a2489d
_GL_CXXALIAS_RPL (setenv, int,
Packit Service a2489d
                  (const char *name, const char *value, int replace));
Packit Service a2489d
# else
Packit Service a2489d
#  if !@HAVE_DECL_SETENV@
Packit Service a2489d
_GL_FUNCDECL_SYS (setenv, int,
Packit Service a2489d
                  (const char *name, const char *value, int replace)
Packit Service a2489d
                  _GL_ARG_NONNULL ((1)));
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_CXXALIAS_SYS (setenv, int,
Packit Service a2489d
                  (const char *name, const char *value, int replace));
Packit Service a2489d
# endif
Packit Service a2489d
# if !(@REPLACE_SETENV@ && !@HAVE_DECL_SETENV@)
Packit Service a2489d
_GL_CXXALIASWARN (setenv);
Packit Service a2489d
# endif
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef setenv
Packit Service a2489d
# if HAVE_RAW_DECL_SETENV
Packit Service a2489d
_GL_WARN_ON_USE (setenv, "setenv is unportable - "
Packit Service a2489d
                 "use gnulib module setenv for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_STRTOD@
Packit Service a2489d
 /* Parse a double from STRING, updating ENDP if appropriate.  */
Packit Service a2489d
# if @REPLACE_STRTOD@
Packit Service a2489d
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2489d
#   define strtod rpl_strtod
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp)
Packit Service a2489d
                                  _GL_ARG_NONNULL ((1)));
Packit Service a2489d
_GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp));
Packit Service a2489d
# else
Packit Service a2489d
#  if !@HAVE_STRTOD@
Packit Service a2489d
_GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp)
Packit Service a2489d
                                  _GL_ARG_NONNULL ((1)));
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIASWARN (strtod);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef strtod
Packit Service a2489d
# if HAVE_RAW_DECL_STRTOD
Packit Service a2489d
_GL_WARN_ON_USE (strtod, "strtod is unportable - "
Packit Service a2489d
                 "use gnulib module strtod for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_STRTOLL@
Packit Service a2489d
/* Parse a signed integer whose textual representation starts at STRING.
Packit Service a2489d
   The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
Packit Service a2489d
   it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
Packit Service a2489d
   "0x").
Packit Service a2489d
   If ENDPTR is not NULL, the address of the first byte after the integer is
Packit Service a2489d
   stored in *ENDPTR.
Packit Service a2489d
   Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set
Packit Service a2489d
   to ERANGE.  */
Packit Service a2489d
# if !@HAVE_STRTOLL@
Packit Service a2489d
_GL_FUNCDECL_SYS (strtoll, long long,
Packit Service a2489d
                  (const char *string, char **endptr, int base)
Packit Service a2489d
                  _GL_ARG_NONNULL ((1)));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (strtoll, long long,
Packit Service a2489d
                  (const char *string, char **endptr, int base));
Packit Service a2489d
_GL_CXXALIASWARN (strtoll);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef strtoll
Packit Service a2489d
# if HAVE_RAW_DECL_STRTOLL
Packit Service a2489d
_GL_WARN_ON_USE (strtoll, "strtoll is unportable - "
Packit Service a2489d
                 "use gnulib module strtoll for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_STRTOULL@
Packit Service a2489d
/* Parse an unsigned integer whose textual representation starts at STRING.
Packit Service a2489d
   The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
Packit Service a2489d
   it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
Packit Service a2489d
   "0x").
Packit Service a2489d
   If ENDPTR is not NULL, the address of the first byte after the integer is
Packit Service a2489d
   stored in *ENDPTR.
Packit Service a2489d
   Upon overflow, the return value is ULLONG_MAX, and errno is set to
Packit Service a2489d
   ERANGE.  */
Packit Service a2489d
# if !@HAVE_STRTOULL@
Packit Service a2489d
_GL_FUNCDECL_SYS (strtoull, unsigned long long,
Packit Service a2489d
                  (const char *string, char **endptr, int base)
Packit Service a2489d
                  _GL_ARG_NONNULL ((1)));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (strtoull, unsigned long long,
Packit Service a2489d
                  (const char *string, char **endptr, int base));
Packit Service a2489d
_GL_CXXALIASWARN (strtoull);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef strtoull
Packit Service a2489d
# if HAVE_RAW_DECL_STRTOULL
Packit Service a2489d
_GL_WARN_ON_USE (strtoull, "strtoull is unportable - "
Packit Service a2489d
                 "use gnulib module strtoull for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_UNLOCKPT@
Packit Service a2489d
/* Unlock the slave side of the pseudo-terminal whose master side is specified
Packit Service a2489d
   by FD, so that it can be opened.  */
Packit Service a2489d
# if !@HAVE_UNLOCKPT@
Packit Service a2489d
_GL_FUNCDECL_SYS (unlockpt, int, (int fd));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIAS_SYS (unlockpt, int, (int fd));
Packit Service a2489d
_GL_CXXALIASWARN (unlockpt);
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef unlockpt
Packit Service a2489d
# if HAVE_RAW_DECL_UNLOCKPT
Packit Service a2489d
_GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - "
Packit Service a2489d
                 "use gnulib module unlockpt for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
#if @GNULIB_UNSETENV@
Packit Service a2489d
/* Remove the variable NAME from the environment.  */
Packit Service a2489d
# if @REPLACE_UNSETENV@
Packit Service a2489d
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2489d
#   undef unsetenv
Packit Service a2489d
#   define unsetenv rpl_unsetenv
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
Packit Service a2489d
_GL_CXXALIAS_RPL (unsetenv, int, (const char *name));
Packit Service a2489d
# else
Packit Service a2489d
#  if !@HAVE_DECL_UNSETENV@
Packit Service a2489d
_GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_CXXALIAS_SYS (unsetenv, int, (const char *name));
Packit Service a2489d
# endif
Packit Service a2489d
# if !(@REPLACE_UNSETENV@ && !@HAVE_DECL_UNSETENV@)
Packit Service a2489d
_GL_CXXALIASWARN (unsetenv);
Packit Service a2489d
# endif
Packit Service a2489d
#elif defined GNULIB_POSIXCHECK
Packit Service a2489d
# undef unsetenv
Packit Service a2489d
# if HAVE_RAW_DECL_UNSETENV
Packit Service a2489d
_GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - "
Packit Service a2489d
                 "use gnulib module unsetenv for portability");
Packit Service a2489d
# endif
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
/* Convert a wide character to a multibyte character.  */
Packit Service a2489d
#if @GNULIB_WCTOMB@
Packit Service a2489d
# if @REPLACE_WCTOMB@
Packit Service a2489d
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2489d
#   undef wctomb
Packit Service a2489d
#   define wctomb rpl_wctomb
Packit Service a2489d
#  endif
Packit Service a2489d
_GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc));
Packit Service a2489d
_GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc));
Packit Service a2489d
# else
Packit Service a2489d
_GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc));
Packit Service a2489d
# endif
Packit Service a2489d
_GL_CXXALIASWARN (wctomb);
Packit Service a2489d
#endif
Packit Service a2489d
Packit Service a2489d
Packit Service a2489d
#endif /* _@GUARD_PREFIX@_STDLIB_H */
Packit Service a2489d
#endif /* _@GUARD_PREFIX@_STDLIB_H */
Packit Service a2489d
#endif