Blame lib/stdlib.in.h

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