mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 01:00:20 +02:00
Update Gnulib to v0.1-4379-g2ef5a9b4b
Also bump required autoconf version to 2.64, as required by Gnulib.
This commit is contained in:
parent
758b31994c
commit
a91b95cca2
483 changed files with 26665 additions and 10031 deletions
421
lib/stdlib.in.h
421
lib/stdlib.in.h
|
@ -1,6 +1,6 @@
|
|||
/* A GNU-like <stdlib.h>.
|
||||
|
||||
Copyright (C) 1995, 2001-2004, 2006-2017 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 2001-2004, 2006-2021 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
|
@ -13,7 +13,7 @@
|
|||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#if __GNUC__ >= 3
|
||||
@PRAGMA_SYSTEM_HEADER@
|
||||
|
@ -47,11 +47,14 @@
|
|||
|
||||
/* Solaris declares getloadavg() in <sys/loadavg.h>. */
|
||||
#if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@
|
||||
/* OpenIndiana has a bug: <sys/time.h> must be included before
|
||||
<sys/loadavg.h>. */
|
||||
# include <sys/time.h>
|
||||
# include <sys/loadavg.h>
|
||||
#endif
|
||||
|
||||
/* Native Windows platforms declare mktemp() in <io.h>. */
|
||||
#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
|
||||
/* Native Windows platforms declare _mktemp() in <io.h>. */
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
# include <io.h>
|
||||
#endif
|
||||
|
||||
|
@ -87,9 +90,10 @@ struct random_data
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
|
||||
#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_MKOSTEMP@ || @GNULIB_MKOSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !(defined _WIN32 && ! defined __CYGWIN__)
|
||||
/* On Mac OS X 10.3, only <unistd.h> declares mkstemp. */
|
||||
/* On Mac OS X 10.5, only <unistd.h> declares mkstemps. */
|
||||
/* On Mac OS X 10.13, only <unistd.h> declares mkostemp and mkostemps. */
|
||||
/* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */
|
||||
/* But avoid namespace pollution on glibc systems and native Windows. */
|
||||
# include <unistd.h>
|
||||
|
@ -97,10 +101,12 @@ struct random_data
|
|||
|
||||
/* The __attribute__ feature is available in gcc versions 2.5 and later.
|
||||
The attribute __pure__ was added in gcc 2.96. */
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
|
||||
# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
|
||||
#else
|
||||
# define _GL_ATTRIBUTE_PURE /* empty */
|
||||
#ifndef _GL_ATTRIBUTE_PURE
|
||||
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__
|
||||
# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
|
||||
# else
|
||||
# define _GL_ATTRIBUTE_PURE /* empty */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* The definition of _Noreturn is copied here. */
|
||||
|
@ -143,6 +149,31 @@ _GL_WARN_ON_USE (_Exit, "_Exit is unportable - "
|
|||
#endif
|
||||
|
||||
|
||||
/* Allocate memory with indefinite extent and specified alignment. */
|
||||
#if @GNULIB_ALIGNED_ALLOC@
|
||||
# if @REPLACE_ALIGNED_ALLOC@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef aligned_alloc
|
||||
# define aligned_alloc rpl_aligned_alloc
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (aligned_alloc, void *, (size_t alignment, size_t size));
|
||||
_GL_CXXALIAS_RPL (aligned_alloc, void *, (size_t alignment, size_t size));
|
||||
# else
|
||||
# if @HAVE_ALIGNED_ALLOC@
|
||||
_GL_CXXALIAS_SYS (aligned_alloc, void *, (size_t alignment, size_t size));
|
||||
# endif
|
||||
# endif
|
||||
# if @HAVE_ALIGNED_ALLOC@
|
||||
_GL_CXXALIASWARN (aligned_alloc);
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef aligned_alloc
|
||||
# if HAVE_RAW_DECL_ALIGNED_ALLOC
|
||||
_GL_WARN_ON_USE (aligned_alloc, "aligned_alloc is not portable - "
|
||||
"use gnulib module aligned_alloc for portability");
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if @GNULIB_ATOLL@
|
||||
/* Parse a signed decimal integer.
|
||||
Returns the value of the integer. Errors are not detected. */
|
||||
|
@ -172,7 +203,9 @@ _GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size));
|
|||
# else
|
||||
_GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size));
|
||||
# endif
|
||||
# if __GLIBC__ >= 2
|
||||
_GL_CXXALIASWARN (calloc);
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef calloc
|
||||
/* Assume calloc is always declared. */
|
||||
|
@ -195,6 +228,10 @@ _GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name)
|
|||
# endif
|
||||
_GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name));
|
||||
# endif
|
||||
# ifndef GNULIB_defined_canonicalize_file_name
|
||||
# define GNULIB_defined_canonicalize_file_name \
|
||||
(!@HAVE_CANONICALIZE_FILE_NAME@ || @REPLACE_CANONICALIZE_FILE_NAME@)
|
||||
# endif
|
||||
_GL_CXXALIASWARN (canonicalize_file_name);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef canonicalize_file_name
|
||||
|
@ -205,6 +242,94 @@ _GL_WARN_ON_USE (canonicalize_file_name,
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#if @GNULIB_MDA_ECVT@
|
||||
/* On native Windows, map 'ecvt' to '_ecvt', so that -loldnames is not
|
||||
required. In C++ with GNULIB_NAMESPACE, avoid differences between
|
||||
platforms by defining GNULIB_NAMESPACE::ecvt on all platforms that have
|
||||
it. */
|
||||
# if defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef ecvt
|
||||
# define ecvt _ecvt
|
||||
# endif
|
||||
_GL_CXXALIAS_MDA (ecvt, char *,
|
||||
(double number, int ndigits, int *decptp, int *signp));
|
||||
# else
|
||||
# if @HAVE_DECL_ECVT@
|
||||
_GL_CXXALIAS_SYS (ecvt, char *,
|
||||
(double number, int ndigits, int *decptp, int *signp));
|
||||
# endif
|
||||
# endif
|
||||
# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_ECVT@
|
||||
_GL_CXXALIASWARN (ecvt);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if @GNULIB_MDA_FCVT@
|
||||
/* On native Windows, map 'fcvt' to '_fcvt', so that -loldnames is not
|
||||
required. In C++ with GNULIB_NAMESPACE, avoid differences between
|
||||
platforms by defining GNULIB_NAMESPACE::fcvt on all platforms that have
|
||||
it. */
|
||||
# if defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef fcvt
|
||||
# define fcvt _fcvt
|
||||
# endif
|
||||
_GL_CXXALIAS_MDA (fcvt, char *,
|
||||
(double number, int ndigits, int *decptp, int *signp));
|
||||
# else
|
||||
# if @HAVE_DECL_FCVT@
|
||||
_GL_CXXALIAS_SYS (fcvt, char *,
|
||||
(double number, int ndigits, int *decptp, int *signp));
|
||||
# endif
|
||||
# endif
|
||||
# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_FCVT@
|
||||
_GL_CXXALIASWARN (fcvt);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if @GNULIB_FREE_POSIX@
|
||||
# if @REPLACE_FREE@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef free
|
||||
# define free rpl_free
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (free, void, (void *ptr));
|
||||
_GL_CXXALIAS_RPL (free, void, (void *ptr));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (free, void, (void *ptr));
|
||||
# endif
|
||||
# if __GLIBC__ >= 2
|
||||
_GL_CXXALIASWARN (free);
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef free
|
||||
/* Assume free is always declared. */
|
||||
_GL_WARN_ON_USE (free, "free is not future POSIX compliant everywhere - "
|
||||
"use gnulib module free for portability");
|
||||
#endif
|
||||
|
||||
#if @GNULIB_MDA_GCVT@
|
||||
/* On native Windows, map 'gcvt' to '_gcvt', so that -loldnames is not
|
||||
required. In C++ with GNULIB_NAMESPACE, avoid differences between
|
||||
platforms by defining GNULIB_NAMESPACE::gcvt on all platforms that have
|
||||
it. */
|
||||
# if defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef gcvt
|
||||
# define gcvt _gcvt
|
||||
# endif
|
||||
_GL_CXXALIAS_MDA (gcvt, char *, (double number, int ndigits, char *buf));
|
||||
# else
|
||||
# if @HAVE_DECL_GCVT@
|
||||
_GL_CXXALIAS_SYS (gcvt, char *, (double number, int ndigits, char *buf));
|
||||
# endif
|
||||
# endif
|
||||
# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_GCVT@
|
||||
_GL_CXXALIASWARN (gcvt);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if @GNULIB_GETLOADAVG@
|
||||
/* Store max(NELEM,3) load average numbers in LOADAVG[].
|
||||
The three numbers are the load average of the last 1 minute, the last 5
|
||||
|
@ -234,8 +359,8 @@ _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
|
|||
element (or NULL if it doesn't contain an "=" sign),
|
||||
- It returns the index of the "token" in the given array of tokens.
|
||||
Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined.
|
||||
For more details see the POSIX:2001 specification.
|
||||
http://www.opengroup.org/susv3xsh/getsubopt.html */
|
||||
For more details see the POSIX specification.
|
||||
https://pubs.opengroup.org/onlinepubs/9699919799/functions/getsubopt.html */
|
||||
# if !@HAVE_GETSUBOPT@
|
||||
_GL_FUNCDECL_SYS (getsubopt, int,
|
||||
(char **optionp, char *const *tokens, char **valuep)
|
||||
|
@ -284,7 +409,9 @@ _GL_CXXALIAS_RPL (malloc, void *, (size_t size));
|
|||
# else
|
||||
_GL_CXXALIAS_SYS (malloc, void *, (size_t size));
|
||||
# endif
|
||||
# if __GLIBC__ >= 2
|
||||
_GL_CXXALIASWARN (malloc);
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
|
||||
# undef malloc
|
||||
/* Assume malloc is always declared. */
|
||||
|
@ -299,12 +426,27 @@ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
|
|||
# undef mbtowc
|
||||
# define mbtowc rpl_mbtowc
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
|
||||
_GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
|
||||
_GL_FUNCDECL_RPL (mbtowc, int,
|
||||
(wchar_t *restrict pwc, const char *restrict s, size_t n));
|
||||
_GL_CXXALIAS_RPL (mbtowc, int,
|
||||
(wchar_t *restrict pwc, const char *restrict s, size_t n));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
|
||||
# if !@HAVE_MBTOWC@
|
||||
_GL_FUNCDECL_SYS (mbtowc, int,
|
||||
(wchar_t *restrict pwc, const char *restrict s, size_t n));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (mbtowc, int,
|
||||
(wchar_t *restrict pwc, const char *restrict s, size_t n));
|
||||
# endif
|
||||
# if __GLIBC__ >= 2
|
||||
_GL_CXXALIASWARN (mbtowc);
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mbtowc
|
||||
# if HAVE_RAW_DECL_MBTOWC
|
||||
_GL_WARN_ON_USE (mbtowc, "mbtowc is not portable - "
|
||||
"use gnulib module mbtowc for portability");
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if @GNULIB_MKDTEMP@
|
||||
|
@ -439,6 +581,51 @@ _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - "
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#if @GNULIB_MDA_MKTEMP@
|
||||
/* On native Windows, map 'mktemp' to '_mktemp', so that -loldnames is not
|
||||
required. In C++ with GNULIB_NAMESPACE, avoid differences between
|
||||
platforms by defining GNULIB_NAMESPACE::mktemp always. */
|
||||
# if defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef mktemp
|
||||
# define mktemp _mktemp
|
||||
# endif
|
||||
_GL_CXXALIAS_MDA (mktemp, char *, (char * /*template*/));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (mktemp, char *, (char * /*template*/));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (mktemp);
|
||||
#endif
|
||||
|
||||
/* Allocate memory with indefinite extent and specified alignment. */
|
||||
#if @GNULIB_POSIX_MEMALIGN@
|
||||
# if @REPLACE_POSIX_MEMALIGN@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef posix_memalign
|
||||
# define posix_memalign rpl_posix_memalign
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (posix_memalign, int,
|
||||
(void **memptr, size_t alignment, size_t size)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (posix_memalign, int,
|
||||
(void **memptr, size_t alignment, size_t size));
|
||||
# else
|
||||
# if @HAVE_POSIX_MEMALIGN@
|
||||
_GL_CXXALIAS_SYS (posix_memalign, int,
|
||||
(void **memptr, size_t alignment, size_t size));
|
||||
# endif
|
||||
# endif
|
||||
# if @HAVE_POSIX_MEMALIGN@
|
||||
_GL_CXXALIASWARN (posix_memalign);
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef posix_memalign
|
||||
# if HAVE_RAW_DECL_POSIX_MEMALIGN
|
||||
_GL_WARN_ON_USE (posix_memalign, "posix_memalign is not portable - "
|
||||
"use gnulib module posix_memalign for portability");
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if @GNULIB_POSIX_OPENPT@
|
||||
/* Return an FD open to the master side of a pseudo-terminal. Flags should
|
||||
include O_RDWR, and may also include O_NOCTTY. */
|
||||
|
@ -497,6 +684,9 @@ _GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
|
|||
# endif
|
||||
_GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
|
||||
# endif
|
||||
# ifndef GNULIB_defined_ptsname_r
|
||||
# define GNULIB_defined_ptsname_r (!@HAVE_PTSNAME_R@ || @REPLACE_PTSNAME_R@)
|
||||
# endif
|
||||
_GL_CXXALIASWARN (ptsname_r);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef ptsname_r
|
||||
|
@ -514,6 +704,28 @@ _GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - "
|
|||
# endif
|
||||
_GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (putenv, int, (char *string));
|
||||
# elif defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef putenv
|
||||
# define putenv _putenv
|
||||
# endif
|
||||
_GL_CXXALIAS_MDA (putenv, int, (char *string));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (putenv, int, (char *string));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (putenv);
|
||||
#elif @GNULIB_MDA_PUTENV@
|
||||
/* On native Windows, map 'putenv' to '_putenv', so that -loldnames is not
|
||||
required. In C++ with GNULIB_NAMESPACE, avoid differences between
|
||||
platforms by defining GNULIB_NAMESPACE::putenv always. */
|
||||
# if defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef putenv
|
||||
# define putenv _putenv
|
||||
# endif
|
||||
/* Need to cast, because on mingw, the parameter is either
|
||||
'const char *string' or 'char *string'. */
|
||||
_GL_CXXALIAS_MDA_CAST (putenv, int, (char *string));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (putenv, int, (char *string));
|
||||
# endif
|
||||
|
@ -569,10 +781,21 @@ _GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - "
|
|||
|
||||
|
||||
#if @GNULIB_RANDOM@
|
||||
# if !@HAVE_RANDOM@
|
||||
# if @REPLACE_RANDOM@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef random
|
||||
# define random rpl_random
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (random, long, (void));
|
||||
_GL_CXXALIAS_RPL (random, long, (void));
|
||||
# else
|
||||
# if !@HAVE_RANDOM@
|
||||
_GL_FUNCDECL_SYS (random, long, (void));
|
||||
# endif
|
||||
/* Need to cast, because on Haiku, the return type is
|
||||
int. */
|
||||
_GL_CXXALIAS_SYS_CAST (random, long, (void));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (random, long, (void));
|
||||
_GL_CXXALIASWARN (random);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef random
|
||||
|
@ -583,10 +806,21 @@ _GL_WARN_ON_USE (random, "random is unportable - "
|
|||
#endif
|
||||
|
||||
#if @GNULIB_RANDOM@
|
||||
# if !@HAVE_RANDOM@
|
||||
# if @REPLACE_RANDOM@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef srandom
|
||||
# define srandom rpl_srandom
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (srandom, void, (unsigned int seed));
|
||||
_GL_CXXALIAS_RPL (srandom, void, (unsigned int seed));
|
||||
# else
|
||||
# if !@HAVE_RANDOM@
|
||||
_GL_FUNCDECL_SYS (srandom, void, (unsigned int seed));
|
||||
# endif
|
||||
/* Need to cast, because on FreeBSD, the first parameter is
|
||||
unsigned long seed. */
|
||||
_GL_CXXALIAS_SYS_CAST (srandom, void, (unsigned int seed));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (srandom, void, (unsigned int seed));
|
||||
_GL_CXXALIASWARN (srandom);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef srandom
|
||||
|
@ -597,31 +831,56 @@ _GL_WARN_ON_USE (srandom, "srandom is unportable - "
|
|||
#endif
|
||||
|
||||
#if @GNULIB_RANDOM@
|
||||
# if !@HAVE_RANDOM@
|
||||
# if @REPLACE_INITSTATE@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef initstate
|
||||
# define initstate rpl_initstate
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (initstate, char *,
|
||||
(unsigned int seed, char *buf, size_t buf_size)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
_GL_CXXALIAS_RPL (initstate, char *,
|
||||
(unsigned int seed, char *buf, size_t buf_size));
|
||||
# else
|
||||
# if !@HAVE_INITSTATE@ || !@HAVE_DECL_INITSTATE@
|
||||
_GL_FUNCDECL_SYS (initstate, char *,
|
||||
(unsigned int seed, char *buf, size_t buf_size)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
# endif
|
||||
/* Need to cast, because on FreeBSD, the first parameter is
|
||||
unsigned long seed. */
|
||||
_GL_CXXALIAS_SYS_CAST (initstate, char *,
|
||||
(unsigned int seed, char *buf, size_t buf_size));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (initstate, char *,
|
||||
(unsigned int seed, char *buf, size_t buf_size));
|
||||
_GL_CXXALIASWARN (initstate);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef initstate
|
||||
# if HAVE_RAW_DECL_INITSTATE_R
|
||||
# if HAVE_RAW_DECL_INITSTATE
|
||||
_GL_WARN_ON_USE (initstate, "initstate is unportable - "
|
||||
"use gnulib module random for portability");
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if @GNULIB_RANDOM@
|
||||
# if !@HAVE_RANDOM@
|
||||
# if @REPLACE_SETSTATE@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef setstate
|
||||
# define setstate rpl_setstate
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (setstate, char *, (char *arg_state));
|
||||
# else
|
||||
# if !@HAVE_SETSTATE@ || !@HAVE_DECL_SETSTATE@
|
||||
_GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
/* Need to cast, because on Mac OS X 10.13, HP-UX, Solaris the first parameter
|
||||
is const char *arg_state. */
|
||||
_GL_CXXALIAS_SYS_CAST (setstate, char *, (char *arg_state));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (setstate, char *, (char *arg_state));
|
||||
_GL_CXXALIASWARN (setstate);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef setstate
|
||||
# if HAVE_RAW_DECL_SETSTATE_R
|
||||
# if HAVE_RAW_DECL_SETSTATE
|
||||
_GL_WARN_ON_USE (setstate, "setstate is unportable - "
|
||||
"use gnulib module random for portability");
|
||||
# endif
|
||||
|
@ -702,9 +961,11 @@ _GL_FUNCDECL_SYS (initstate_r, int,
|
|||
struct random_data *rand_state)
|
||||
_GL_ARG_NONNULL ((2, 4)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (initstate_r, int,
|
||||
(unsigned int seed, char *buf, size_t buf_size,
|
||||
struct random_data *rand_state));
|
||||
/* Need to cast, because on Haiku, the third parameter is
|
||||
unsigned long buf_size. */
|
||||
_GL_CXXALIAS_SYS_CAST (initstate_r, int,
|
||||
(unsigned int seed, char *buf, size_t buf_size,
|
||||
struct random_data *rand_state));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (initstate_r);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
|
@ -732,8 +993,10 @@ _GL_FUNCDECL_SYS (setstate_r, int,
|
|||
(char *arg_state, struct random_data *rand_state)
|
||||
_GL_ARG_NONNULL ((1, 2)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (setstate_r, int,
|
||||
(char *arg_state, struct random_data *rand_state));
|
||||
/* Need to cast, because on Haiku, the first parameter is
|
||||
void *arg_state. */
|
||||
_GL_CXXALIAS_SYS_CAST (setstate_r, int,
|
||||
(char *arg_state, struct random_data *rand_state));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (setstate_r);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
|
@ -757,7 +1020,9 @@ _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size));
|
|||
# else
|
||||
_GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size));
|
||||
# endif
|
||||
# if __GLIBC__ >= 2
|
||||
_GL_CXXALIASWARN (realloc);
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
|
||||
# undef realloc
|
||||
/* Assume realloc is always declared. */
|
||||
|
@ -765,20 +1030,41 @@ _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - "
|
|||
"use gnulib module realloc-posix for portability");
|
||||
#endif
|
||||
|
||||
|
||||
#if @GNULIB_REALLOCARRAY@
|
||||
# if ! @HAVE_REALLOCARRAY@
|
||||
_GL_FUNCDECL_SYS (reallocarray, void *,
|
||||
(void *ptr, size_t nmemb, size_t size));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (reallocarray, void *,
|
||||
(void *ptr, size_t nmemb, size_t size));
|
||||
_GL_CXXALIASWARN (reallocarray);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef reallocarray
|
||||
# if HAVE_RAW_DECL_REALLOCARRAY
|
||||
_GL_WARN_ON_USE (reallocarray, "reallocarray is not portable - "
|
||||
"use gnulib module reallocarray for portability");
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if @GNULIB_REALPATH@
|
||||
# if @REPLACE_REALPATH@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define realpath rpl_realpath
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved));
|
||||
_GL_FUNCDECL_RPL (realpath, char *,
|
||||
(const char *restrict name, char *restrict resolved)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (realpath, char *,
|
||||
(const char *restrict name, char *restrict resolved));
|
||||
# else
|
||||
# if !@HAVE_REALPATH@
|
||||
_GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_FUNCDECL_SYS (realpath, char *,
|
||||
(const char *restrict name, char *restrict resolved)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved));
|
||||
_GL_CXXALIAS_SYS (realpath, char *,
|
||||
(const char *restrict name, char *restrict resolved));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (realpath);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
|
@ -860,17 +1146,24 @@ _GL_WARN_ON_USE (setenv, "setenv is unportable - "
|
|||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define strtod rpl_strtod
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp));
|
||||
# define GNULIB_defined_strtod_function 1
|
||||
_GL_FUNCDECL_RPL (strtod, double,
|
||||
(const char *restrict str, char **restrict endp)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (strtod, double,
|
||||
(const char *restrict str, char **restrict endp));
|
||||
# else
|
||||
# if !@HAVE_STRTOD@
|
||||
_GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_FUNCDECL_SYS (strtod, double,
|
||||
(const char *restrict str, char **restrict endp)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp));
|
||||
_GL_CXXALIAS_SYS (strtod, double,
|
||||
(const char *restrict str, char **restrict endp));
|
||||
# endif
|
||||
# if __GLIBC__ >= 2
|
||||
_GL_CXXALIASWARN (strtod);
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef strtod
|
||||
# if HAVE_RAW_DECL_STRTOD
|
||||
|
@ -879,6 +1172,36 @@ _GL_WARN_ON_USE (strtod, "strtod is unportable - "
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#if @GNULIB_STRTOLD@
|
||||
/* Parse a 'long double' from STRING, updating ENDP if appropriate. */
|
||||
# if @REPLACE_STRTOLD@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define strtold rpl_strtold
|
||||
# endif
|
||||
# define GNULIB_defined_strtold_function 1
|
||||
_GL_FUNCDECL_RPL (strtold, long double,
|
||||
(const char *restrict str, char **restrict endp)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (strtold, long double,
|
||||
(const char *restrict str, char **restrict endp));
|
||||
# else
|
||||
# if !@HAVE_STRTOLD@
|
||||
_GL_FUNCDECL_SYS (strtold, long double,
|
||||
(const char *restrict str, char **restrict endp)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (strtold, long double,
|
||||
(const char *restrict str, char **restrict endp));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (strtold);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef strtold
|
||||
# if HAVE_RAW_DECL_STRTOLD
|
||||
_GL_WARN_ON_USE (strtold, "strtold is unportable - "
|
||||
"use gnulib module strtold for portability");
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if @GNULIB_STRTOLL@
|
||||
/* Parse a signed integer whose textual representation starts at STRING.
|
||||
The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
|
||||
|
@ -890,11 +1213,13 @@ _GL_WARN_ON_USE (strtod, "strtod is unportable - "
|
|||
to ERANGE. */
|
||||
# if !@HAVE_STRTOLL@
|
||||
_GL_FUNCDECL_SYS (strtoll, long long,
|
||||
(const char *string, char **endptr, int base)
|
||||
(const char *restrict string, char **restrict endptr,
|
||||
int base)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (strtoll, long long,
|
||||
(const char *string, char **endptr, int base));
|
||||
(const char *restrict string, char **restrict endptr,
|
||||
int base));
|
||||
_GL_CXXALIASWARN (strtoll);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef strtoll
|
||||
|
@ -915,11 +1240,13 @@ _GL_WARN_ON_USE (strtoll, "strtoll is unportable - "
|
|||
ERANGE. */
|
||||
# if !@HAVE_STRTOULL@
|
||||
_GL_FUNCDECL_SYS (strtoull, unsigned long long,
|
||||
(const char *string, char **endptr, int base)
|
||||
(const char *restrict string, char **restrict endptr,
|
||||
int base)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (strtoull, unsigned long long,
|
||||
(const char *string, char **endptr, int base));
|
||||
(const char *restrict string, char **restrict endptr,
|
||||
int base));
|
||||
_GL_CXXALIASWARN (strtoull);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef strtoull
|
||||
|
@ -983,7 +1310,9 @@ _GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc));
|
|||
# else
|
||||
_GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc));
|
||||
# endif
|
||||
# if __GLIBC__ >= 2
|
||||
_GL_CXXALIASWARN (wctomb);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue