gnulib: update to 776af40e0

This fixes PR27184, a failure to compile gdb due to
cdefs.h being out of sync with glibc on ppc64le targets
which are compiled with -mabi=ieeelongdouble and glibc
2.32.

Likewise, update usage of _GL_ATTRIBUTE_FORMAT_PRINTF to
_GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD.

Likewise, disable newly added rpl_free gnulib api in
gdbserver support libraries.

Likewise, undefine read/write macros before redefining them
on mingw targets.

Likewise, wrap C++ usage of free with GNULIB_NAMESPACE namespace
as needed.

Change-Id: I86517613c0d8ac8f5ea45bbc4ebe2b54a3aef29f
This commit is contained in:
Paul E. Murphy 2021-01-22 13:55:45 -06:00 committed by Simon Marchi
parent 0110ec824e
commit 9c9d63b15a
399 changed files with 7210 additions and 4549 deletions

View File

@ -1,3 +1,10 @@
2021-02-05 Paul E. Murphy <murphyp@linux.ibm.com>
* Makefile.in (UNDO_GNULIB_CFLAGS): Disable
gnulib free replacement too.
* common-defs.h [USE_WIN32API](read, write): Undefine
gnulib versions before defining these macros.
2021-02-03 Pedro Alves <pedro@palves.net>
* linux-low.cc (linux_process_target::complete_ongoing_step_over):

View File

@ -490,7 +490,7 @@ UST_CFLAGS = $(ustinc) -DCONFIG_UST_GDB_INTEGRATION
# Undo gnulib replacements for the IPA shared library build.
# The gnulib headers are still needed, but gnulib is not linked
# into the IPA lib so replacement apis don't work.
UNDO_GNULIB_CFLAGS = -Drpl_strerror_r=strerror_r
UNDO_GNULIB_CFLAGS = -Drpl_strerror_r=strerror_r -Drpl_free=free
# Note, we only build the IPA if -fvisibility=hidden is supported in
# the first place.

View File

@ -102,6 +102,10 @@ static int remote_desc = -1;
static int listen_desc = -1;
#ifdef USE_WIN32API
/* gnulib wraps these as macros, undo them. */
# undef read
# undef write
# define read(fd, buf, len) recv (fd, (char *) buf, len, 0)
# define write(fd, buf, len) send (fd, (char *) buf, len, 0)
#endif

View File

@ -1,3 +1,10 @@
2021-02-05 Paul E. Murphy <murphy@linux.ibm.com>
* common-defs.h (ATTRIBUTE_PRINTF): Rename
_GL_ATTRIBUTE_FORMAT_PRINTF to _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD.
* common-utils.h (xfree): Use GNULIB_NAMESPACE namespace when calling
free if this macro is defined.
2021-01-23 Lancelot SIX <lsix@lancelotsix.com>
* gdb_tilde_expand.cc (gdb_tilde_expand): Improve

View File

@ -105,10 +105,10 @@
/* This is defined by ansidecl.h, but we prefer gnulib's version. On
MinGW, gnulib might enable __USE_MINGW_ANSI_STDIO, which may or not
require use of attribute gnu_printf instead of printf. gnulib
checks that at configure time. Since _GL_ATTRIBUTE_FORMAT_PRINTF
checks that at configure time. Since _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD
is compatible with ATTRIBUTE_PRINTF, simply use it. */
#undef ATTRIBUTE_PRINTF
#define ATTRIBUTE_PRINTF _GL_ATTRIBUTE_FORMAT_PRINTF
#define ATTRIBUTE_PRINTF _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD
#if GCC_VERSION >= 3004
#define ATTRIBUTE_UNUSED_RESULT __attribute__ ((__warn_unused_result__))

View File

@ -59,7 +59,11 @@ xfree (T *ptr)
data type. Use operator delete instead.");
if (ptr != NULL)
free (ptr); /* ARI: free */
#ifdef GNULIB_NAMESPACE
GNULIB_NAMESPACE::free (ptr); /* ARI: free */
#else
free (ptr); /* ARI: free */
#endif
}

View File

@ -1,3 +1,9 @@
2021-02-05 Paul E. Murphy <murphyp@linux.ibm.com>
* update-gnulib.sh (GNULIB_COMMIT_SHA1): Bump to
776af40e09b476a41073131a90022572f448c189.
* Makefile.in, config.in, configure, import/*: Re-generate.
2020-10-09 Andrew Burgess <andrew.burgess@embecosm.com>
* Makefile.gnulib.inc.in: New file.

View File

@ -14,7 +14,7 @@
@SET_MAKE@
# Copyright (C) 2019-2020 Free Software Foundation, Inc.
# Copyright (C) 2019-2021 Free Software Foundation, Inc.
# This file is part of GDB.
@ -121,6 +121,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/import/m4/builtin-expect.m4 \
$(top_srcdir)/import/m4/canonicalize.m4 \
$(top_srcdir)/import/m4/chdir-long.m4 \
$(top_srcdir)/import/m4/clock_time.m4 \
$(top_srcdir)/import/m4/close.m4 \
$(top_srcdir)/import/m4/closedir.m4 \
$(top_srcdir)/import/m4/codeset.m4 \
@ -129,7 +130,6 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/import/m4/d-type.m4 \
$(top_srcdir)/import/m4/dirent_h.m4 \
$(top_srcdir)/import/m4/dirfd.m4 \
$(top_srcdir)/import/m4/dirname.m4 \
$(top_srcdir)/import/m4/double-slash-root.m4 \
$(top_srcdir)/import/m4/dup.m4 $(top_srcdir)/import/m4/dup2.m4 \
$(top_srcdir)/import/m4/eealloc.m4 \
@ -151,6 +151,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/import/m4/fnmatch.m4 \
$(top_srcdir)/import/m4/fnmatch_h.m4 \
$(top_srcdir)/import/m4/fpieee.m4 \
$(top_srcdir)/import/m4/free.m4 \
$(top_srcdir)/import/m4/frexp.m4 \
$(top_srcdir)/import/m4/frexpl.m4 \
$(top_srcdir)/import/m4/fstat.m4 \
@ -171,7 +172,6 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/import/m4/gnulib-comp.m4 \
$(top_srcdir)/import/m4/include_next.m4 \
$(top_srcdir)/import/m4/inet_ntop.m4 \
$(top_srcdir)/import/m4/inttypes-pri.m4 \
$(top_srcdir)/import/m4/inttypes.m4 \
$(top_srcdir)/import/m4/isblank.m4 \
$(top_srcdir)/import/m4/isnand.m4 \
@ -183,7 +183,6 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/import/m4/locale-ja.m4 \
$(top_srcdir)/import/m4/locale-zh.m4 \
$(top_srcdir)/import/m4/locale_h.m4 \
$(top_srcdir)/import/m4/localtime-buffer.m4 \
$(top_srcdir)/import/m4/lock.m4 \
$(top_srcdir)/import/m4/lstat.m4 \
$(top_srcdir)/import/m4/malloc.m4 \
@ -216,6 +215,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/import/m4/openat.m4 \
$(top_srcdir)/import/m4/opendir.m4 \
$(top_srcdir)/import/m4/pathmax.m4 \
$(top_srcdir)/import/m4/pid_t.m4 \
$(top_srcdir)/import/m4/pipe.m4 \
$(top_srcdir)/import/m4/pthread_rwlock_rdlock.m4 \
$(top_srcdir)/import/m4/rawmemchr.m4 \
$(top_srcdir)/import/m4/readdir.m4 \
@ -383,6 +384,7 @@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@
GNULIB_ACCESS = @GNULIB_ACCESS@
GNULIB_ACOSF = @GNULIB_ACOSF@
GNULIB_ACOSL = @GNULIB_ACOSL@
GNULIB_ALIGNED_ALLOC = @GNULIB_ALIGNED_ALLOC@
GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
GNULIB_ASINF = @GNULIB_ASINF@
GNULIB_ASINL = @GNULIB_ASINL@
@ -422,6 +424,13 @@ GNULIB_DUP3 = @GNULIB_DUP3@
GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
GNULIB_ENVIRON = @GNULIB_ENVIRON@
GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
GNULIB_EXECL = @GNULIB_EXECL@
GNULIB_EXECLE = @GNULIB_EXECLE@
GNULIB_EXECLP = @GNULIB_EXECLP@
GNULIB_EXECV = @GNULIB_EXECV@
GNULIB_EXECVE = @GNULIB_EXECVE@
GNULIB_EXECVP = @GNULIB_EXECVP@
GNULIB_EXECVPE = @GNULIB_EXECVPE@
GNULIB_EXP2 = @GNULIB_EXP2@
GNULIB_EXP2F = @GNULIB_EXP2F@
GNULIB_EXP2L = @GNULIB_EXP2L@
@ -464,6 +473,7 @@ GNULIB_FPURGE = @GNULIB_FPURGE@
GNULIB_FPUTC = @GNULIB_FPUTC@
GNULIB_FPUTS = @GNULIB_FPUTS@
GNULIB_FREAD = @GNULIB_FREAD@
GNULIB_FREE_POSIX = @GNULIB_FREE_POSIX@
GNULIB_FREOPEN = @GNULIB_FREOPEN@
GNULIB_FREXP = @GNULIB_FREXP@
GNULIB_FREXPF = @GNULIB_FREXPF@
@ -501,6 +511,7 @@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@
GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@
GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
GNULIB_GETUMASK = @GNULIB_GETUMASK@
GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
GNULIB_GLOB = @GNULIB_GLOB@
GNULIB_GRANTPT = @GNULIB_GRANTPT@
@ -575,10 +586,58 @@ GNULIB_MBSSPN = @GNULIB_MBSSPN@
GNULIB_MBSSTR = @GNULIB_MBSSTR@
GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
GNULIB_MBTOWC = @GNULIB_MBTOWC@
GNULIB_MDA_ACCESS = @GNULIB_MDA_ACCESS@
GNULIB_MDA_CHDIR = @GNULIB_MDA_CHDIR@
GNULIB_MDA_CHMOD = @GNULIB_MDA_CHMOD@
GNULIB_MDA_CLOSE = @GNULIB_MDA_CLOSE@
GNULIB_MDA_CREAT = @GNULIB_MDA_CREAT@
GNULIB_MDA_DUP = @GNULIB_MDA_DUP@
GNULIB_MDA_DUP2 = @GNULIB_MDA_DUP2@
GNULIB_MDA_ECVT = @GNULIB_MDA_ECVT@
GNULIB_MDA_EXECL = @GNULIB_MDA_EXECL@
GNULIB_MDA_EXECLE = @GNULIB_MDA_EXECLE@
GNULIB_MDA_EXECLP = @GNULIB_MDA_EXECLP@
GNULIB_MDA_EXECV = @GNULIB_MDA_EXECV@
GNULIB_MDA_EXECVE = @GNULIB_MDA_EXECVE@
GNULIB_MDA_EXECVP = @GNULIB_MDA_EXECVP@
GNULIB_MDA_EXECVPE = @GNULIB_MDA_EXECVPE@
GNULIB_MDA_FCLOSEALL = @GNULIB_MDA_FCLOSEALL@
GNULIB_MDA_FCVT = @GNULIB_MDA_FCVT@
GNULIB_MDA_FDOPEN = @GNULIB_MDA_FDOPEN@
GNULIB_MDA_FILENO = @GNULIB_MDA_FILENO@
GNULIB_MDA_GCVT = @GNULIB_MDA_GCVT@
GNULIB_MDA_GETCWD = @GNULIB_MDA_GETCWD@
GNULIB_MDA_GETPID = @GNULIB_MDA_GETPID@
GNULIB_MDA_GETW = @GNULIB_MDA_GETW@
GNULIB_MDA_ISATTY = @GNULIB_MDA_ISATTY@
GNULIB_MDA_J0 = @GNULIB_MDA_J0@
GNULIB_MDA_J1 = @GNULIB_MDA_J1@
GNULIB_MDA_JN = @GNULIB_MDA_JN@
GNULIB_MDA_LSEEK = @GNULIB_MDA_LSEEK@
GNULIB_MDA_MEMCCPY = @GNULIB_MDA_MEMCCPY@
GNULIB_MDA_MKDIR = @GNULIB_MDA_MKDIR@
GNULIB_MDA_MKTEMP = @GNULIB_MDA_MKTEMP@
GNULIB_MDA_OPEN = @GNULIB_MDA_OPEN@
GNULIB_MDA_PUTENV = @GNULIB_MDA_PUTENV@
GNULIB_MDA_PUTW = @GNULIB_MDA_PUTW@
GNULIB_MDA_READ = @GNULIB_MDA_READ@
GNULIB_MDA_RMDIR = @GNULIB_MDA_RMDIR@
GNULIB_MDA_STRDUP = @GNULIB_MDA_STRDUP@
GNULIB_MDA_SWAB = @GNULIB_MDA_SWAB@
GNULIB_MDA_TEMPNAM = @GNULIB_MDA_TEMPNAM@
GNULIB_MDA_TZSET = @GNULIB_MDA_TZSET@
GNULIB_MDA_UMASK = @GNULIB_MDA_UMASK@
GNULIB_MDA_UNLINK = @GNULIB_MDA_UNLINK@
GNULIB_MDA_WCSDUP = @GNULIB_MDA_WCSDUP@
GNULIB_MDA_WRITE = @GNULIB_MDA_WRITE@
GNULIB_MDA_Y0 = @GNULIB_MDA_Y0@
GNULIB_MDA_Y1 = @GNULIB_MDA_Y1@
GNULIB_MDA_YN = @GNULIB_MDA_YN@
GNULIB_MEMCHR = @GNULIB_MEMCHR@
GNULIB_MEMMEM = @GNULIB_MEMMEM@
GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
GNULIB_MKDIR = @GNULIB_MKDIR@
GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
GNULIB_MKFIFO = @GNULIB_MKFIFO@
@ -607,6 +666,7 @@ GNULIB_PERROR = @GNULIB_PERROR@
GNULIB_PIPE = @GNULIB_PIPE@
GNULIB_PIPE2 = @GNULIB_PIPE2@
GNULIB_POPEN = @GNULIB_POPEN@
GNULIB_POSIX_MEMALIGN = @GNULIB_POSIX_MEMALIGN@
GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
GNULIB_POWF = @GNULIB_POWF@
GNULIB_PREAD = @GNULIB_PREAD@
@ -660,7 +720,9 @@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
GNULIB_SETLOCALE_NULL = @GNULIB_SETLOCALE_NULL@
GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@
GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@
GNULIB_SIGABBREV_NP = @GNULIB_SIGABBREV_NP@
GNULIB_SIGACTION = @GNULIB_SIGACTION@
GNULIB_SIGDESCR_NP = @GNULIB_SIGDESCR_NP@
GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
@ -682,6 +744,7 @@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
GNULIB_STRDUP = @GNULIB_STRDUP@
GNULIB_STRERROR = @GNULIB_STRERROR@
GNULIB_STRERRORNAME_NP = @GNULIB_STRERRORNAME_NP@
GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
GNULIB_STRFTIME = @GNULIB_STRFTIME@
GNULIB_STRNCAT = @GNULIB_STRNCAT@
@ -707,6 +770,7 @@ GNULIB_TANF = @GNULIB_TANF@
GNULIB_TANHF = @GNULIB_TANHF@
GNULIB_TANL = @GNULIB_TANL@
GNULIB_TIMEGM = @GNULIB_TIMEGM@
GNULIB_TIMESPEC_GET = @GNULIB_TIMESPEC_GET@
GNULIB_TIME_R = @GNULIB_TIME_R@
GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
GNULIB_TMPFILE = @GNULIB_TMPFILE@
@ -779,6 +843,7 @@ GREP = @GREP@
HAVE_ACCEPT4 = @HAVE_ACCEPT4@
HAVE_ACOSF = @HAVE_ACOSF@
HAVE_ACOSL = @HAVE_ACOSL@
HAVE_ALIGNED_ALLOC = @HAVE_ALIGNED_ALLOC@
HAVE_ALLOCA_H = @HAVE_ALLOCA_H@
HAVE_ALPHASORT = @HAVE_ALPHASORT@
HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@
@ -813,13 +878,17 @@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@
HAVE_DECL_COSL = @HAVE_DECL_COSL@
HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
HAVE_DECL_ECVT = @HAVE_DECL_ECVT@
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
HAVE_DECL_EXECVPE = @HAVE_DECL_EXECVPE@
HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@
HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@
HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@
HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@
HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
HAVE_DECL_FCLOSEALL = @HAVE_DECL_FCLOSEALL@
HAVE_DECL_FCVT = @HAVE_DECL_FCVT@
HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@
HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@
@ -828,6 +897,7 @@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@
HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@
HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@
HAVE_DECL_GCVT = @HAVE_DECL_GCVT@
HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
@ -880,14 +950,15 @@ HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@
HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
HAVE_DECL_WCSDUP = @HAVE_DECL_WCSDUP@
HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
HAVE_DIRENT_H = @HAVE_DIRENT_H@
HAVE_DPRINTF = @HAVE_DPRINTF@
HAVE_DUP2 = @HAVE_DUP2@
HAVE_DUP3 = @HAVE_DUP3@
HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
HAVE_EXECVPE = @HAVE_EXECVPE@
HAVE_EXPF = @HAVE_EXPF@
HAVE_EXPL = @HAVE_EXPL@
HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
@ -930,6 +1001,7 @@ HAVE_GETPASS = @HAVE_GETPASS@
HAVE_GETRANDOM = @HAVE_GETRANDOM@
HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
HAVE_GETUMASK = @HAVE_GETUMASK@
HAVE_GLOB = @HAVE_GLOB@
HAVE_GLOB_H = @HAVE_GLOB_H@
HAVE_GLOB_PATTERN_P = @HAVE_GLOB_PATTERN_P@
@ -972,7 +1044,6 @@ HAVE_MBSLEN = @HAVE_MBSLEN@
HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
HAVE_MBTOWC = @HAVE_MBTOWC@
HAVE_MEMCHR = @HAVE_MEMCHR@
HAVE_MEMPCPY = @HAVE_MEMPCPY@
HAVE_MKDIRAT = @HAVE_MKDIRAT@
HAVE_MKDTEMP = @HAVE_MKDTEMP@
@ -997,6 +1068,7 @@ HAVE_PCLOSE = @HAVE_PCLOSE@
HAVE_PIPE = @HAVE_PIPE@
HAVE_PIPE2 = @HAVE_PIPE2@
HAVE_POPEN = @HAVE_POPEN@
HAVE_POSIX_MEMALIGN = @HAVE_POSIX_MEMALIGN@
HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
HAVE_POWF = @HAVE_POWF@
@ -1030,7 +1102,9 @@ HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
HAVE_SETENV = @HAVE_SETENV@
HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
HAVE_SETSTATE = @HAVE_SETSTATE@
HAVE_SIGABBREV_NP = @HAVE_SIGABBREV_NP@
HAVE_SIGACTION = @HAVE_SIGACTION@
HAVE_SIGDESCR_NP = @HAVE_SIGDESCR_NP@
HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
@ -1048,6 +1122,7 @@ HAVE_STPCPY = @HAVE_STPCPY@
HAVE_STPNCPY = @HAVE_STPNCPY@
HAVE_STRCASESTR = @HAVE_STRCASESTR@
HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
HAVE_STRERRORNAME_NP = @HAVE_STRERRORNAME_NP@
HAVE_STRPBRK = @HAVE_STRPBRK@
HAVE_STRPTIME = @HAVE_STRPTIME@
HAVE_STRSEP = @HAVE_STRSEP@
@ -1076,9 +1151,9 @@ HAVE_TANF = @HAVE_TANF@
HAVE_TANHF = @HAVE_TANHF@
HAVE_TANL = @HAVE_TANL@
HAVE_TIMEGM = @HAVE_TIMEGM@
HAVE_TIMESPEC_GET = @HAVE_TIMESPEC_GET@
HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
HAVE_TZSET = @HAVE_TZSET@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_UNLINKAT = @HAVE_UNLINKAT@
HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
@ -1153,6 +1228,7 @@ LIBPTHREAD = @LIBPTHREAD@
LIBS = @LIBS@
LIBSTDTHREAD = @LIBSTDTHREAD@
LIBTHREAD = @LIBTHREAD@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_GETLOGIN = @LIB_GETLOGIN@
LIB_GETRANDOM = @LIB_GETRANDOM@
LIB_HARD_LOCALE = @LIB_HARD_LOCALE@
@ -1244,12 +1320,12 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
PRIPTR_PREFIX = @PRIPTR_PREFIX@
PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
REPLACE_ACCESS = @REPLACE_ACCESS@
REPLACE_ACOSF = @REPLACE_ACOSF@
REPLACE_ALIGNED_ALLOC = @REPLACE_ALIGNED_ALLOC@
REPLACE_ASINF = @REPLACE_ASINF@
REPLACE_ATAN2F = @REPLACE_ATAN2F@
REPLACE_ATANF = @REPLACE_ATANF@
@ -1273,6 +1349,13 @@ REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
REPLACE_EXECL = @REPLACE_EXECL@
REPLACE_EXECLE = @REPLACE_EXECLE@
REPLACE_EXECLP = @REPLACE_EXECLP@
REPLACE_EXECV = @REPLACE_EXECV@
REPLACE_EXECVE = @REPLACE_EXECVE@
REPLACE_EXECVP = @REPLACE_EXECVP@
REPLACE_EXECVPE = @REPLACE_EXECVPE@
REPLACE_EXP2 = @REPLACE_EXP2@
REPLACE_EXP2L = @REPLACE_EXP2L@
REPLACE_EXPF = @REPLACE_EXPF@
@ -1289,6 +1372,7 @@ REPLACE_FCNTL = @REPLACE_FCNTL@
REPLACE_FDOPEN = @REPLACE_FDOPEN@
REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
REPLACE_FFLUSH = @REPLACE_FFLUSH@
REPLACE_FFSLL = @REPLACE_FFSLL@
REPLACE_FLOOR = @REPLACE_FLOOR@
REPLACE_FLOORF = @REPLACE_FLOORF@
REPLACE_FLOORL = @REPLACE_FLOORL@
@ -1302,6 +1386,7 @@ REPLACE_FNMATCH = @REPLACE_FNMATCH@
REPLACE_FOPEN = @REPLACE_FOPEN@
REPLACE_FPRINTF = @REPLACE_FPRINTF@
REPLACE_FPURGE = @REPLACE_FPURGE@
REPLACE_FREE = @REPLACE_FREE@
REPLACE_FREELOCALE = @REPLACE_FREELOCALE@
REPLACE_FREOPEN = @REPLACE_FREOPEN@
REPLACE_FREXP = @REPLACE_FREXP@
@ -1384,7 +1469,9 @@ REPLACE_MEMCHR = @REPLACE_MEMCHR@
REPLACE_MEMMEM = @REPLACE_MEMMEM@
REPLACE_MKDIR = @REPLACE_MKDIR@
REPLACE_MKFIFO = @REPLACE_MKFIFO@
REPLACE_MKFIFOAT = @REPLACE_MKFIFOAT@
REPLACE_MKNOD = @REPLACE_MKNOD@
REPLACE_MKNODAT = @REPLACE_MKNODAT@
REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
REPLACE_MKTIME = @REPLACE_MKTIME@
REPLACE_MODF = @REPLACE_MODF@
@ -1400,6 +1487,7 @@ REPLACE_OPENAT = @REPLACE_OPENAT@
REPLACE_OPENDIR = @REPLACE_OPENDIR@
REPLACE_PERROR = @REPLACE_PERROR@
REPLACE_POPEN = @REPLACE_POPEN@
REPLACE_POSIX_MEMALIGN = @REPLACE_POSIX_MEMALIGN@
REPLACE_PREAD = @REPLACE_PREAD@
REPLACE_PRINTF = @REPLACE_PRINTF@
REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
@ -1431,7 +1519,7 @@ REPLACE_SETENV = @REPLACE_SETENV@
REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
REPLACE_SETSTATE = @REPLACE_SETSTATE@
REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
REPLACE_SIGNBIT_USING_BUILTINS = @REPLACE_SIGNBIT_USING_BUILTINS@
REPLACE_SINF = @REPLACE_SINF@
REPLACE_SINHF = @REPLACE_SINHF@
REPLACE_SLEEP = @REPLACE_SLEEP@
@ -1447,6 +1535,7 @@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
REPLACE_STRDUP = @REPLACE_STRDUP@
REPLACE_STRERROR = @REPLACE_STRERROR@
REPLACE_STRERRORNAME_NP = @REPLACE_STRERRORNAME_NP@
REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
REPLACE_STRFTIME = @REPLACE_STRFTIME@
REPLACE_STRNCAT = @REPLACE_STRNCAT@
@ -1506,6 +1595,7 @@ STDINT_H = @STDINT_H@
STRIP = @STRIP@
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
TIME_H_DEFINES_TIME_UTC = @TIME_H_DEFINES_TIME_UTC@
UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@

7
gnulib/aclocal.m4 vendored
View File

@ -1193,6 +1193,7 @@ m4_include([import/m4/btowc.m4])
m4_include([import/m4/builtin-expect.m4])
m4_include([import/m4/canonicalize.m4])
m4_include([import/m4/chdir-long.m4])
m4_include([import/m4/clock_time.m4])
m4_include([import/m4/close.m4])
m4_include([import/m4/closedir.m4])
m4_include([import/m4/codeset.m4])
@ -1201,7 +1202,6 @@ m4_include([import/m4/d-ino.m4])
m4_include([import/m4/d-type.m4])
m4_include([import/m4/dirent_h.m4])
m4_include([import/m4/dirfd.m4])
m4_include([import/m4/dirname.m4])
m4_include([import/m4/double-slash-root.m4])
m4_include([import/m4/dup.m4])
m4_include([import/m4/dup2.m4])
@ -1224,6 +1224,7 @@ m4_include([import/m4/float_h.m4])
m4_include([import/m4/fnmatch.m4])
m4_include([import/m4/fnmatch_h.m4])
m4_include([import/m4/fpieee.m4])
m4_include([import/m4/free.m4])
m4_include([import/m4/frexp.m4])
m4_include([import/m4/frexpl.m4])
m4_include([import/m4/fstat.m4])
@ -1244,7 +1245,6 @@ m4_include([import/m4/gnulib-common.m4])
m4_include([import/m4/gnulib-comp.m4])
m4_include([import/m4/include_next.m4])
m4_include([import/m4/inet_ntop.m4])
m4_include([import/m4/inttypes-pri.m4])
m4_include([import/m4/inttypes.m4])
m4_include([import/m4/isblank.m4])
m4_include([import/m4/isnand.m4])
@ -1256,7 +1256,6 @@ m4_include([import/m4/locale-fr.m4])
m4_include([import/m4/locale-ja.m4])
m4_include([import/m4/locale-zh.m4])
m4_include([import/m4/locale_h.m4])
m4_include([import/m4/localtime-buffer.m4])
m4_include([import/m4/lock.m4])
m4_include([import/m4/lstat.m4])
m4_include([import/m4/malloc.m4])
@ -1289,6 +1288,8 @@ m4_include([import/m4/open.m4])
m4_include([import/m4/openat.m4])
m4_include([import/m4/opendir.m4])
m4_include([import/m4/pathmax.m4])
m4_include([import/m4/pid_t.m4])
m4_include([import/m4/pipe.m4])
m4_include([import/m4/pthread_rwlock_rdlock.m4])
m4_include([import/m4/rawmemchr.m4])
m4_include([import/m4/readdir.m4])

View File

@ -18,12 +18,7 @@
/* Define to the number of bits in type 'wint_t'. */
#undef BITSIZEOF_WINT_T
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
#undef CRAY_STACKSEG_END
/* Define to 1 if using `alloca.c'. */
/* Define to 1 if using 'alloca.c'. */
#undef C_ALLOCA
/* Define as the bit index in the word where to find bit 0 of the exponent of
@ -67,9 +62,6 @@
and handles trailing slash correctly. */
#undef FUNC_REALPATH_WORKS
/* Define if gettimeofday clobbers the localtime buffer. */
#undef GETTIMEOFDAY_CLOBBERS_LOCALTIME
/* Define this to 'void' or 'struct timezone' to match the system's
declaration of the second argument to gettimeofday. */
#undef GETTIMEOFDAY_TIMEZONE
@ -134,6 +126,10 @@
whether the gnulib module strerror_r-posix shall be considered present. */
#undef GNULIB_STRERROR_R_POSIX
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
whether the gnulib module tempname shall be considered present. */
#undef GNULIB_TEMPNAME
/* Define to 1 when the gnulib module btowc should be tested. */
#undef GNULIB_TEST_BTOWC
@ -177,6 +173,9 @@
/* Define to 1 when the gnulib module fnmatch should be tested. */
#undef GNULIB_TEST_FNMATCH
/* Define to 1 when the gnulib module free-posix should be tested. */
#undef GNULIB_TEST_FREE_POSIX
/* Define to 1 when the gnulib module frexp should be tested. */
#undef GNULIB_TEST_FREXP
@ -237,6 +236,9 @@
/* Define to 1 when the gnulib module memrchr should be tested. */
#undef GNULIB_TEST_MEMRCHR
/* Define to 1 when the gnulib module mkdir should be tested. */
#undef GNULIB_TEST_MKDIR
/* Define to 1 when the gnulib module mkdtemp should be tested. */
#undef GNULIB_TEST_MKDTEMP
@ -252,6 +254,9 @@
/* Define to 1 when the gnulib module opendir should be tested. */
#undef GNULIB_TEST_OPENDIR
/* Define to 1 when the gnulib module pipe should be tested. */
#undef GNULIB_TEST_PIPE
/* Define to 1 when the gnulib module rawmemchr should be tested. */
#undef GNULIB_TEST_RAWMEMCHR
@ -344,6 +349,12 @@
/* Define to 1 if you have the `catgets' function. */
#undef HAVE_CATGETS
/* Define to 1 if you have the `clock_gettime' function. */
#undef HAVE_CLOCK_GETTIME
/* Define to 1 if you have the `clock_settime' function. */
#undef HAVE_CLOCK_SETTIME
/* Define to 1 if you have the `closedir' function. */
#undef HAVE_CLOSEDIR
@ -358,14 +369,34 @@
*/
#undef HAVE_DECL_DIRFD
/* Define to 1 if you have the declaration of `ecvt', and to 0 if you don't.
*/
#undef HAVE_DECL_ECVT
/* Define to 1 if you have the declaration of `execvpe', and to 0 if you
don't. */
#undef HAVE_DECL_EXECVPE
/* Define to 1 if you have the declaration of `fchdir', and to 0 if you don't.
*/
#undef HAVE_DECL_FCHDIR
/* Define to 1 if you have the declaration of `fcloseall', and to 0 if you
don't. */
#undef HAVE_DECL_FCLOSEALL
/* Define to 1 if you have the declaration of `fcvt', and to 0 if you don't.
*/
#undef HAVE_DECL_FCVT
/* Define to 1 if you have the declaration of `fdopendir', and to 0 if you
don't. */
#undef HAVE_DECL_FDOPENDIR
/* Define to 1 if you have the declaration of `gcvt', and to 0 if you don't.
*/
#undef HAVE_DECL_GCVT
/* Define to 1 if you have the declaration of `getcwd', and to 0 if you don't.
*/
#undef HAVE_DECL_GETCWD
@ -446,6 +477,10 @@
don't. */
#undef HAVE_DECL_UNSETENV
/* Define to 1 if you have the declaration of `wcsdup', and to 0 if you don't.
*/
#undef HAVE_DECL_WCSDUP
/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't.
*/
#undef HAVE_DECL___ARGV
@ -459,12 +494,12 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the 'dup2' function. */
#undef HAVE_DUP2
/* Define if you have the declaration of environ. */
#undef HAVE_ENVIRON_DECL
/* Define to 1 if you have the `faccessat' function. */
#undef HAVE_FACCESSAT
/* Define to 1 if you have the `fchdir' function. */
#undef HAVE_FCHDIR
@ -618,6 +653,9 @@
when it succeeds. */
#undef HAVE_MINIMALLY_WORKING_GETCWD
/* Define to 1 if you have the <minix/config.h> header file. */
#undef HAVE_MINIX_CONFIG_H
/* Define to 1 if <limits.h> defines the MIN and MAX macros. */
#undef HAVE_MINMAX_IN_LIMITS_H
@ -693,6 +731,9 @@
/* Define to 1 if the system has the type `sa_family_t'. */
#undef HAVE_SA_FAMILY_T
/* Define to 1 if you have the <sdkddkver.h> header file. */
#undef HAVE_SDKDDKVER_H
/* Define to 1 if you have the <search.h> header file. */
#undef HAVE_SEARCH_H
@ -729,9 +770,6 @@
/* Define to 1 if you have the `strchrnul' function. */
#undef HAVE_STRCHRNUL
/* Define to 1 if you have the `strdup' function. */
#undef HAVE_STRDUP
/* Define to 1 if you have the `strerror_r' function. */
#undef HAVE_STRERROR_R
@ -967,9 +1005,6 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
#undef PRI_MACROS_BROKEN
/* Define to the type that is the result of default argument promotions of
type mode_t. */
#undef PROMOTED_MODE_T
@ -984,6 +1019,10 @@
/* Define to 1 if readlink fails to recognize a trailing slash. */
#undef READLINK_TRAILING_SLASH_BUG
/* Define to 1 if readlink sets errno instead of truncating a too-long link.
*/
#undef READLINK_TRUNCATE_BUG
/* Define if rename does not work when the destination file exists, as on
Cygwin 1.5 or Windows. */
#undef RENAME_DEST_EXISTS_BUG
@ -1034,9 +1073,9 @@
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION
/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
@ -1074,19 +1113,44 @@
#ifndef _DARWIN_C_SOURCE
# undef _DARWIN_C_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable NetBSD extensions on NetBSD. */
/* Enable X/Open compliant socket functions that do not require linking
with -lxnet on HP-UX 11.11. */
#ifndef _HPUX_ALT_XOPEN_SOCKET_API
# undef _HPUX_ALT_XOPEN_SOCKET_API
#endif
/* Identify the host operating system as Minix.
This macro does not affect the system headers' behavior.
A future release of Autoconf may stop defining this macro. */
#ifndef _MINIX
# undef _MINIX
#endif
/* Enable general extensions on NetBSD.
Enable NetBSD compatibility extensions on Minix. */
#ifndef _NETBSD_SOURCE
# undef _NETBSD_SOURCE
#endif
/* Enable OpenBSD extensions on NetBSD. */
/* Enable OpenBSD compatibility extensions on NetBSD.
Oddly enough, this does nothing on OpenBSD. */
#ifndef _OPENBSD_SOURCE
# undef _OPENBSD_SOURCE
#endif
/* Enable threading extensions on Solaris. */
/* Define to 1 if needed for POSIX-compatible behavior. */
#ifndef _POSIX_SOURCE
# undef _POSIX_SOURCE
#endif
/* Define to 2 if needed for POSIX-compatible behavior. */
#ifndef _POSIX_1_SOURCE
# undef _POSIX_1_SOURCE
#endif
/* Enable POSIX-compatible threading on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
@ -1122,21 +1186,11 @@
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable X/Open extensions if necessary. HP-UX 11.11 defines
mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of
whether compiling with -Ae or -D_HPUX_SOURCE=1. */
/* Enable X/Open extensions. Define to 500 only if necessary
to make mbstate_t available. */
#ifndef _XOPEN_SOURCE
# undef _XOPEN_SOURCE
#endif
/* Enable X/Open compliant socket functions that do not require linking
with -lxnet on HP-UX 11.11. */
#ifndef _HPUX_ALT_XOPEN_SOCKET_API
# undef _HPUX_ALT_XOPEN_SOCKET_API
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* Define if the native Windows multithreading API can be used. */
@ -1177,18 +1231,15 @@
#endif
/* Define to enable the declarations of ISO C 11 types and functions. */
#undef _ISOC11_SOURCE
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES
/* Define to 1 on Solaris. */
#undef _LCONV_C99
/* Define to 1 if on MINIX. */
#undef _MINIX
/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */
#undef _NETBSD_SOURCE
/* The _Noreturn keyword of C11. */
#ifndef _Noreturn
# if (defined __cplusplus \
@ -1209,7 +1260,7 @@
? 6000000 <= __apple_build_version__ \
: 3 < __clang_major__ + (5 <= __clang_minor__))))
/* _Noreturn works as-is. */
# elif _GL_GNUC_PREREQ (2, 8) || 0x5110 <= __SUNPRO_C
# elif _GL_GNUC_PREREQ (2, 8) || defined __clang__ || 0x5110 <= __SUNPRO_C
# define _Noreturn __attribute__ ((__noreturn__))
# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
# define _Noreturn __declspec (noreturn)
@ -1219,17 +1270,10 @@
#endif
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
#undef _POSIX_1_SOURCE
/* Define to 1 in order to get the POSIX compatible declarations of socket
functions. */
#undef _POSIX_PII_SOCKET
/* Define to 1 if you need to in order for 'stat' and other things to work. */
#undef _POSIX_SOURCE
/* For standard stat data types on VMS. */
#undef _USE_STD_STAT
@ -1277,6 +1321,7 @@
# define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3)
# define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95)
# define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1)
# define _GL_ATTR_diagnose_if 0
# define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3)
# define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1)
# define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0)
@ -1320,9 +1365,14 @@
#endif
/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at
<https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>. */
<https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>.
Also, Oracle Studio 12.6 requires 'cold' not '__cold__'. */
#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__
# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
# ifndef __SUNPRO_C
# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
# else
# define _GL_ATTRIBUTE_COLD __attribute__ ((cold))
# endif
#else
# define _GL_ATTRIBUTE_COLD
#endif
@ -1344,6 +1394,9 @@
#if _GL_HAS_ATTRIBUTE (error)
# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg)))
# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg)))
#elif _GL_HAS_ATTRIBUTE (diagnose_if)
# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__diagnose_if__ (1, msg, "error")))
# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__diagnose_if__ (1, msg, "warning")))
#else
# define _GL_ATTRIBUTE_ERROR(msg)
# define _GL_ATTRIBUTE_WARNING(msg)
@ -1376,7 +1429,8 @@
# define _GL_ATTRIBUTE_LEAF
#endif
#if _GL_HAS_ATTRIBUTE (may_alias)
/* Oracle Studio 12.6 mishandles may_alias despite __has_attribute OK. */
#if _GL_HAS_ATTRIBUTE (may_alias) && !defined __SUNPRO_C
# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__))
#else
# define _GL_ATTRIBUTE_MAY_ALIAS
@ -1592,18 +1646,34 @@
/* Define to a type if <wchar.h> does not define. */
#undef mbstate_t
/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2, where
n1 and n2 are expressions without side effects, that evaluate to real
numbers (excluding NaN).
It returns
1 if n1 > n2
0 if n1 == n2
-1 if n1 < n2
The naïve code (n1 > n2 ? 1 : n1 < n2 ? -1 : 0) produces a conditional
jump with nearly all GCC versions up to GCC 10.
This variant (n1 < n2 ? -1 : n1 > n2) produces a conditional with many
GCC versions up to GCC 9.
The better code (n1 > n2) - (n1 < n2) from Hacker's Delight § 2-9
avoids conditional jumps in all GCC versions >= 3.4. */
#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2)))
/* Define to `int' if <sys/types.h> does not define. */
#undef mode_t
/* Define to the type of st_nlink in struct stat, or a supertype. */
#undef nlink_t
/* Define to `int' if <sys/types.h> does not define. */
/* Define as a signed integer type capable of holding a process identifier. */
#undef pid_t
/* Define to the equivalent of the C99 'restrict' keyword, or to
nothing if this is not supported. Do not define if restrict is
supported directly. */
supported only directly. */
#undef restrict
/* Work around a bug in older versions of Sun C++, which did not
#define __restrict__ or support _Restrict or __restrict__

2699
gnulib/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
# Copyright (C) 2002-2020 Free Software Foundation, Inc.
# Copyright (C) 2002-2021 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -103,7 +103,7 @@ EXTRA_libgnu_a_SOURCES =
# Use this preprocessor expression to decide whether #include_next works.
# Do not rely on a 'configure'-time test for this, since the expression
# might appear in an installed header, which is used by some other compiler.
HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
HAVE_INCLUDE_NEXT = (__GNUC__ || __clang__ || 60000000 <= __DECC_VER)
## end gnulib module absolute-header
@ -198,6 +198,14 @@ EXTRA_DIST += attribute.h
## end gnulib module attribute
## begin gnulib module basename-lgpl
libgnu_a_SOURCES += basename-lgpl.c
EXTRA_DIST += basename-lgpl.h
## end gnulib module basename-lgpl
## begin gnulib module btowc
@ -345,7 +353,7 @@ EXTRA_libgnu_a_SOURCES += dirfd.c
## begin gnulib module dirname-lgpl
libgnu_a_SOURCES += dirname-lgpl.c basename-lgpl.c stripslash.c
libgnu_a_SOURCES += dirname-lgpl.c stripslash.c
EXTRA_DIST += dirname.h
@ -369,6 +377,13 @@ EXTRA_libgnu_a_SOURCES += dup2.c
## end gnulib module dup2
## begin gnulib module eloop-threshold
EXTRA_DIST += eloop-threshold.h
## end gnulib module eloop-threshold
## begin gnulib module errno
BUILT_SOURCES += $(ERRNO_H)
@ -457,6 +472,8 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \
-e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \
-e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \
-e 's/@''GNULIB_MDA_CREAT''@/$(GNULIB_MDA_CREAT)/g' \
-e 's/@''GNULIB_MDA_OPEN''@/$(GNULIB_MDA_OPEN)/g' \
-e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \
-e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
-e 's|@''REPLACE_CREAT''@|$(REPLACE_CREAT)|g' \
@ -560,6 +577,15 @@ EXTRA_libgnu_a_SOURCES += fnmatch.c fnmatch_loop.c
## end gnulib module fnmatch
## begin gnulib module fnmatch-gnu
EXTRA_DIST += fnmatch.c
EXTRA_libgnu_a_SOURCES += fnmatch.c
## end gnulib module fnmatch-gnu
## begin gnulib module fnmatch-h
BUILT_SOURCES += $(FNMATCH_H)
@ -601,6 +627,15 @@ EXTRA_DIST += fpucw.h
## end gnulib module fpucw
## begin gnulib module free-posix
EXTRA_DIST += free.c
EXTRA_libgnu_a_SOURCES += free.c
## end gnulib module free-posix
## begin gnulib module frexp
@ -756,6 +791,12 @@ EXTRA_DIST += hard-locale.h
## end gnulib module hard-locale
## begin gnulib module idx
libgnu_a_SOURCES += idx.h
## end gnulib module idx
## begin gnulib module inet_ntop
@ -786,7 +827,6 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \
-e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
-e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
-e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
-e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
@ -927,15 +967,6 @@ EXTRA_DIST += locale.in.h
## end gnulib module locale
## begin gnulib module localtime-buffer
EXTRA_DIST += localtime-buffer.c localtime-buffer.h
EXTRA_libgnu_a_SOURCES += localtime-buffer.c
## end gnulib module localtime-buffer
## begin gnulib module lock
libgnu_a_SOURCES += glthread/lock.h glthread/lock.c
@ -1079,6 +1110,12 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's/@''GNULIB_TRUNC''@/$(GNULIB_TRUNC)/g' \
-e 's/@''GNULIB_TRUNCF''@/$(GNULIB_TRUNCF)/g' \
-e 's/@''GNULIB_TRUNCL''@/$(GNULIB_TRUNCL)/g' \
-e 's/@''GNULIB_MDA_J0''@/$(GNULIB_MDA_J0)/g' \
-e 's/@''GNULIB_MDA_J1''@/$(GNULIB_MDA_J1)/g' \
-e 's/@''GNULIB_MDA_JN''@/$(GNULIB_MDA_JN)/g' \
-e 's/@''GNULIB_MDA_Y0''@/$(GNULIB_MDA_Y0)/g' \
-e 's/@''GNULIB_MDA_Y1''@/$(GNULIB_MDA_Y1)/g' \
-e 's/@''GNULIB_MDA_YN''@/$(GNULIB_MDA_YN)/g' \
| \
sed -e 's|@''HAVE_ACOSF''@|$(HAVE_ACOSF)|g' \
-e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \
@ -1247,7 +1284,7 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''REPLACE_ROUNDF''@|$(REPLACE_ROUNDF)|g' \
-e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \
-e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \
-e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \
-e 's|@''REPLACE_SIGNBIT_USING_BUILTINS''@|$(REPLACE_SIGNBIT_USING_BUILTINS)|g' \
-e 's|@''REPLACE_SINF''@|$(REPLACE_SINF)|g' \
-e 's|@''REPLACE_SINHF''@|$(REPLACE_SINHF)|g' \
-e 's|@''REPLACE_SQRTF''@|$(REPLACE_SQRTF)|g' \
@ -1313,6 +1350,15 @@ EXTRA_libgnu_a_SOURCES += memchr.c
## end gnulib module memchr
## begin gnulib module memmem
EXTRA_DIST += memmem.c
EXTRA_libgnu_a_SOURCES += memmem.c
## end gnulib module memmem
## begin gnulib module memmem-simple
@ -1469,6 +1515,15 @@ EXTRA_DIST += pathmax.h
## end gnulib module pathmax
## begin gnulib module pipe-posix
EXTRA_DIST += pipe.c
EXTRA_libgnu_a_SOURCES += pipe.c
## end gnulib module pipe-posix
## begin gnulib module rawmemchr
@ -1549,7 +1604,7 @@ EXTRA_DIST += save-cwd.h
## begin gnulib module scratch_buffer
libgnu_a_SOURCES += malloc/scratch_buffer_grow.c malloc/scratch_buffer_grow_preserve.c malloc/scratch_buffer_set_array_size.c
libgnu_a_SOURCES += malloc/scratch_buffer_dupfree.c malloc/scratch_buffer_grow.c malloc/scratch_buffer_grow_preserve.c malloc/scratch_buffer_set_array_size.c
EXTRA_DIST += malloc/scratch_buffer.h scratch_buffer.h
@ -1875,8 +1930,15 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \
-e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \
-e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \
-e 's/@''GNULIB_MDA_FCLOSEALL''@/$(GNULIB_MDA_FCLOSEALL)/g' \
-e 's/@''GNULIB_MDA_FDOPEN''@/$(GNULIB_MDA_FDOPEN)/g' \
-e 's/@''GNULIB_MDA_FILENO''@/$(GNULIB_MDA_FILENO)/g' \
-e 's/@''GNULIB_MDA_GETW''@/$(GNULIB_MDA_GETW)/g' \
-e 's/@''GNULIB_MDA_PUTW''@/$(GNULIB_MDA_PUTW)/g' \
-e 's/@''GNULIB_MDA_TEMPNAM''@/$(GNULIB_MDA_TEMPNAM)/g' \
< $(srcdir)/stdio.in.h | \
sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
sed -e 's|@''HAVE_DECL_FCLOSEALL''@|$(HAVE_DECL_FCLOSEALL)|g' \
-e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
-e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \
-e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \
-e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
@ -1952,9 +2014,11 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
-e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \
-e 's/@''GNULIB_ALIGNED_ALLOC''@/$(GNULIB_ALIGNED_ALLOC)/g' \
-e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \
-e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \
-e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \
-e 's/@''GNULIB_FREE_POSIX''@/$(GNULIB_FREE_POSIX)/g' \
-e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \
-e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \
-e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \
@ -1965,6 +2029,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \
-e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \
-e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
-e 's/@''GNULIB_POSIX_MEMALIGN''@/$(GNULIB_POSIX_MEMALIGN)/g' \
-e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \
-e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
-e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
@ -1986,10 +2051,19 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
-e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
-e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
-e 's/@''GNULIB_MDA_ECVT''@/$(GNULIB_MDA_ECVT)/g' \
-e 's/@''GNULIB_MDA_FCVT''@/$(GNULIB_MDA_FCVT)/g' \
-e 's/@''GNULIB_MDA_GCVT''@/$(GNULIB_MDA_GCVT)/g' \
-e 's/@''GNULIB_MDA_MKTEMP''@/$(GNULIB_MDA_MKTEMP)/g' \
-e 's/@''GNULIB_MDA_PUTENV''@/$(GNULIB_MDA_PUTENV)/g' \
< $(srcdir)/stdlib.in.h | \
sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
-e 's|@''HAVE_ALIGNED_ALLOC''@|$(HAVE_ALIGNED_ALLOC)|g' \
-e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
-e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
-e 's|@''HAVE_DECL_ECVT''@|$(HAVE_DECL_ECVT)|g' \
-e 's|@''HAVE_DECL_FCVT''@|$(HAVE_DECL_FCVT)|g' \
-e 's|@''HAVE_DECL_GCVT''@|$(HAVE_DECL_GCVT)|g' \
-e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
-e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
-e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
@ -2001,6 +2075,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
-e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \
-e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
-e 's|@''HAVE_POSIX_MEMALIGN''@|$(HAVE_POSIX_MEMALIGN)|g' \
-e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
-e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
-e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
@ -2023,12 +2098,15 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
-e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
-e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \
-e 's|@''REPLACE_ALIGNED_ALLOC''@|$(REPLACE_ALIGNED_ALLOC)|g' \
-e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \
-e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
-e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
-e 's|@''REPLACE_INITSTATE''@|$(REPLACE_INITSTATE)|g' \
-e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
-e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
-e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
-e 's|@''REPLACE_POSIX_MEMALIGN''@|$(REPLACE_POSIX_MEMALIGN)|g' \
-e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
-e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
-e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
@ -2157,14 +2235,18 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \
-e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \
-e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
-e 's/@''GNULIB_STRERRORNAME_NP''@/$(GNULIB_STRERRORNAME_NP)/g' \
-e 's/@''GNULIB_SIGABBREV_NP''@/$(GNULIB_SIGABBREV_NP)/g' \
-e 's/@''GNULIB_SIGDESCR_NP''@/$(GNULIB_SIGDESCR_NP)/g' \
-e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
-e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
-e 's/@''GNULIB_MDA_MEMCCPY''@/$(GNULIB_MDA_MEMCCPY)/g' \
-e 's/@''GNULIB_MDA_STRDUP''@/$(GNULIB_MDA_STRDUP)/g' \
< $(srcdir)/string.in.h | \
sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \
-e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
-e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
-e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
-e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
-e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
-e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
-e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
@ -2180,8 +2262,12 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
-e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
-e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
-e 's|@''HAVE_STRERRORNAME_NP''@|$(HAVE_STRERRORNAME_NP)|g' \
-e 's|@''HAVE_SIGABBREV_NP''@|$(HAVE_SIGABBREV_NP)|g' \
-e 's|@''HAVE_SIGDESCR_NP''@|$(HAVE_SIGDESCR_NP)|g' \
-e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
-e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
-e 's|@''REPLACE_FFSLL''@|$(REPLACE_FFSLL)|g' \
-e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
-e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
-e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
@ -2195,6 +2281,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
-e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
-e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
-e 's|@''REPLACE_STRERRORNAME_NP''@|$(REPLACE_STRERRORNAME_NP)|g' \
-e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
-e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@ -2224,6 +2311,15 @@ libgnu_a_SOURCES += strnlen1.h strnlen1.c
## end gnulib module strnlen1
## begin gnulib module strstr
EXTRA_DIST += strstr.c
EXTRA_libgnu_a_SOURCES += strstr.c
## end gnulib module strstr
## begin gnulib module strstr-simple
@ -2347,8 +2443,10 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
-e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \
-e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
-e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \
-e 's/@''GNULIB_GETUMASK''@/$(GNULIB_GETUMASK)/g' \
-e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \
-e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \
-e 's/@''GNULIB_MKDIR''@/$(GNULIB_MKDIR)/g' \
-e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \
-e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \
-e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \
@ -2357,9 +2455,13 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
-e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \
-e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \
-e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GNULIB_OVERRIDES_STRUCT_STAT)/g' \
-e 's/@''GNULIB_MDA_CHMOD''@/$(GNULIB_MDA_CHMOD)/g' \
-e 's/@''GNULIB_MDA_MKDIR''@/$(GNULIB_MDA_MKDIR)/g' \
-e 's/@''GNULIB_MDA_UMASK''@/$(GNULIB_MDA_UMASK)/g' \
-e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
-e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
-e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
-e 's|@''HAVE_GETUMASK''@|$(HAVE_GETUMASK)|g' \
-e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \
-e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
-e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \
@ -2375,7 +2477,9 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
-e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
-e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
-e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \
-e 's|@''REPLACE_MKFIFOAT''@|$(REPLACE_MKFIFOAT)|g' \
-e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \
-e 's|@''REPLACE_MKNODAT''@|$(REPLACE_MKNODAT)|g' \
-e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \
-e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@ -2512,15 +2616,17 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's/@''GNULIB_STRFTIME''@/$(GNULIB_STRFTIME)/g' \
-e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
-e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
-e 's/@''GNULIB_TIMESPEC_GET''@/$(GNULIB_TIMESPEC_GET)/g' \
-e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
-e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \
-e 's/@''GNULIB_TZSET''@/$(GNULIB_TZSET)/g' \
-e 's/@''GNULIB_MDA_TZSET''@/$(GNULIB_MDA_TZSET)/g' \
-e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
-e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
-e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
-e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
-e 's|@''HAVE_TIMESPEC_GET''@|$(HAVE_TIMESPEC_GET)|g' \
-e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \
-e 's|@''HAVE_TZSET''@|$(HAVE_TZSET)|g' \
-e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|g' \
-e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \
-e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \
@ -2534,6 +2640,7 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e 's|@''UNISTD_H_DEFINES_STRUCT_TIMESPEC''@|$(UNISTD_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e 's|@''TIME_H_DEFINES_TIME_UTC''@|$(TIME_H_DEFINES_TIME_UTC)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
@ -2582,6 +2689,13 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
-e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
-e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
-e 's/@''GNULIB_EXECL''@/$(GNULIB_EXECL)/g' \
-e 's/@''GNULIB_EXECLE''@/$(GNULIB_EXECLE)/g' \
-e 's/@''GNULIB_EXECLP''@/$(GNULIB_EXECLP)/g' \
-e 's/@''GNULIB_EXECV''@/$(GNULIB_EXECV)/g' \
-e 's/@''GNULIB_EXECVE''@/$(GNULIB_EXECVE)/g' \
-e 's/@''GNULIB_EXECVP''@/$(GNULIB_EXECVP)/g' \
-e 's/@''GNULIB_EXECVPE''@/$(GNULIB_EXECVPE)/g' \
-e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
-e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
-e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
@ -2627,12 +2741,33 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
-e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
-e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
-e 's/@''GNULIB_MDA_ACCESS''@/$(GNULIB_MDA_ACCESS)/g' \
-e 's/@''GNULIB_MDA_CHDIR''@/$(GNULIB_MDA_CHDIR)/g' \
-e 's/@''GNULIB_MDA_CLOSE''@/$(GNULIB_MDA_CLOSE)/g' \
-e 's/@''GNULIB_MDA_DUP''@/$(GNULIB_MDA_DUP)/g' \
-e 's/@''GNULIB_MDA_DUP2''@/$(GNULIB_MDA_DUP2)/g' \
-e 's/@''GNULIB_MDA_EXECL''@/$(GNULIB_MDA_EXECL)/g' \
-e 's/@''GNULIB_MDA_EXECLE''@/$(GNULIB_MDA_EXECLE)/g' \
-e 's/@''GNULIB_MDA_EXECLP''@/$(GNULIB_MDA_EXECLP)/g' \
-e 's/@''GNULIB_MDA_EXECV''@/$(GNULIB_MDA_EXECV)/g' \
-e 's/@''GNULIB_MDA_EXECVE''@/$(GNULIB_MDA_EXECVE)/g' \
-e 's/@''GNULIB_MDA_EXECVP''@/$(GNULIB_MDA_EXECVP)/g' \
-e 's/@''GNULIB_MDA_EXECVPE''@/$(GNULIB_MDA_EXECVPE)/g' \
-e 's/@''GNULIB_MDA_GETCWD''@/$(GNULIB_MDA_GETCWD)/g' \
-e 's/@''GNULIB_MDA_GETPID''@/$(GNULIB_MDA_GETPID)/g' \
-e 's/@''GNULIB_MDA_ISATTY''@/$(GNULIB_MDA_ISATTY)/g' \
-e 's/@''GNULIB_MDA_LSEEK''@/$(GNULIB_MDA_LSEEK)/g' \
-e 's/@''GNULIB_MDA_READ''@/$(GNULIB_MDA_READ)/g' \
-e 's/@''GNULIB_MDA_RMDIR''@/$(GNULIB_MDA_RMDIR)/g' \
-e 's/@''GNULIB_MDA_SWAB''@/$(GNULIB_MDA_SWAB)/g' \
-e 's/@''GNULIB_MDA_UNLINK''@/$(GNULIB_MDA_UNLINK)/g' \
-e 's/@''GNULIB_MDA_WRITE''@/$(GNULIB_MDA_WRITE)/g' \
< $(srcdir)/unistd.in.h | \
sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
-e 's|@''HAVE_COPY_FILE_RANGE''@|$(HAVE_COPY_FILE_RANGE)|g' \
-e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
-e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
-e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
-e 's|@''HAVE_EXECVPE''@|$(HAVE_EXECVPE)|g' \
-e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
-e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \
-e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
@ -2662,6 +2797,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
-e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
-e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
-e 's|@''HAVE_DECL_EXECVPE''@|$(HAVE_DECL_EXECVPE)|g' \
-e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
-e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \
-e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
@ -2680,6 +2816,13 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
-e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
-e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
-e 's|@''REPLACE_EXECL''@|$(REPLACE_EXECL)|g' \
-e 's|@''REPLACE_EXECLE''@|$(REPLACE_EXECLE)|g' \
-e 's|@''REPLACE_EXECLP''@|$(REPLACE_EXECLP)|g' \
-e 's|@''REPLACE_EXECV''@|$(REPLACE_EXECV)|g' \
-e 's|@''REPLACE_EXECVE''@|$(REPLACE_EXECVE)|g' \
-e 's|@''REPLACE_EXECVP''@|$(REPLACE_EXECVP)|g' \
-e 's|@''REPLACE_EXECVPE''@|$(REPLACE_EXECVPE)|g' \
-e 's|@''REPLACE_FACCESSAT''@|$(REPLACE_FACCESSAT)|g' \
-e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
-e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
@ -2814,6 +2957,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \
-e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \
-e 's/@''GNULIB_WCSFTIME''@/$(GNULIB_WCSFTIME)/g' \
-e 's/@''GNULIB_MDA_WCSDUP''@/$(GNULIB_MDA_WCSDUP)/g' \
< $(srcdir)/wchar.in.h | \
sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
-e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
@ -2856,6 +3000,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \
-e 's|@''HAVE_WCSFTIME''@|$(HAVE_WCSFTIME)|g' \
-e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
-e 's|@''HAVE_DECL_WCSDUP''@|$(HAVE_DECL_WCSDUP)|g' \
-e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
| \
sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \

View File

@ -14,7 +14,7 @@
@SET_MAKE@
# Copyright (C) 2002-2020 Free Software Foundation, Inc.
# Copyright (C) 2002-2021 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -178,6 +178,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/import/m4/builtin-expect.m4 \
$(top_srcdir)/import/m4/canonicalize.m4 \
$(top_srcdir)/import/m4/chdir-long.m4 \
$(top_srcdir)/import/m4/clock_time.m4 \
$(top_srcdir)/import/m4/close.m4 \
$(top_srcdir)/import/m4/closedir.m4 \
$(top_srcdir)/import/m4/codeset.m4 \
@ -186,7 +187,6 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/import/m4/d-type.m4 \
$(top_srcdir)/import/m4/dirent_h.m4 \
$(top_srcdir)/import/m4/dirfd.m4 \
$(top_srcdir)/import/m4/dirname.m4 \
$(top_srcdir)/import/m4/double-slash-root.m4 \
$(top_srcdir)/import/m4/dup.m4 $(top_srcdir)/import/m4/dup2.m4 \
$(top_srcdir)/import/m4/eealloc.m4 \
@ -208,6 +208,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/import/m4/fnmatch.m4 \
$(top_srcdir)/import/m4/fnmatch_h.m4 \
$(top_srcdir)/import/m4/fpieee.m4 \
$(top_srcdir)/import/m4/free.m4 \
$(top_srcdir)/import/m4/frexp.m4 \
$(top_srcdir)/import/m4/frexpl.m4 \
$(top_srcdir)/import/m4/fstat.m4 \
@ -228,7 +229,6 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/import/m4/gnulib-comp.m4 \
$(top_srcdir)/import/m4/include_next.m4 \
$(top_srcdir)/import/m4/inet_ntop.m4 \
$(top_srcdir)/import/m4/inttypes-pri.m4 \
$(top_srcdir)/import/m4/inttypes.m4 \
$(top_srcdir)/import/m4/isblank.m4 \
$(top_srcdir)/import/m4/isnand.m4 \
@ -240,7 +240,6 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/import/m4/locale-ja.m4 \
$(top_srcdir)/import/m4/locale-zh.m4 \
$(top_srcdir)/import/m4/locale_h.m4 \
$(top_srcdir)/import/m4/localtime-buffer.m4 \
$(top_srcdir)/import/m4/lock.m4 \
$(top_srcdir)/import/m4/lstat.m4 \
$(top_srcdir)/import/m4/malloc.m4 \
@ -273,6 +272,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/import/m4/openat.m4 \
$(top_srcdir)/import/m4/opendir.m4 \
$(top_srcdir)/import/m4/pathmax.m4 \
$(top_srcdir)/import/m4/pid_t.m4 \
$(top_srcdir)/import/m4/pipe.m4 \
$(top_srcdir)/import/m4/pthread_rwlock_rdlock.m4 \
$(top_srcdir)/import/m4/rawmemchr.m4 \
$(top_srcdir)/import/m4/readdir.m4 \
@ -341,15 +342,16 @@ am__v_AR_1 =
libgnu_a_AR = $(AR) $(ARFLAGS)
am__DEPENDENCIES_1 =
am__dirstamp = $(am__leading_dot)dirstamp
am_libgnu_a_OBJECTS = openat-proc.$(OBJEXT) cloexec.$(OBJEXT) \
count-one-bits.$(OBJEXT) dirname-lgpl.$(OBJEXT) \
basename-lgpl.$(OBJEXT) stripslash.$(OBJEXT) \
exitfail.$(OBJEXT) fd-hook.$(OBJEXT) fd-safer-flag.$(OBJEXT) \
am_libgnu_a_OBJECTS = openat-proc.$(OBJEXT) basename-lgpl.$(OBJEXT) \
cloexec.$(OBJEXT) count-one-bits.$(OBJEXT) \
dirname-lgpl.$(OBJEXT) stripslash.$(OBJEXT) exitfail.$(OBJEXT) \
fd-hook.$(OBJEXT) fd-safer-flag.$(OBJEXT) \
dup-safer-flag.$(OBJEXT) filenamecat-lgpl.$(OBJEXT) \
getprogname.$(OBJEXT) hard-locale.$(OBJEXT) \
localcharset.$(OBJEXT) glthread/lock.$(OBJEXT) \
malloca.$(OBJEXT) math.$(OBJEXT) openat-die.$(OBJEXT) \
save-cwd.$(OBJEXT) malloc/scratch_buffer_grow.$(OBJEXT) \
save-cwd.$(OBJEXT) malloc/scratch_buffer_dupfree.$(OBJEXT) \
malloc/scratch_buffer_grow.$(OBJEXT) \
malloc/scratch_buffer_grow_preserve.$(OBJEXT) \
malloc/scratch_buffer_set_array_size.$(OBJEXT) \
setlocale_null.$(OBJEXT) stat-time.$(OBJEXT) \
@ -477,6 +479,7 @@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@
GNULIB_ACCESS = @GNULIB_ACCESS@
GNULIB_ACOSF = @GNULIB_ACOSF@
GNULIB_ACOSL = @GNULIB_ACOSL@
GNULIB_ALIGNED_ALLOC = @GNULIB_ALIGNED_ALLOC@
GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
GNULIB_ASINF = @GNULIB_ASINF@
GNULIB_ASINL = @GNULIB_ASINL@
@ -516,6 +519,13 @@ GNULIB_DUP3 = @GNULIB_DUP3@
GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
GNULIB_ENVIRON = @GNULIB_ENVIRON@
GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
GNULIB_EXECL = @GNULIB_EXECL@
GNULIB_EXECLE = @GNULIB_EXECLE@
GNULIB_EXECLP = @GNULIB_EXECLP@
GNULIB_EXECV = @GNULIB_EXECV@
GNULIB_EXECVE = @GNULIB_EXECVE@
GNULIB_EXECVP = @GNULIB_EXECVP@
GNULIB_EXECVPE = @GNULIB_EXECVPE@
GNULIB_EXP2 = @GNULIB_EXP2@
GNULIB_EXP2F = @GNULIB_EXP2F@
GNULIB_EXP2L = @GNULIB_EXP2L@
@ -558,6 +568,7 @@ GNULIB_FPURGE = @GNULIB_FPURGE@
GNULIB_FPUTC = @GNULIB_FPUTC@
GNULIB_FPUTS = @GNULIB_FPUTS@
GNULIB_FREAD = @GNULIB_FREAD@
GNULIB_FREE_POSIX = @GNULIB_FREE_POSIX@
GNULIB_FREOPEN = @GNULIB_FREOPEN@
GNULIB_FREXP = @GNULIB_FREXP@
GNULIB_FREXPF = @GNULIB_FREXPF@
@ -595,6 +606,7 @@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@
GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@
GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
GNULIB_GETUMASK = @GNULIB_GETUMASK@
GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
GNULIB_GLOB = @GNULIB_GLOB@
GNULIB_GRANTPT = @GNULIB_GRANTPT@
@ -669,10 +681,58 @@ GNULIB_MBSSPN = @GNULIB_MBSSPN@
GNULIB_MBSSTR = @GNULIB_MBSSTR@
GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
GNULIB_MBTOWC = @GNULIB_MBTOWC@
GNULIB_MDA_ACCESS = @GNULIB_MDA_ACCESS@
GNULIB_MDA_CHDIR = @GNULIB_MDA_CHDIR@
GNULIB_MDA_CHMOD = @GNULIB_MDA_CHMOD@
GNULIB_MDA_CLOSE = @GNULIB_MDA_CLOSE@
GNULIB_MDA_CREAT = @GNULIB_MDA_CREAT@
GNULIB_MDA_DUP = @GNULIB_MDA_DUP@
GNULIB_MDA_DUP2 = @GNULIB_MDA_DUP2@
GNULIB_MDA_ECVT = @GNULIB_MDA_ECVT@
GNULIB_MDA_EXECL = @GNULIB_MDA_EXECL@
GNULIB_MDA_EXECLE = @GNULIB_MDA_EXECLE@
GNULIB_MDA_EXECLP = @GNULIB_MDA_EXECLP@
GNULIB_MDA_EXECV = @GNULIB_MDA_EXECV@
GNULIB_MDA_EXECVE = @GNULIB_MDA_EXECVE@
GNULIB_MDA_EXECVP = @GNULIB_MDA_EXECVP@
GNULIB_MDA_EXECVPE = @GNULIB_MDA_EXECVPE@
GNULIB_MDA_FCLOSEALL = @GNULIB_MDA_FCLOSEALL@
GNULIB_MDA_FCVT = @GNULIB_MDA_FCVT@
GNULIB_MDA_FDOPEN = @GNULIB_MDA_FDOPEN@
GNULIB_MDA_FILENO = @GNULIB_MDA_FILENO@
GNULIB_MDA_GCVT = @GNULIB_MDA_GCVT@
GNULIB_MDA_GETCWD = @GNULIB_MDA_GETCWD@
GNULIB_MDA_GETPID = @GNULIB_MDA_GETPID@
GNULIB_MDA_GETW = @GNULIB_MDA_GETW@
GNULIB_MDA_ISATTY = @GNULIB_MDA_ISATTY@
GNULIB_MDA_J0 = @GNULIB_MDA_J0@
GNULIB_MDA_J1 = @GNULIB_MDA_J1@
GNULIB_MDA_JN = @GNULIB_MDA_JN@
GNULIB_MDA_LSEEK = @GNULIB_MDA_LSEEK@
GNULIB_MDA_MEMCCPY = @GNULIB_MDA_MEMCCPY@
GNULIB_MDA_MKDIR = @GNULIB_MDA_MKDIR@
GNULIB_MDA_MKTEMP = @GNULIB_MDA_MKTEMP@
GNULIB_MDA_OPEN = @GNULIB_MDA_OPEN@
GNULIB_MDA_PUTENV = @GNULIB_MDA_PUTENV@
GNULIB_MDA_PUTW = @GNULIB_MDA_PUTW@
GNULIB_MDA_READ = @GNULIB_MDA_READ@
GNULIB_MDA_RMDIR = @GNULIB_MDA_RMDIR@
GNULIB_MDA_STRDUP = @GNULIB_MDA_STRDUP@
GNULIB_MDA_SWAB = @GNULIB_MDA_SWAB@
GNULIB_MDA_TEMPNAM = @GNULIB_MDA_TEMPNAM@
GNULIB_MDA_TZSET = @GNULIB_MDA_TZSET@
GNULIB_MDA_UMASK = @GNULIB_MDA_UMASK@
GNULIB_MDA_UNLINK = @GNULIB_MDA_UNLINK@
GNULIB_MDA_WCSDUP = @GNULIB_MDA_WCSDUP@
GNULIB_MDA_WRITE = @GNULIB_MDA_WRITE@
GNULIB_MDA_Y0 = @GNULIB_MDA_Y0@
GNULIB_MDA_Y1 = @GNULIB_MDA_Y1@
GNULIB_MDA_YN = @GNULIB_MDA_YN@
GNULIB_MEMCHR = @GNULIB_MEMCHR@
GNULIB_MEMMEM = @GNULIB_MEMMEM@
GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
GNULIB_MKDIR = @GNULIB_MKDIR@
GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
GNULIB_MKFIFO = @GNULIB_MKFIFO@
@ -701,6 +761,7 @@ GNULIB_PERROR = @GNULIB_PERROR@
GNULIB_PIPE = @GNULIB_PIPE@
GNULIB_PIPE2 = @GNULIB_PIPE2@
GNULIB_POPEN = @GNULIB_POPEN@
GNULIB_POSIX_MEMALIGN = @GNULIB_POSIX_MEMALIGN@
GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
GNULIB_POWF = @GNULIB_POWF@
GNULIB_PREAD = @GNULIB_PREAD@
@ -754,7 +815,9 @@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
GNULIB_SETLOCALE_NULL = @GNULIB_SETLOCALE_NULL@
GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@
GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@
GNULIB_SIGABBREV_NP = @GNULIB_SIGABBREV_NP@
GNULIB_SIGACTION = @GNULIB_SIGACTION@
GNULIB_SIGDESCR_NP = @GNULIB_SIGDESCR_NP@
GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
@ -776,6 +839,7 @@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
GNULIB_STRDUP = @GNULIB_STRDUP@
GNULIB_STRERROR = @GNULIB_STRERROR@
GNULIB_STRERRORNAME_NP = @GNULIB_STRERRORNAME_NP@
GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
GNULIB_STRFTIME = @GNULIB_STRFTIME@
GNULIB_STRNCAT = @GNULIB_STRNCAT@
@ -801,6 +865,7 @@ GNULIB_TANF = @GNULIB_TANF@
GNULIB_TANHF = @GNULIB_TANHF@
GNULIB_TANL = @GNULIB_TANL@
GNULIB_TIMEGM = @GNULIB_TIMEGM@
GNULIB_TIMESPEC_GET = @GNULIB_TIMESPEC_GET@
GNULIB_TIME_R = @GNULIB_TIME_R@
GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
GNULIB_TMPFILE = @GNULIB_TMPFILE@
@ -873,6 +938,7 @@ GREP = @GREP@
HAVE_ACCEPT4 = @HAVE_ACCEPT4@
HAVE_ACOSF = @HAVE_ACOSF@
HAVE_ACOSL = @HAVE_ACOSL@
HAVE_ALIGNED_ALLOC = @HAVE_ALIGNED_ALLOC@
HAVE_ALLOCA_H = @HAVE_ALLOCA_H@
HAVE_ALPHASORT = @HAVE_ALPHASORT@
HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@
@ -907,13 +973,17 @@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@
HAVE_DECL_COSL = @HAVE_DECL_COSL@
HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
HAVE_DECL_ECVT = @HAVE_DECL_ECVT@
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
HAVE_DECL_EXECVPE = @HAVE_DECL_EXECVPE@
HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@
HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@
HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@
HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@
HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
HAVE_DECL_FCLOSEALL = @HAVE_DECL_FCLOSEALL@
HAVE_DECL_FCVT = @HAVE_DECL_FCVT@
HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@
HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@
@ -922,6 +992,7 @@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@
HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@
HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@
HAVE_DECL_GCVT = @HAVE_DECL_GCVT@
HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
@ -974,14 +1045,15 @@ HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@
HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
HAVE_DECL_WCSDUP = @HAVE_DECL_WCSDUP@
HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
HAVE_DIRENT_H = @HAVE_DIRENT_H@
HAVE_DPRINTF = @HAVE_DPRINTF@
HAVE_DUP2 = @HAVE_DUP2@
HAVE_DUP3 = @HAVE_DUP3@
HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
HAVE_EXECVPE = @HAVE_EXECVPE@
HAVE_EXPF = @HAVE_EXPF@
HAVE_EXPL = @HAVE_EXPL@
HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
@ -1024,6 +1096,7 @@ HAVE_GETPASS = @HAVE_GETPASS@
HAVE_GETRANDOM = @HAVE_GETRANDOM@
HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
HAVE_GETUMASK = @HAVE_GETUMASK@
HAVE_GLOB = @HAVE_GLOB@
HAVE_GLOB_H = @HAVE_GLOB_H@
HAVE_GLOB_PATTERN_P = @HAVE_GLOB_PATTERN_P@
@ -1066,7 +1139,6 @@ HAVE_MBSLEN = @HAVE_MBSLEN@
HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
HAVE_MBTOWC = @HAVE_MBTOWC@
HAVE_MEMCHR = @HAVE_MEMCHR@
HAVE_MEMPCPY = @HAVE_MEMPCPY@
HAVE_MKDIRAT = @HAVE_MKDIRAT@
HAVE_MKDTEMP = @HAVE_MKDTEMP@
@ -1091,6 +1163,7 @@ HAVE_PCLOSE = @HAVE_PCLOSE@
HAVE_PIPE = @HAVE_PIPE@
HAVE_PIPE2 = @HAVE_PIPE2@
HAVE_POPEN = @HAVE_POPEN@
HAVE_POSIX_MEMALIGN = @HAVE_POSIX_MEMALIGN@
HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
HAVE_POWF = @HAVE_POWF@
@ -1124,7 +1197,9 @@ HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
HAVE_SETENV = @HAVE_SETENV@
HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
HAVE_SETSTATE = @HAVE_SETSTATE@
HAVE_SIGABBREV_NP = @HAVE_SIGABBREV_NP@
HAVE_SIGACTION = @HAVE_SIGACTION@
HAVE_SIGDESCR_NP = @HAVE_SIGDESCR_NP@
HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
@ -1142,6 +1217,7 @@ HAVE_STPCPY = @HAVE_STPCPY@
HAVE_STPNCPY = @HAVE_STPNCPY@
HAVE_STRCASESTR = @HAVE_STRCASESTR@
HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
HAVE_STRERRORNAME_NP = @HAVE_STRERRORNAME_NP@
HAVE_STRPBRK = @HAVE_STRPBRK@
HAVE_STRPTIME = @HAVE_STRPTIME@
HAVE_STRSEP = @HAVE_STRSEP@
@ -1170,9 +1246,9 @@ HAVE_TANF = @HAVE_TANF@
HAVE_TANHF = @HAVE_TANHF@
HAVE_TANL = @HAVE_TANL@
HAVE_TIMEGM = @HAVE_TIMEGM@
HAVE_TIMESPEC_GET = @HAVE_TIMESPEC_GET@
HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
HAVE_TZSET = @HAVE_TZSET@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_UNLINKAT = @HAVE_UNLINKAT@
HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
@ -1247,6 +1323,7 @@ LIBPTHREAD = @LIBPTHREAD@
LIBS = @LIBS@
LIBSTDTHREAD = @LIBSTDTHREAD@
LIBTHREAD = @LIBTHREAD@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_GETLOGIN = @LIB_GETLOGIN@
LIB_GETRANDOM = @LIB_GETRANDOM@
LIB_HARD_LOCALE = @LIB_HARD_LOCALE@
@ -1338,12 +1415,12 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
PRIPTR_PREFIX = @PRIPTR_PREFIX@
PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
REPLACE_ACCESS = @REPLACE_ACCESS@
REPLACE_ACOSF = @REPLACE_ACOSF@
REPLACE_ALIGNED_ALLOC = @REPLACE_ALIGNED_ALLOC@
REPLACE_ASINF = @REPLACE_ASINF@
REPLACE_ATAN2F = @REPLACE_ATAN2F@
REPLACE_ATANF = @REPLACE_ATANF@
@ -1367,6 +1444,13 @@ REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
REPLACE_EXECL = @REPLACE_EXECL@
REPLACE_EXECLE = @REPLACE_EXECLE@
REPLACE_EXECLP = @REPLACE_EXECLP@
REPLACE_EXECV = @REPLACE_EXECV@
REPLACE_EXECVE = @REPLACE_EXECVE@
REPLACE_EXECVP = @REPLACE_EXECVP@
REPLACE_EXECVPE = @REPLACE_EXECVPE@
REPLACE_EXP2 = @REPLACE_EXP2@
REPLACE_EXP2L = @REPLACE_EXP2L@
REPLACE_EXPF = @REPLACE_EXPF@
@ -1383,6 +1467,7 @@ REPLACE_FCNTL = @REPLACE_FCNTL@
REPLACE_FDOPEN = @REPLACE_FDOPEN@
REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
REPLACE_FFLUSH = @REPLACE_FFLUSH@
REPLACE_FFSLL = @REPLACE_FFSLL@
REPLACE_FLOOR = @REPLACE_FLOOR@
REPLACE_FLOORF = @REPLACE_FLOORF@
REPLACE_FLOORL = @REPLACE_FLOORL@
@ -1396,6 +1481,7 @@ REPLACE_FNMATCH = @REPLACE_FNMATCH@
REPLACE_FOPEN = @REPLACE_FOPEN@
REPLACE_FPRINTF = @REPLACE_FPRINTF@
REPLACE_FPURGE = @REPLACE_FPURGE@
REPLACE_FREE = @REPLACE_FREE@
REPLACE_FREELOCALE = @REPLACE_FREELOCALE@
REPLACE_FREOPEN = @REPLACE_FREOPEN@
REPLACE_FREXP = @REPLACE_FREXP@
@ -1478,7 +1564,9 @@ REPLACE_MEMCHR = @REPLACE_MEMCHR@
REPLACE_MEMMEM = @REPLACE_MEMMEM@
REPLACE_MKDIR = @REPLACE_MKDIR@
REPLACE_MKFIFO = @REPLACE_MKFIFO@
REPLACE_MKFIFOAT = @REPLACE_MKFIFOAT@
REPLACE_MKNOD = @REPLACE_MKNOD@
REPLACE_MKNODAT = @REPLACE_MKNODAT@
REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
REPLACE_MKTIME = @REPLACE_MKTIME@
REPLACE_MODF = @REPLACE_MODF@
@ -1494,6 +1582,7 @@ REPLACE_OPENAT = @REPLACE_OPENAT@
REPLACE_OPENDIR = @REPLACE_OPENDIR@
REPLACE_PERROR = @REPLACE_PERROR@
REPLACE_POPEN = @REPLACE_POPEN@
REPLACE_POSIX_MEMALIGN = @REPLACE_POSIX_MEMALIGN@
REPLACE_PREAD = @REPLACE_PREAD@
REPLACE_PRINTF = @REPLACE_PRINTF@
REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
@ -1525,7 +1614,7 @@ REPLACE_SETENV = @REPLACE_SETENV@
REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
REPLACE_SETSTATE = @REPLACE_SETSTATE@
REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
REPLACE_SIGNBIT_USING_BUILTINS = @REPLACE_SIGNBIT_USING_BUILTINS@
REPLACE_SINF = @REPLACE_SINF@
REPLACE_SINHF = @REPLACE_SINHF@
REPLACE_SLEEP = @REPLACE_SLEEP@
@ -1541,6 +1630,7 @@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
REPLACE_STRDUP = @REPLACE_STRDUP@
REPLACE_STRERROR = @REPLACE_STRERROR@
REPLACE_STRERRORNAME_NP = @REPLACE_STRERRORNAME_NP@
REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
REPLACE_STRFTIME = @REPLACE_STRFTIME@
REPLACE_STRNCAT = @REPLACE_STRNCAT@
@ -1600,6 +1690,7 @@ STDINT_H = @STDINT_H@
STRIP = @STRIP@
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
TIME_H_DEFINES_TIME_UTC = @TIME_H_DEFINES_TIME_UTC@
UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
@ -1680,40 +1771,41 @@ noinst_LIBRARIES = libgnu.a
noinst_LTLIBRARIES =
# No GNU Make output.
EXTRA_DIST = m4/gnulib-cache.m4 alloca.c alloca.in.h arpa_inet.in.h \
assure.h attribute.h btowc.c canonicalize-lgpl.c chdir-long.c \
chdir-long.h cloexec.h close.c closedir.c dirent-private.h \
count-one-bits.h ctype.in.h dirent.in.h dirfd.c dirname.h \
dup.c dup2.c errno.in.h error.c error.h exitfail.h fchdir.c \
fcntl.c fcntl.in.h fd-hook.h fdopendir.c filename.h \
assure.h attribute.h basename-lgpl.h btowc.c \
canonicalize-lgpl.c chdir-long.c chdir-long.h cloexec.h \
close.c closedir.c dirent-private.h count-one-bits.h \
ctype.in.h dirent.in.h dirfd.c dirname.h dup.c dup2.c \
eloop-threshold.h errno.in.h error.c error.h exitfail.h \
fchdir.c fcntl.c fcntl.in.h fd-hook.h fdopendir.c filename.h \
filenamecat.h flexmember.h float.c float.in.h itold.c \
fnmatch.c fnmatch_loop.c fnmatch.in.h fpucw.h frexp.c frexp.c \
frexpl.c fstat.c stat-w32.c stat-w32.h at-func.c fstatat.c \
getcwd.c getcwd-lgpl.c getdtablesize.c getlogin_r.c \
getrandom.c gettimeofday.c glob.c glob_internal.h \
fnmatch.c fnmatch_loop.c fnmatch.c fnmatch.in.h fpucw.h free.c \
frexp.c frexp.c frexpl.c fstat.c stat-w32.c stat-w32.h \
at-func.c fstatat.c getcwd.c getcwd-lgpl.c getdtablesize.c \
getlogin_r.c getrandom.c gettimeofday.c glob.c glob_internal.h \
glob_pattern_p.c globfree.c glob-libc.h glob.in.h \
hard-locale.h inet_ntop.c intprops.h inttypes.in.h isblank.c \
float+.h isnan.c isnand-nolibm.h isnand.c float+.h isnan.c \
isnanl-nolibm.h isnanl.c cdefs.h libc-config.h limits.in.h \
localcharset.h locale.in.h localtime-buffer.c \
localtime-buffer.h lstat.c malloc.c malloca.h math.in.h \
lc-charset-dispatch.c lc-charset-dispatch.h \
localcharset.h locale.in.h lstat.c malloc.c malloca.h \
math.in.h lc-charset-dispatch.c lc-charset-dispatch.h \
mbrtowc-impl-utf8.h mbrtowc-impl.h mbrtowc.c mbtowc-lock.c \
mbtowc-lock.h windows-initguard.h mbsinit.c mbsrtowcs-impl.h \
mbsrtowcs-state.c mbsrtowcs.c mbtowc-impl.h mbtowc.c memchr.c \
memchr.valgrind memmem.c str-two-way.h mempcpy.c memrchr.c \
mkdir.c mkdtemp.c mkostemp.c msvc-inval.c msvc-inval.h \
msvc-nothrow.c msvc-nothrow.h netinet_in.in.h open.c openat.c \
openat.h dirent-private.h opendir.c pathmax.h rawmemchr.c \
rawmemchr.valgrind dirent-private.h readdir.c readlink.c \
realloc.c rename.c dirent-private.h rewinddir.c rmdir.c \
same-inode.h save-cwd.h malloc/scratch_buffer.h \
scratch_buffer.h setenv.c setlocale-lock.c setlocale_null.h \
windows-initguard.h signal.in.h _Noreturn.h arg-nonnull.h \
c++defs.h warn-on-use.h stat-w32.c stat-w32.h stat.c \
stat-time.h stdalign.in.h stdbool.in.h stddef.in.h stdint.in.h \
stdio.in.h stdlib.in.h strchrnul.c strchrnul.valgrind strdup.c \
streq.h strerror.c strerror-override.c strerror-override.h \
strerror_r.c string.in.h strnlen.c str-two-way.h strstr.c \
memchr.valgrind memmem.c memmem.c str-two-way.h mempcpy.c \
memrchr.c mkdir.c mkdtemp.c mkostemp.c msvc-inval.c \
msvc-inval.h msvc-nothrow.c msvc-nothrow.h netinet_in.in.h \
open.c openat.c openat.h dirent-private.h opendir.c pathmax.h \
pipe.c rawmemchr.c rawmemchr.valgrind dirent-private.h \
readdir.c readlink.c realloc.c rename.c dirent-private.h \
rewinddir.c rmdir.c same-inode.h save-cwd.h \
malloc/scratch_buffer.h scratch_buffer.h setenv.c \
setlocale-lock.c setlocale_null.h windows-initguard.h \
signal.in.h _Noreturn.h arg-nonnull.h c++defs.h warn-on-use.h \
stat-w32.c stat-w32.h stat.c stat-time.h stdalign.in.h \
stdbool.in.h stddef.in.h stdint.in.h stdio.in.h stdlib.in.h \
strchrnul.c strchrnul.valgrind strdup.c streq.h strerror.c \
strerror-override.c strerror-override.h strerror_r.c \
string.in.h strnlen.c strstr.c str-two-way.h strstr.c \
strtok_r.c sys_random.in.h sys_socket.in.h sys_stat.in.h \
sys_time.in.h sys_types.in.h sys_uio.in.h tempname.h time.in.h \
time_r.c unistd.in.h unistd--.h unistd-safer.h unsetenv.c \
@ -1749,12 +1841,13 @@ DISTCLEANFILES =
MAINTAINERCLEANFILES =
AM_CPPFLAGS =
AM_CFLAGS =
libgnu_a_SOURCES = openat-priv.h openat-proc.c cloexec.c \
count-one-bits.c dirname-lgpl.c basename-lgpl.c stripslash.c \
libgnu_a_SOURCES = openat-priv.h openat-proc.c basename-lgpl.c \
cloexec.c count-one-bits.c dirname-lgpl.c stripslash.c \
exitfail.c fd-hook.c fd-safer-flag.c dup-safer-flag.c \
filenamecat-lgpl.c getprogname.h getprogname.c gettext.h \
hard-locale.c localcharset.c glthread/lock.h glthread/lock.c \
malloca.c math.c minmax.h openat-die.c save-cwd.c \
hard-locale.c idx.h localcharset.c glthread/lock.h \
glthread/lock.c malloca.c math.c minmax.h openat-die.c \
save-cwd.c malloc/scratch_buffer_dupfree.c \
malloc/scratch_buffer_grow.c \
malloc/scratch_buffer_grow_preserve.c \
malloc/scratch_buffer_set_array_size.c setlocale_null.c \
@ -1766,25 +1859,26 @@ libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) @ALLOCA@
EXTRA_libgnu_a_SOURCES = alloca.c btowc.c canonicalize-lgpl.c \
chdir-long.c close.c closedir.c dirfd.c dup.c dup2.c error.c \
fchdir.c fcntl.c fdopendir.c float.c itold.c fnmatch.c \
fnmatch_loop.c frexp.c frexp.c frexpl.c fstat.c stat-w32.c \
at-func.c fstatat.c getcwd.c getcwd-lgpl.c getdtablesize.c \
getlogin_r.c getrandom.c gettimeofday.c glob.c \
fnmatch_loop.c fnmatch.c free.c frexp.c frexp.c frexpl.c \
fstat.c stat-w32.c at-func.c fstatat.c getcwd.c getcwd-lgpl.c \
getdtablesize.c getlogin_r.c getrandom.c gettimeofday.c glob.c \
glob_pattern_p.c globfree.c inet_ntop.c isblank.c isnan.c \
isnand.c isnan.c isnanl.c localtime-buffer.c lstat.c malloc.c \
isnand.c isnan.c isnanl.c lstat.c malloc.c \
lc-charset-dispatch.c mbrtowc.c mbtowc-lock.c mbsinit.c \
mbsrtowcs-state.c mbsrtowcs.c mbtowc.c memchr.c memmem.c \
mempcpy.c memrchr.c mkdir.c mkdtemp.c mkostemp.c msvc-inval.c \
msvc-nothrow.c open.c openat.c opendir.c rawmemchr.c readdir.c \
readlink.c realloc.c rename.c rewinddir.c rmdir.c setenv.c \
setlocale-lock.c stat-w32.c stat.c strchrnul.c strdup.c \
strerror.c strerror-override.c strerror_r.c strnlen.c strstr.c \
strtok_r.c time_r.c unsetenv.c windows-mutex.c windows-once.c \
windows-recmutex.c windows-rwlock.c wmemchr.c wmempcpy.c
memmem.c mempcpy.c memrchr.c mkdir.c mkdtemp.c mkostemp.c \
msvc-inval.c msvc-nothrow.c open.c openat.c opendir.c pipe.c \
rawmemchr.c readdir.c readlink.c realloc.c rename.c \
rewinddir.c rmdir.c setenv.c setlocale-lock.c stat-w32.c \
stat.c strchrnul.c strdup.c strerror.c strerror-override.c \
strerror_r.c strnlen.c strstr.c strstr.c strtok_r.c time_r.c \
unsetenv.c windows-mutex.c windows-once.c windows-recmutex.c \
windows-rwlock.c wmemchr.c wmempcpy.c
# Use this preprocessor expression to decide whether #include_next works.
# Do not rely on a 'configure'-time test for this, since the expression
# might appear in an installed header, which is used by some other compiler.
HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
HAVE_INCLUDE_NEXT = (__GNUC__ || __clang__ || 60000000 <= __DECC_VER)
# Because this Makefile snippet defines a variable used by other
# gnulib Makefile snippets, it must be present in all makefiles that
@ -1856,6 +1950,8 @@ malloc/$(am__dirstamp):
malloc/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) malloc/$(DEPDIR)
@: > malloc/$(DEPDIR)/$(am__dirstamp)
malloc/scratch_buffer_dupfree.$(OBJEXT): malloc/$(am__dirstamp) \
malloc/$(DEPDIR)/$(am__dirstamp)
malloc/scratch_buffer_grow.$(OBJEXT): malloc/$(am__dirstamp) \
malloc/$(DEPDIR)/$(am__dirstamp)
malloc/scratch_buffer_grow_preserve.$(OBJEXT): malloc/$(am__dirstamp) \
@ -1917,6 +2013,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch_loop.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/free.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frexp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frexpl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstat.Po@am__quote@
@ -1940,7 +2037,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itold.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lc-charset-dispatch.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localtime-buffer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloca.Po@am__quote@
@ -1966,6 +2062,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendir.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe-safer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawmemchr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readdir.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@
@ -2004,6 +2101,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wmempcpy.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/lock.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/threadlib.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/scratch_buffer_dupfree.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/scratch_buffer_grow.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/scratch_buffer_grow_preserve.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/scratch_buffer_set_array_size.Po@am__quote@
@ -2391,6 +2489,8 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \
-e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \
-e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \
-e 's/@''GNULIB_MDA_CREAT''@/$(GNULIB_MDA_CREAT)/g' \
-e 's/@''GNULIB_MDA_OPEN''@/$(GNULIB_MDA_OPEN)/g' \
-e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \
-e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
-e 's|@''REPLACE_CREAT''@|$(REPLACE_CREAT)|g' \
@ -2477,7 +2577,6 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \
-e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
-e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
-e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
-e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
@ -2656,6 +2755,12 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's/@''GNULIB_TRUNC''@/$(GNULIB_TRUNC)/g' \
-e 's/@''GNULIB_TRUNCF''@/$(GNULIB_TRUNCF)/g' \
-e 's/@''GNULIB_TRUNCL''@/$(GNULIB_TRUNCL)/g' \
-e 's/@''GNULIB_MDA_J0''@/$(GNULIB_MDA_J0)/g' \
-e 's/@''GNULIB_MDA_J1''@/$(GNULIB_MDA_J1)/g' \
-e 's/@''GNULIB_MDA_JN''@/$(GNULIB_MDA_JN)/g' \
-e 's/@''GNULIB_MDA_Y0''@/$(GNULIB_MDA_Y0)/g' \
-e 's/@''GNULIB_MDA_Y1''@/$(GNULIB_MDA_Y1)/g' \
-e 's/@''GNULIB_MDA_YN''@/$(GNULIB_MDA_YN)/g' \
| \
sed -e 's|@''HAVE_ACOSF''@|$(HAVE_ACOSF)|g' \
-e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \
@ -2824,7 +2929,7 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''REPLACE_ROUNDF''@|$(REPLACE_ROUNDF)|g' \
-e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \
-e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \
-e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \
-e 's|@''REPLACE_SIGNBIT_USING_BUILTINS''@|$(REPLACE_SIGNBIT_USING_BUILTINS)|g' \
-e 's|@''REPLACE_SINF''@|$(REPLACE_SINF)|g' \
-e 's|@''REPLACE_SINHF''@|$(REPLACE_SINHF)|g' \
-e 's|@''REPLACE_SQRTF''@|$(REPLACE_SQRTF)|g' \
@ -3033,8 +3138,15 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \
-e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \
-e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \
-e 's/@''GNULIB_MDA_FCLOSEALL''@/$(GNULIB_MDA_FCLOSEALL)/g' \
-e 's/@''GNULIB_MDA_FDOPEN''@/$(GNULIB_MDA_FDOPEN)/g' \
-e 's/@''GNULIB_MDA_FILENO''@/$(GNULIB_MDA_FILENO)/g' \
-e 's/@''GNULIB_MDA_GETW''@/$(GNULIB_MDA_GETW)/g' \
-e 's/@''GNULIB_MDA_PUTW''@/$(GNULIB_MDA_PUTW)/g' \
-e 's/@''GNULIB_MDA_TEMPNAM''@/$(GNULIB_MDA_TEMPNAM)/g' \
< $(srcdir)/stdio.in.h | \
sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
sed -e 's|@''HAVE_DECL_FCLOSEALL''@|$(HAVE_DECL_FCLOSEALL)|g' \
-e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
-e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \
-e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \
-e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
@ -3101,9 +3213,11 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
-e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \
-e 's/@''GNULIB_ALIGNED_ALLOC''@/$(GNULIB_ALIGNED_ALLOC)/g' \
-e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \
-e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \
-e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \
-e 's/@''GNULIB_FREE_POSIX''@/$(GNULIB_FREE_POSIX)/g' \
-e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \
-e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \
-e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \
@ -3114,6 +3228,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \
-e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \
-e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
-e 's/@''GNULIB_POSIX_MEMALIGN''@/$(GNULIB_POSIX_MEMALIGN)/g' \
-e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \
-e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
-e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
@ -3135,10 +3250,19 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
-e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
-e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
-e 's/@''GNULIB_MDA_ECVT''@/$(GNULIB_MDA_ECVT)/g' \
-e 's/@''GNULIB_MDA_FCVT''@/$(GNULIB_MDA_FCVT)/g' \
-e 's/@''GNULIB_MDA_GCVT''@/$(GNULIB_MDA_GCVT)/g' \
-e 's/@''GNULIB_MDA_MKTEMP''@/$(GNULIB_MDA_MKTEMP)/g' \
-e 's/@''GNULIB_MDA_PUTENV''@/$(GNULIB_MDA_PUTENV)/g' \
< $(srcdir)/stdlib.in.h | \
sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
-e 's|@''HAVE_ALIGNED_ALLOC''@|$(HAVE_ALIGNED_ALLOC)|g' \
-e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
-e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
-e 's|@''HAVE_DECL_ECVT''@|$(HAVE_DECL_ECVT)|g' \
-e 's|@''HAVE_DECL_FCVT''@|$(HAVE_DECL_FCVT)|g' \
-e 's|@''HAVE_DECL_GCVT''@|$(HAVE_DECL_GCVT)|g' \
-e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
-e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
-e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
@ -3150,6 +3274,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
-e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \
-e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
-e 's|@''HAVE_POSIX_MEMALIGN''@|$(HAVE_POSIX_MEMALIGN)|g' \
-e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
-e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
-e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
@ -3172,12 +3297,15 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
-e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
-e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \
-e 's|@''REPLACE_ALIGNED_ALLOC''@|$(REPLACE_ALIGNED_ALLOC)|g' \
-e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \
-e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
-e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
-e 's|@''REPLACE_INITSTATE''@|$(REPLACE_INITSTATE)|g' \
-e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
-e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
-e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
-e 's|@''REPLACE_POSIX_MEMALIGN''@|$(REPLACE_POSIX_MEMALIGN)|g' \
-e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
-e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
-e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
@ -3245,14 +3373,18 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \
-e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \
-e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
-e 's/@''GNULIB_STRERRORNAME_NP''@/$(GNULIB_STRERRORNAME_NP)/g' \
-e 's/@''GNULIB_SIGABBREV_NP''@/$(GNULIB_SIGABBREV_NP)/g' \
-e 's/@''GNULIB_SIGDESCR_NP''@/$(GNULIB_SIGDESCR_NP)/g' \
-e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
-e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
-e 's/@''GNULIB_MDA_MEMCCPY''@/$(GNULIB_MDA_MEMCCPY)/g' \
-e 's/@''GNULIB_MDA_STRDUP''@/$(GNULIB_MDA_STRDUP)/g' \
< $(srcdir)/string.in.h | \
sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \
-e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
-e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
-e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
-e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
-e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
-e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
-e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
@ -3268,8 +3400,12 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
-e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
-e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
-e 's|@''HAVE_STRERRORNAME_NP''@|$(HAVE_STRERRORNAME_NP)|g' \
-e 's|@''HAVE_SIGABBREV_NP''@|$(HAVE_SIGABBREV_NP)|g' \
-e 's|@''HAVE_SIGDESCR_NP''@|$(HAVE_SIGDESCR_NP)|g' \
-e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
-e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
-e 's|@''REPLACE_FFSLL''@|$(REPLACE_FFSLL)|g' \
-e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
-e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
-e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
@ -3283,6 +3419,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
-e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
-e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
-e 's|@''REPLACE_STRERRORNAME_NP''@|$(REPLACE_STRERRORNAME_NP)|g' \
-e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
-e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@ -3372,8 +3509,10 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
-e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \
-e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
-e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \
-e 's/@''GNULIB_GETUMASK''@/$(GNULIB_GETUMASK)/g' \
-e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \
-e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \
-e 's/@''GNULIB_MKDIR''@/$(GNULIB_MKDIR)/g' \
-e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \
-e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \
-e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \
@ -3382,9 +3521,13 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
-e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \
-e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \
-e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GNULIB_OVERRIDES_STRUCT_STAT)/g' \
-e 's/@''GNULIB_MDA_CHMOD''@/$(GNULIB_MDA_CHMOD)/g' \
-e 's/@''GNULIB_MDA_MKDIR''@/$(GNULIB_MDA_MKDIR)/g' \
-e 's/@''GNULIB_MDA_UMASK''@/$(GNULIB_MDA_UMASK)/g' \
-e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
-e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
-e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
-e 's|@''HAVE_GETUMASK''@|$(HAVE_GETUMASK)|g' \
-e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \
-e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
-e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \
@ -3400,7 +3543,9 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
-e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
-e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
-e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \
-e 's|@''REPLACE_MKFIFOAT''@|$(REPLACE_MKFIFOAT)|g' \
-e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \
-e 's|@''REPLACE_MKNODAT''@|$(REPLACE_MKNODAT)|g' \
-e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \
-e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@ -3485,15 +3630,17 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's/@''GNULIB_STRFTIME''@/$(GNULIB_STRFTIME)/g' \
-e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
-e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
-e 's/@''GNULIB_TIMESPEC_GET''@/$(GNULIB_TIMESPEC_GET)/g' \
-e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
-e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \
-e 's/@''GNULIB_TZSET''@/$(GNULIB_TZSET)/g' \
-e 's/@''GNULIB_MDA_TZSET''@/$(GNULIB_MDA_TZSET)/g' \
-e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
-e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
-e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
-e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
-e 's|@''HAVE_TIMESPEC_GET''@|$(HAVE_TIMESPEC_GET)|g' \
-e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \
-e 's|@''HAVE_TZSET''@|$(HAVE_TZSET)|g' \
-e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|g' \
-e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \
-e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \
@ -3507,6 +3654,7 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e 's|@''UNISTD_H_DEFINES_STRUCT_TIMESPEC''@|$(UNISTD_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e 's|@''TIME_H_DEFINES_TIME_UTC''@|$(TIME_H_DEFINES_TIME_UTC)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
@ -3536,6 +3684,13 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
-e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
-e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
-e 's/@''GNULIB_EXECL''@/$(GNULIB_EXECL)/g' \
-e 's/@''GNULIB_EXECLE''@/$(GNULIB_EXECLE)/g' \
-e 's/@''GNULIB_EXECLP''@/$(GNULIB_EXECLP)/g' \
-e 's/@''GNULIB_EXECV''@/$(GNULIB_EXECV)/g' \
-e 's/@''GNULIB_EXECVE''@/$(GNULIB_EXECVE)/g' \
-e 's/@''GNULIB_EXECVP''@/$(GNULIB_EXECVP)/g' \
-e 's/@''GNULIB_EXECVPE''@/$(GNULIB_EXECVPE)/g' \
-e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
-e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
-e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
@ -3581,12 +3736,33 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
-e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
-e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
-e 's/@''GNULIB_MDA_ACCESS''@/$(GNULIB_MDA_ACCESS)/g' \
-e 's/@''GNULIB_MDA_CHDIR''@/$(GNULIB_MDA_CHDIR)/g' \
-e 's/@''GNULIB_MDA_CLOSE''@/$(GNULIB_MDA_CLOSE)/g' \
-e 's/@''GNULIB_MDA_DUP''@/$(GNULIB_MDA_DUP)/g' \
-e 's/@''GNULIB_MDA_DUP2''@/$(GNULIB_MDA_DUP2)/g' \
-e 's/@''GNULIB_MDA_EXECL''@/$(GNULIB_MDA_EXECL)/g' \
-e 's/@''GNULIB_MDA_EXECLE''@/$(GNULIB_MDA_EXECLE)/g' \
-e 's/@''GNULIB_MDA_EXECLP''@/$(GNULIB_MDA_EXECLP)/g' \
-e 's/@''GNULIB_MDA_EXECV''@/$(GNULIB_MDA_EXECV)/g' \
-e 's/@''GNULIB_MDA_EXECVE''@/$(GNULIB_MDA_EXECVE)/g' \
-e 's/@''GNULIB_MDA_EXECVP''@/$(GNULIB_MDA_EXECVP)/g' \
-e 's/@''GNULIB_MDA_EXECVPE''@/$(GNULIB_MDA_EXECVPE)/g' \
-e 's/@''GNULIB_MDA_GETCWD''@/$(GNULIB_MDA_GETCWD)/g' \
-e 's/@''GNULIB_MDA_GETPID''@/$(GNULIB_MDA_GETPID)/g' \
-e 's/@''GNULIB_MDA_ISATTY''@/$(GNULIB_MDA_ISATTY)/g' \
-e 's/@''GNULIB_MDA_LSEEK''@/$(GNULIB_MDA_LSEEK)/g' \
-e 's/@''GNULIB_MDA_READ''@/$(GNULIB_MDA_READ)/g' \
-e 's/@''GNULIB_MDA_RMDIR''@/$(GNULIB_MDA_RMDIR)/g' \
-e 's/@''GNULIB_MDA_SWAB''@/$(GNULIB_MDA_SWAB)/g' \
-e 's/@''GNULIB_MDA_UNLINK''@/$(GNULIB_MDA_UNLINK)/g' \
-e 's/@''GNULIB_MDA_WRITE''@/$(GNULIB_MDA_WRITE)/g' \
< $(srcdir)/unistd.in.h | \
sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
-e 's|@''HAVE_COPY_FILE_RANGE''@|$(HAVE_COPY_FILE_RANGE)|g' \
-e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
-e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
-e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
-e 's|@''HAVE_EXECVPE''@|$(HAVE_EXECVPE)|g' \
-e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
-e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \
-e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
@ -3616,6 +3792,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
-e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
-e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
-e 's|@''HAVE_DECL_EXECVPE''@|$(HAVE_DECL_EXECVPE)|g' \
-e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
-e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \
-e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
@ -3634,6 +3811,13 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
-e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
-e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
-e 's|@''REPLACE_EXECL''@|$(REPLACE_EXECL)|g' \
-e 's|@''REPLACE_EXECLE''@|$(REPLACE_EXECLE)|g' \
-e 's|@''REPLACE_EXECLP''@|$(REPLACE_EXECLP)|g' \
-e 's|@''REPLACE_EXECV''@|$(REPLACE_EXECV)|g' \
-e 's|@''REPLACE_EXECVE''@|$(REPLACE_EXECVE)|g' \
-e 's|@''REPLACE_EXECVP''@|$(REPLACE_EXECVP)|g' \
-e 's|@''REPLACE_EXECVPE''@|$(REPLACE_EXECVPE)|g' \
-e 's|@''REPLACE_FACCESSAT''@|$(REPLACE_FACCESSAT)|g' \
-e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
-e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
@ -3728,6 +3912,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \
-e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \
-e 's/@''GNULIB_WCSFTIME''@/$(GNULIB_WCSFTIME)/g' \
-e 's/@''GNULIB_MDA_WCSDUP''@/$(GNULIB_MDA_WCSDUP)/g' \
< $(srcdir)/wchar.in.h | \
sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
-e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
@ -3770,6 +3955,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \
-e 's|@''HAVE_WCSFTIME''@|$(HAVE_WCSFTIME)|g' \
-e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
-e 's|@''HAVE_DECL_WCSDUP''@|$(HAVE_DECL_WCSDUP)|g' \
-e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
| \
sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \

View File

@ -1,5 +1,5 @@
/* A C macro for declaring that a function does not return.
Copyright (C) 2011-2020 Free Software Foundation, Inc.
Copyright (C) 2011-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published

View File

@ -39,8 +39,8 @@
# define memory_full() abort ()
#endif
/* If compiling with GCC 2, this file's not needed. */
#if !defined (__GNUC__) || __GNUC__ < 2
/* If compiling with GCC or clang, this file is not needed. */
#if !(defined __GNUC__ || defined __clang__)
/* If someone has defined alloca as a macro,
there must be some other way alloca is supposed to work. */
@ -62,16 +62,6 @@ lose
# endif /* static */
# endif /* emacs */
/* If your stack is a linked list of frames, you have to
provide an "address metric" ADDRESS_FUNCTION macro. */
# if defined (CRAY) && defined (CRAY_STACKSEG_END)
long i00afunc ();
# define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
# else
# define ADDRESS_FUNCTION(arg) &(arg)
# endif
/* Define STACK_DIRECTION if you know the direction of stack
growth for your system; otherwise it will be automatically
deduced at run-time.
@ -140,7 +130,7 @@ void *
alloca (size_t size)
{
auto char probe; /* Probes stack depth: */
register char *depth = ADDRESS_FUNCTION (probe);
register char *depth = &probe;
# if STACK_DIRECTION == 0
if (STACK_DIR == 0) /* Unknown growth direction. */
@ -206,273 +196,5 @@ alloca (size_t size)
}
}
# if defined (CRAY) && defined (CRAY_STACKSEG_END)
# ifdef DEBUG_I00AFUNC
# include <stdio.h>
# endif
# ifndef CRAY_STACK
# define CRAY_STACK
# ifndef CRAY2
/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
struct stack_control_header
{
long shgrow:32; /* Number of times stack has grown. */
long shaseg:32; /* Size of increments to stack. */
long shhwm:32; /* High water mark of stack. */
long shsize:32; /* Current size of stack (all segments). */
};
/* The stack segment linkage control information occurs at
the high-address end of a stack segment. (The stack
grows from low addresses to high addresses.) The initial
part of the stack segment linkage control information is
0200 (octal) words. This provides for register storage
for the routine which overflows the stack. */
struct stack_segment_linkage
{
long ss[0200]; /* 0200 overflow words. */
long sssize:32; /* Number of words in this segment. */
long ssbase:32; /* Offset to stack base. */
long:32;
long sspseg:32; /* Offset to linkage control of previous
segment of stack. */
long:32;
long sstcpt:32; /* Pointer to task common address block. */
long sscsnm; /* Private control structure number for
microtasking. */
long ssusr1; /* Reserved for user. */
long ssusr2; /* Reserved for user. */
long sstpid; /* Process ID for pid based multi-tasking. */
long ssgvup; /* Pointer to multitasking thread giveup. */
long sscray[7]; /* Reserved for Cray Research. */
long ssa0;
long ssa1;
long ssa2;
long ssa3;
long ssa4;
long ssa5;
long ssa6;
long ssa7;
long sss0;
long sss1;
long sss2;
long sss3;
long sss4;
long sss5;
long sss6;
long sss7;
};
# else /* CRAY2 */
/* The following structure defines the vector of words
returned by the STKSTAT library routine. */
struct stk_stat
{
long now; /* Current total stack size. */
long maxc; /* Amount of contiguous space which would
be required to satisfy the maximum
stack demand to date. */
long high_water; /* Stack high-water mark. */
long overflows; /* Number of stack overflow ($STKOFEN) calls. */
long hits; /* Number of internal buffer hits. */
long extends; /* Number of block extensions. */
long stko_mallocs; /* Block allocations by $STKOFEN. */
long underflows; /* Number of stack underflow calls ($STKRETN). */
long stko_free; /* Number of deallocations by $STKRETN. */
long stkm_free; /* Number of deallocations by $STKMRET. */
long segments; /* Current number of stack segments. */
long maxs; /* Maximum number of stack segments so far. */
long pad_size; /* Stack pad size. */
long current_address; /* Current stack segment address. */
long current_size; /* Current stack segment size. This
number is actually corrupted by STKSTAT to
include the fifteen word trailer area. */
long initial_address; /* Address of initial segment. */
long initial_size; /* Size of initial segment. */
};
/* The following structure describes the data structure which trails
any stack segment. I think that the description in 'asdef' is
out of date. I only describe the parts that I am sure about. */
struct stk_trailer
{
long this_address; /* Address of this block. */
long this_size; /* Size of this block (does not include
this trailer). */
long unknown2;
long unknown3;
long link; /* Address of trailer block of previous
segment. */
long unknown5;
long unknown6;
long unknown7;
long unknown8;
long unknown9;
long unknown10;
long unknown11;
long unknown12;
long unknown13;
long unknown14;
};
# endif /* CRAY2 */
# endif /* not CRAY_STACK */
# ifdef CRAY2
/* Determine a "stack measure" for an arbitrary ADDRESS.
I doubt that "lint" will like this much. */
static long
i00afunc (long *address)
{
struct stk_stat status;
struct stk_trailer *trailer;
long *block, size;
long result = 0;
/* We want to iterate through all of the segments. The first
step is to get the stack status structure. We could do this
more quickly and more directly, perhaps, by referencing the
$LM00 common block, but I know that this works. */
STKSTAT (&status);
/* Set up the iteration. */
trailer = (struct stk_trailer *) (status.current_address
+ status.current_size
- 15);
/* There must be at least one stack segment. Therefore it is
a fatal error if "trailer" is null. */
if (trailer == NULL)
abort ();
/* Discard segments that do not contain our argument address. */
while (trailer != NULL)
{
block = (long *) trailer->this_address;
size = trailer->this_size;
if (block == NULL || size == 0)
abort ();
trailer = (struct stk_trailer *) trailer->link;
if ((block <= address) && (address < (block + size)))
break;
}
/* Set the result to the offset in this segment and add the sizes
of all predecessor segments. */
result = address - block;
if (trailer == NULL)
{
return result;
}
do
{
if (trailer->this_size <= 0)
abort ();
result += trailer->this_size;
trailer = (struct stk_trailer *) trailer->link;
}
while (trailer != NULL);
/* We are done. Note that if you present a bogus address (one
not in any segment), you will get a different number back, formed
from subtracting the address of the first block. This is probably
not what you want. */
return (result);
}
# else /* not CRAY2 */
/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
Determine the number of the cell within the stack,
given the address of the cell. The purpose of this
routine is to linearize, in some sense, stack addresses
for alloca. */
static long
i00afunc (long address)
{
long stkl = 0;
long size, pseg, this_segment, stack;
long result = 0;
struct stack_segment_linkage *ssptr;
/* Register B67 contains the address of the end of the
current stack segment. If you (as a subprogram) store
your registers on the stack and find that you are past
the contents of B67, you have overflowed the segment.
B67 also points to the stack segment linkage control
area, which is what we are really interested in. */
stkl = CRAY_STACKSEG_END ();
ssptr = (struct stack_segment_linkage *) stkl;
/* If one subtracts 'size' from the end of the segment,
one has the address of the first word of the segment.
If this is not the first segment, 'pseg' will be
nonzero. */
pseg = ssptr->sspseg;
size = ssptr->sssize;
this_segment = stkl - size;
/* It is possible that calling this routine itself caused
a stack overflow. Discard stack segments which do not
contain the target address. */
while (!(this_segment <= address && address <= stkl))
{
# ifdef DEBUG_I00AFUNC
fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
# endif
if (pseg == 0)
break;
stkl = stkl - pseg;
ssptr = (struct stack_segment_linkage *) stkl;
size = ssptr->sssize;
pseg = ssptr->sspseg;
this_segment = stkl - size;
}
result = address - this_segment;
/* If you subtract pseg from the current end of the stack,
you get the address of the previous stack segment's end.
This seems a little convoluted to me, but I'll bet you save
a cycle somewhere. */
while (pseg != 0)
{
# ifdef DEBUG_I00AFUNC
fprintf (stderr, "%011o %011o\n", pseg, size);
# endif
stkl = stkl - pseg;
ssptr = (struct stack_segment_linkage *) stkl;
size = ssptr->sssize;
pseg = ssptr->sspseg;
result += size;
}
return (result);
}
# endif /* not CRAY2 */
# endif /* CRAY */
# endif /* no alloca */
#endif /* not GCC 2 */
#endif /* not GCC || clang */

View File

@ -1,6 +1,6 @@
/* Memory allocation on the stack.
Copyright (C) 1995, 1999, 2001-2004, 2006-2020 Free Software Foundation,
Copyright (C) 1995, 1999, 2001-2004, 2006-2021 Free Software Foundation,
Inc.
This program is free software; you can redistribute it and/or modify it
@ -44,7 +44,7 @@
# endif
#endif
#ifndef alloca
# ifdef __GNUC__
# if defined __GNUC__ || (__clang_major__ >= 4)
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca

View File

@ -1,5 +1,5 @@
/* A C macro for declaring that specific arguments must not be NULL.
Copyright (C) 2009-2020 Free Software Foundation, Inc.
Copyright (C) 2009-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
@ -18,7 +18,7 @@
that the values passed as arguments n, ..., m must be non-NULL pointers.
n = 1 stands for the first argument, n = 2 for the second argument etc. */
#ifndef _GL_ARG_NONNULL
# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__
# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
# else
# define _GL_ARG_NONNULL(params)

View File

@ -1,6 +1,6 @@
/* A GNU-like <arpa/inet.h>.
Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc.
Copyright (C) 2005-2006, 2008-2021 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,6 @@
/* Run-time assert-like macros.
Copyright (C) 2014-2020 Free Software Foundation, Inc.
Copyright (C) 2014-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* Define at-style functions like fstatat, unlinkat, fchownat, etc.
Copyright (C) 2006, 2009-2020 Free Software Foundation, Inc.
Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,6 @@
/* ATTRIBUTE_* macros for using attributes in GCC and similar compilers
Copyright 2020 Free Software Foundation, Inc.
Copyright 2020-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
@ -80,7 +80,7 @@
/* Attributes for variadic functions. */
/* The variadic function expects a trailing NULL argument.
ATTRIBUTE_SENTINEL () - The last argument is NULL.
ATTRIBUTE_SENTINEL () - The last argument is NULL (requires C99).
ATTRIBUTE_SENTINEL ((N)) - The (N+1)st argument from the end is NULL. */
/* Applies to: functions. */
#define ATTRIBUTE_SENTINEL(pos) _GL_ATTRIBUTE_SENTINEL (pos)
@ -170,19 +170,22 @@
/* Applies to: function. */
#define ATTRIBUTE_ALWAYS_INLINE _GL_ATTRIBUTE_ALWAYS_INLINE
/* The function does not affect observable state, and always returns a value.
Compilers can omit duplicate calls with the same arguments if
observable state is not changed between calls. (This attribute is
looser than ATTRIBUTE_CONST.) */
/* Applies to: functions. */
#define ATTRIBUTE_PURE _GL_ATTRIBUTE_PURE
/* The function neither depends on nor affects observable state,
and always returns a value. Compilers can omit duplicate calls with
the same arguments. (This attribute is stricter than ATTRIBUTE_PURE.) */
/* It is OK for a compiler to omit duplicate calls with the same arguments.
This attribute is safe for a function that neither depends on
nor affects observable state, and always returns exactly once -
e.g., does not loop forever, and does not call longjmp.
(This attribute is stricter than ATTRIBUTE_PURE.) */
/* Applies to: functions. */
#define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST
/* It is OK for a compiler to omit duplicate calls with the same
arguments if observable state is not changed between calls.
This attribute is safe for a function that does not affect
observable state, and always returns exactly once.
(This attribute is looser than ATTRIBUTE_CONST.) */
/* Applies to: functions. */
#define ATTRIBUTE_PURE _GL_ATTRIBUTE_PURE
/* The function is rarely executed. */
/* Applies to: functions. */
#define ATTRIBUTE_COLD _GL_ATTRIBUTE_COLD

View File

@ -1,6 +1,6 @@
/* basename.c -- return the last element in a file name
Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2020 Free Software
Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2021 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@ -18,20 +18,20 @@
#include <config.h>
#include "dirname.h"
/* Specification. */
#include "basename-lgpl.h"
#include <stdbool.h>
#include <string.h>
/* Return the address of the last file name component of NAME. If
NAME has no relative file name components because it is a file
system root, return the empty string. */
#include "filename.h"
char *
last_component (char const *name)
{
char const *base = name + FILE_SYSTEM_PREFIX_LEN (name);
char const *p;
bool saw_slash = false;
bool last_was_slash = false;
while (ISSLASH (*base))
base++;
@ -39,21 +39,17 @@ last_component (char const *name)
for (p = base; *p; p++)
{
if (ISSLASH (*p))
saw_slash = true;
else if (saw_slash)
last_was_slash = true;
else if (last_was_slash)
{
base = p;
saw_slash = false;
last_was_slash = false;
}
}
return (char *) base;
}
/* Return the length of the basename NAME. Typically NAME is the
value returned by base_name or last_component. Act like strlen
(NAME), except omit all trailing slashes. */
size_t
base_len (char const *name)
{

View File

@ -0,0 +1,78 @@
/* Extract the last component (base name) of a file name.
Copyright (C) 1998, 2001, 2003-2006, 2009-2021 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef _BASENAME_LGPL_H
#define _BASENAME_LGPL_H
#include <stddef.h>
#ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Return the address of the last file name component of FILENAME.
If FILENAME has some trailing slash(es), they are considered to be
part of the last component.
If FILENAME has no relative file name components because it is a file
system root, return the empty string.
Examples:
FILENAME RESULT
"foo.c" "foo.c"
"foo/bar.c" "bar.c"
"/foo/bar.c" "bar.c"
"foo/bar/" "bar/"
"foo/bar//" "bar//"
"/" ""
"//" ""
"" ""
The return value is a tail of the given FILENAME; do NOT free() it! */
/* This function was traditionally called 'basename', but we avoid this
function name because
* Various platforms have different functions in their libc.
In particular, the glibc basename(), defined in <string.h>, does
not consider trailing slashes to be part of the component:
FILENAME RESULT
"foo/bar/" ""
"foo/bar//" ""
* The 'basename' command eliminates trailing slashes and for a root
produces a non-empty result:
FILENAME RESULT
"foo/bar/" "bar"
"foo/bar//" "bar"
"/" "/"
"//" "/"
*/
extern char *last_component (char const *filename) _GL_ATTRIBUTE_PURE;
/* Return the length of the basename FILENAME.
Typically FILENAME is the value returned by base_name or last_component.
Act like strlen (FILENAME), except omit all trailing slashes. */
extern size_t base_len (char const *filename) _GL_ATTRIBUTE_PURE;
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* _BASENAME_LGPL_H */

View File

@ -1,5 +1,5 @@
/* Convert unibyte character to wide character.
Copyright (C) 2008, 2010-2020 Free Software Foundation, Inc.
Copyright (C) 2008, 2010-2021 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/* C++ compatible function declaration macros.
Copyright (C) 2010-2020 Free Software Foundation, Inc.
Copyright (C) 2010-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
@ -146,6 +146,16 @@
_GL_EXTERN_C int _gl_cxxalias_dummy
#endif
/* _GL_CXXALIAS_MDA (func, rettype, parameters);
is to be used when func is a Microsoft deprecated alias, on native Windows.
It declares a C++ alias called GNULIB_NAMESPACE::func
that redirects to _func, if GNULIB_NAMESPACE is defined.
Example:
_GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...));
*/
#define _GL_CXXALIAS_MDA(func,rettype,parameters) \
_GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters)
/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
except that the C function rpl_func may have a slightly different
@ -171,6 +181,14 @@
_GL_EXTERN_C int _gl_cxxalias_dummy
#endif
/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters);
is like _GL_CXXALIAS_MDA (func, rettype, parameters);
except that the C function func may have a slightly different declaration.
A cast is used to silence the "invalid conversion" error that would
otherwise occur. */
#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \
_GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters)
/* _GL_CXXALIAS_SYS (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func
that redirects to the system provided function func, if GNULIB_NAMESPACE
@ -268,7 +286,7 @@
_GL_CXXALIASWARN_2 (func, namespace)
/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
we enable the warning only when not optimizing. */
# if !__OPTIMIZE__
# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
# define _GL_CXXALIASWARN_2(func,namespace) \
_GL_WARN_ON_USE (func, \
"The symbol ::" #func " refers to the system function. " \
@ -296,9 +314,9 @@
_GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
we enable the warning only when not optimizing. */
# if !__OPTIMIZE__
# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
_GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
_GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \
"The symbol ::" #func " refers to the system function. " \
"Use " #namespace "::" #func " instead.")
# else

View File

@ -1,19 +1,20 @@
/* Return the canonical absolute name of a given file.
Copyright (C) 1996-2020 Free Software Foundation, Inc.
Copyright (C) 1996-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
You should have received a copy of the GNU General Public
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
#ifndef _LIBC
/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
@ -21,38 +22,38 @@
# define _GL_ARG_NONNULL(params)
# define _GL_USE_STDLIB_ALLOC 1
# include <config.h>
# include <libc-config.h>
#endif
#if !HAVE_CANONICALIZE_FILE_NAME || !FUNC_REALPATH_WORKS || defined _LIBC
/* Specification. */
#include <stdlib.h>
#include <alloca.h>
#include <string.h>
#include <unistd.h>
#include <limits.h>
#if HAVE_SYS_PARAM_H || defined _LIBC
# include <sys/param.h>
#endif
#include <sys/stat.h>
#include <errno.h>
#include <stddef.h>
#include <fcntl.h>
#include <limits.h>
#include <stdbool.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include <eloop-threshold.h>
#include <filename.h>
#include <idx.h>
#include <intprops.h>
#include <scratch_buffer.h>
#ifdef _LIBC
# include <shlib-compat.h>
# define GCC_LINT 1
# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
#else
# define SHLIB_COMPAT(lib, introduced, obsoleted) 0
# define versioned_symbol(lib, local, symbol, version) extern int dummy
# define compat_symbol(lib, local, symbol, version)
# define weak_alias(local, symbol)
# define __canonicalize_file_name canonicalize_file_name
# define __realpath realpath
# include "pathmax.h"
# include "malloca.h"
# include "filename.h"
# if HAVE_GETCWD
# define __faccessat faccessat
# if defined _WIN32 && !defined __CYGWIN__
# define __getcwd _getcwd
# elif HAVE_GETCWD
# if IN_RELOCWRAPPER
/* When building the relocatable program wrapper, use the system's getcwd
function, not the gnulib override, otherwise we would get a link error.
@ -70,57 +71,137 @@
# else
# define __getcwd(buf, max) getwd (buf)
# endif
# define __mempcpy mempcpy
# define __pathconf pathconf
# define __rawmemchr rawmemchr
# define __readlink readlink
# define __set_errno(e) errno = (e)
# ifndef MAXSYMLINKS
# ifdef SYMLOOP_MAX
# define MAXSYMLINKS SYMLOOP_MAX
# else
# define MAXSYMLINKS 20
# endif
# endif
# define __stat stat
#endif
/* Suppress bogus GCC -Wmaybe-uninitialized warnings. */
#if defined GCC_LINT || defined lint
# define IF_LINT(Code) Code
#else
# define IF_LINT(Code) /* empty */
#endif
#ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
# define DOUBLE_SLASH_IS_DISTINCT_ROOT false
#endif
/* Define this independently so that stdint.h is not a prerequisite. */
#ifndef SIZE_MAX
# define SIZE_MAX ((size_t) -1)
#endif
#if defined _LIBC || !FUNC_REALPATH_WORKS
#if !FUNC_REALPATH_WORKS || defined _LIBC
static void
alloc_failed (void)
/* Return true if FILE's existence can be shown, false (setting errno)
otherwise. Follow symbolic links. */
static bool
file_accessible (char const *file)
{
#if defined _WIN32 && ! defined __CYGWIN__
/* Avoid errno problem without using the malloc or realloc modules; see:
https://lists.gnu.org/r/bug-gnulib/2016-08/msg00025.html */
errno = ENOMEM;
#endif
# if defined _LIBC || HAVE_FACCESSAT
return __faccessat (AT_FDCWD, file, F_OK, AT_EACCESS) == 0;
# else
struct stat st;
return __stat (file, &st) == 0 || errno == EOVERFLOW;
# endif
}
/* Return the canonical absolute name of file NAME. A canonical name
does not contain any ".", ".." components nor any repeated path
separators ('/') or symlinks. All path components must exist. If
RESOLVED is null, the result is malloc'd; otherwise, if the
canonical name is PATH_MAX chars or more, returns null with 'errno'
set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars,
returns the name in RESOLVED. If the name cannot be resolved and
RESOLVED is non-NULL, it contains the path of the first component
that cannot be resolved. If the path can be resolved, RESOLVED
holds the same value as the value returned. */
/* True if concatenating END as a suffix to a file name means that the
code needs to check that the file name is that of a searchable
directory, since the canonicalize_filename_mode_stk code won't
check this later anyway when it checks an ordinary file name
component within END. END must either be empty, or start with a
slash. */
char *
__realpath (const char *name, char *resolved)
static bool _GL_ATTRIBUTE_PURE
suffix_requires_dir_check (char const *end)
{
char *rpath, *dest, *extra_buf = NULL;
const char *start, *end, *rpath_limit;
long int path_max;
/* If END does not start with a slash, the suffix is OK. */
while (ISSLASH (*end))
{
/* Two or more slashes act like a single slash. */
do
end++;
while (ISSLASH (*end));
switch (*end++)
{
default: return false; /* An ordinary file name component is OK. */
case '\0': return true; /* Trailing "/" is trouble. */
case '.': break; /* Possibly "." or "..". */
}
/* Trailing "/.", or "/.." even if not trailing, is trouble. */
if (!*end || (*end == '.' && (!end[1] || ISSLASH (end[1]))))
return true;
}
return false;
}
/* Append this to a file name to test whether it is a searchable directory.
On POSIX platforms "/" suffices, but "/./" is sometimes needed on
macOS 10.13 <https://bugs.gnu.org/30350>, and should also work on
platforms like AIX 7.2 that need at least "/.". */
#if defined _LIBC || defined LSTAT_FOLLOWS_SLASHED_SYMLINK
static char const dir_suffix[] = "/";
#else
static char const dir_suffix[] = "/./";
#endif
/* Return true if DIR is a searchable dir, false (setting errno) otherwise.
DIREND points to the NUL byte at the end of the DIR string.
Store garbage into DIREND[0 .. strlen (dir_suffix)]. */
static bool
dir_check (char *dir, char *dirend)
{
strcpy (dirend, dir_suffix);
return file_accessible (dir);
}
static idx_t
get_path_max (void)
{
# ifdef PATH_MAX
long int path_max = PATH_MAX;
# else
/* The caller invoked realpath with a null RESOLVED, even though
PATH_MAX is not defined as a constant. The glibc manual says
programs should not do this, and POSIX says the behavior is undefined.
Historically, glibc here used the result of pathconf, or 1024 if that
failed; stay consistent with this (dubious) historical practice. */
int err = errno;
long int path_max = __pathconf ("/", _PC_PATH_MAX);
__set_errno (err);
# endif
return path_max < 0 ? 1024 : path_max <= IDX_MAX ? path_max : IDX_MAX;
}
/* Act like __realpath (see below), with an additional argument
rname_buf that can be used as temporary storage.
If GCC_LINT is defined, do not inline this function with GCC 10.1
and later, to avoid creating a pointer to the stack that GCC
-Wreturn-local-addr incorrectly complains about. See:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644
Although the noinline attribute can hurt performance a bit, no better way
to pacify GCC is known; even an explicit #pragma does not pacify GCC.
When the GCC bug is fixed this workaround should be limited to the
broken GCC versions. */
#if __GNUC_PREREQ (10, 1)
# if defined GCC_LINT || defined lint
__attribute__ ((__noinline__))
# elif __OPTIMIZE__ && !__NO_INLINE__
# define GCC_BOGUS_WRETURN_LOCAL_ADDR
# endif
#endif
static char *
realpath_stk (const char *name, char *resolved,
struct scratch_buffer *rname_buf)
{
char *dest;
char const *start;
char const *end;
int num_links = 0;
size_t prefix_len;
if (name == NULL)
{
@ -140,205 +221,148 @@ __realpath (const char *name, char *resolved)
return NULL;
}
#ifdef PATH_MAX
path_max = PATH_MAX;
#else
path_max = pathconf (name, _PC_PATH_MAX);
if (path_max <= 0)
path_max = 8192;
#endif
if (resolved == NULL)
{
rpath = malloc (path_max);
if (rpath == NULL)
{
alloc_failed ();
return NULL;
}
}
else
rpath = resolved;
rpath_limit = rpath + path_max;
struct scratch_buffer extra_buffer, link_buffer;
scratch_buffer_init (&extra_buffer);
scratch_buffer_init (&link_buffer);
scratch_buffer_init (rname_buf);
char *rname_on_stack = rname_buf->data;
char *rname = rname_on_stack;
bool end_in_extra_buffer = false;
bool failed = true;
/* This is always zero for Posix hosts, but can be 2 for MS-Windows
and MS-DOS X:/foo/bar file names. */
prefix_len = FILE_SYSTEM_PREFIX_LEN (name);
idx_t prefix_len = FILE_SYSTEM_PREFIX_LEN (name);
if (!IS_ABSOLUTE_FILE_NAME (name))
{
if (!__getcwd (rpath, path_max))
while (!__getcwd (rname, rname_buf->length))
{
rpath[0] = '\0';
goto error;
if (errno != ERANGE)
{
dest = rname;
goto error;
}
if (!scratch_buffer_grow (rname_buf))
goto error_nomem;
rname = rname_buf->data;
}
dest = strchr (rpath, '\0');
dest = __rawmemchr (rname, '\0');
start = name;
prefix_len = FILE_SYSTEM_PREFIX_LEN (rpath);
prefix_len = FILE_SYSTEM_PREFIX_LEN (rname);
}
else
{
dest = rpath;
if (prefix_len)
{
memcpy (rpath, name, prefix_len);
dest += prefix_len;
}
dest = __mempcpy (rname, name, prefix_len);
*dest++ = '/';
if (DOUBLE_SLASH_IS_DISTINCT_ROOT)
{
if (ISSLASH (name[1]) && !ISSLASH (name[2]) && !prefix_len)
if (prefix_len == 0 /* implies ISSLASH (name[0]) */
&& ISSLASH (name[1]) && !ISSLASH (name[2]))
*dest++ = '/';
*dest = '\0';
}
start = name + prefix_len;
}
for (end = start; *start; start = end)
for ( ; *start; start = end)
{
#ifdef _LIBC
struct stat64 st;
#else
struct stat st;
#endif
/* Skip sequence of multiple path-separators. */
/* Skip sequence of multiple file name separators. */
while (ISSLASH (*start))
++start;
/* Find end of path component. */
/* Find end of component. */
for (end = start; *end && !ISSLASH (*end); ++end)
/* Nothing. */;
if (end - start == 0)
/* Length of this file name component; it can be zero if a file
name ends in '/'. */
idx_t startlen = end - start;
if (startlen == 0)
break;
else if (end - start == 1 && start[0] == '.')
else if (startlen == 1 && start[0] == '.')
/* nothing */;
else if (end - start == 2 && start[0] == '.' && start[1] == '.')
else if (startlen == 2 && start[0] == '.' && start[1] == '.')
{
/* Back up to previous component, ignore if at root already. */
if (dest > rpath + prefix_len + 1)
for (--dest; dest > rpath && !ISSLASH (dest[-1]); --dest)
if (dest > rname + prefix_len + 1)
for (--dest; dest > rname && !ISSLASH (dest[-1]); --dest)
continue;
if (DOUBLE_SLASH_IS_DISTINCT_ROOT
&& dest == rpath + 1 && !prefix_len
&& dest == rname + 1 && !prefix_len
&& ISSLASH (*dest) && !ISSLASH (dest[1]))
dest++;
}
else
{
size_t new_size;
if (!ISSLASH (dest[-1]))
*dest++ = '/';
if (dest + (end - start) >= rpath_limit)
while (rname + rname_buf->length - dest
< startlen + sizeof dir_suffix)
{
ptrdiff_t dest_offset = dest - rpath;
char *new_rpath;
if (resolved)
{
__set_errno (ENAMETOOLONG);
if (dest > rpath + prefix_len + 1)
dest--;
*dest = '\0';
goto error;
}
new_size = rpath_limit - rpath;
if (end - start + 1 > path_max)
new_size += end - start + 1;
else
new_size += path_max;
new_rpath = (char *) realloc (rpath, new_size);
if (new_rpath == NULL)
{
alloc_failed ();
goto error;
}
rpath = new_rpath;
rpath_limit = rpath + new_size;
dest = rpath + dest_offset;
idx_t dest_offset = dest - rname;
if (!scratch_buffer_grow_preserve (rname_buf))
goto error_nomem;
rname = rname_buf->data;
dest = rname + dest_offset;
}
#ifdef _LIBC
dest = __mempcpy (dest, start, end - start);
#else
memcpy (dest, start, end - start);
dest += end - start;
#endif
dest = __mempcpy (dest, start, startlen);
*dest = '\0';
/* FIXME: if lstat fails with errno == EOVERFLOW,
the entry exists. */
#ifdef _LIBC
if (__lxstat64 (_STAT_VER, rpath, &st) < 0)
#else
if (lstat (rpath, &st) < 0)
#endif
goto error;
if (S_ISLNK (st.st_mode))
char *buf;
ssize_t n;
while (true)
{
char *buf;
size_t len;
ssize_t n;
if (++num_links > MAXSYMLINKS)
buf = link_buffer.data;
idx_t bufsize = link_buffer.length;
n = __readlink (rname, buf, bufsize - 1);
if (n < bufsize - 1)
break;
if (!scratch_buffer_grow (&link_buffer))
goto error_nomem;
}
if (0 <= n)
{
if (++num_links > __eloop_threshold ())
{
__set_errno (ELOOP);
goto error;
}
buf = malloca (path_max);
if (!buf)
{
__set_errno (ENOMEM);
goto error;
}
n = __readlink (rpath, buf, path_max - 1);
if (n < 0)
{
int saved_errno = errno;
freea (buf);
__set_errno (saved_errno);
goto error;
}
buf[n] = '\0';
if (!extra_buf)
char *extra_buf = extra_buffer.data;
idx_t end_idx IF_LINT (= 0);
if (end_in_extra_buffer)
end_idx = end - extra_buf;
size_t len = strlen (end);
if (INT_ADD_OVERFLOW (len, n))
{
extra_buf = malloca (path_max);
if (!extra_buf)
{
freea (buf);
__set_errno (ENOMEM);
goto error;
}
__set_errno (ENOMEM);
goto error_nomem;
}
len = strlen (end);
/* Check that n + len + 1 doesn't overflow and is <= path_max. */
if (n >= SIZE_MAX - len || n + len >= path_max)
while (extra_buffer.length <= len + n)
{
freea (buf);
__set_errno (ENAMETOOLONG);
goto error;
if (!scratch_buffer_grow_preserve (&extra_buffer))
goto error_nomem;
extra_buf = extra_buffer.data;
}
if (end_in_extra_buffer)
end = extra_buf + end_idx;
/* Careful here, end may be a pointer into extra_buf... */
memmove (&extra_buf[n], end, len + 1);
name = end = memcpy (extra_buf, buf, n);
end_in_extra_buffer = true;
if (IS_ABSOLUTE_FILE_NAME (buf))
{
size_t pfxlen = FILE_SYSTEM_PREFIX_LEN (buf);
idx_t pfxlen = FILE_SYSTEM_PREFIX_LEN (buf);
if (pfxlen)
memcpy (rpath, buf, pfxlen);
dest = rpath + pfxlen;
dest = __mempcpy (rname, buf, pfxlen);
*dest++ = '/'; /* It's an absolute symlink */
if (DOUBLE_SLASH_IS_DISTINCT_ROOT)
{
@ -353,44 +377,67 @@ __realpath (const char *name, char *resolved)
{
/* Back up to previous component, ignore if at root
already: */
if (dest > rpath + prefix_len + 1)
for (--dest; dest > rpath && !ISSLASH (dest[-1]); --dest)
if (dest > rname + prefix_len + 1)
for (--dest; dest > rname && !ISSLASH (dest[-1]); --dest)
continue;
if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1
if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rname + 1
&& ISSLASH (*dest) && !ISSLASH (dest[1]) && !prefix_len)
dest++;
}
}
else if (!S_ISDIR (st.st_mode) && *end != '\0')
{
__set_errno (ENOTDIR);
goto error;
}
else if (! (suffix_requires_dir_check (end)
? dir_check (rname, dest)
: errno == EINVAL))
goto error;
}
}
if (dest > rpath + prefix_len + 1 && ISSLASH (dest[-1]))
if (dest > rname + prefix_len + 1 && ISSLASH (dest[-1]))
--dest;
if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1 && !prefix_len
if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rname + 1 && !prefix_len
&& ISSLASH (*dest) && !ISSLASH (dest[1]))
dest++;
*dest = '\0';
if (extra_buf)
freea (extra_buf);
return rpath;
failed = false;
error:
{
int saved_errno = errno;
if (extra_buf)
freea (extra_buf);
if (resolved == NULL)
free (rpath);
__set_errno (saved_errno);
}
return NULL;
*dest++ = '\0';
if (resolved != NULL && dest - rname <= get_path_max ())
rname = strcpy (resolved, rname);
error_nomem:
scratch_buffer_free (&extra_buffer);
scratch_buffer_free (&link_buffer);
if (failed || rname == resolved)
{
scratch_buffer_free (rname_buf);
return failed ? NULL : resolved;
}
return scratch_buffer_dupfree (rname_buf, dest - rname);
}
/* Return the canonical absolute name of file NAME. A canonical name
does not contain any ".", ".." components nor any repeated file name
separators ('/') or symlinks. All file name components must exist. If
RESOLVED is null, the result is malloc'd; otherwise, if the
canonical name is PATH_MAX chars or more, returns null with 'errno'
set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars,
returns the name in RESOLVED. If the name cannot be resolved and
RESOLVED is non-NULL, it contains the name of the first component
that cannot be resolved. If the name can be resolved, RESOLVED
holds the same value as the value returned. */
char *
__realpath (const char *name, char *resolved)
{
#ifdef GCC_BOGUS_WRETURN_LOCAL_ADDR
#warning "GCC might issue a bogus -Wreturn-local-addr warning here."
#warning "See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644>."
#endif
struct scratch_buffer rname_buffer;
return realpath_stk (name, resolved, &rname_buffer);
}
libc_hidden_def (__realpath)
versioned_symbol (libc, __realpath, realpath, GLIBC_2_3);
#endif /* !FUNC_REALPATH_WORKS || defined _LIBC */
@ -418,11 +465,3 @@ __canonicalize_file_name (const char *name)
return __realpath (name, NULL);
}
weak_alias (__canonicalize_file_name, canonicalize_file_name)
#else
/* This declaration is solely to ensure that after preprocessing
this file is never empty. */
typedef int dummy;
#endif

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -25,7 +25,7 @@
/* The GNU libc does not support any K&R compilers or the traditional mode
of ISO C compilers anymore. Check for some of the combinations not
anymore supported. */
supported anymore. */
#if defined __GNUC__ && !defined __STDC__
# error "You need a ISO C conforming compiler to use the glibc headers"
#endif
@ -34,7 +34,34 @@
#undef __P
#undef __PMT
#ifdef __GNUC__
/* Compilers that are not clang may object to
#if defined __clang__ && __has_attribute(...)
even though they do not need to evaluate the right-hand side of the &&. */
#if defined __clang__ && defined __has_attribute
# define __glibc_clang_has_attribute(name) __has_attribute (name)
#else
# define __glibc_clang_has_attribute(name) 0
#endif
/* Compilers that are not clang may object to
#if defined __clang__ && __has_builtin(...)
even though they do not need to evaluate the right-hand side of the &&. */
#if defined __clang__ && defined __has_builtin
# define __glibc_clang_has_builtin(name) __has_builtin (name)
#else
# define __glibc_clang_has_builtin(name) 0
#endif
/* Compilers that are not clang may object to
#if defined __clang__ && __has_extension(...)
even though they do not need to evaluate the right-hand side of the &&. */
#if defined __clang__ && defined __has_extension
# define __glibc_clang_has_extension(ext) __has_extension (ext)
#else
# define __glibc_clang_has_extension(ext) 0
#endif
#if defined __GNUC__ || defined __clang__
/* All functions, except those with callbacks or those that
synchronize memory, are leaf functions. */
@ -47,21 +74,26 @@
# endif
/* GCC can always grok prototypes. For C++ programs we add throw()
to help it optimize the function calls. But this works only with
gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
to help it optimize the function calls. But this only works with
gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
as non-throwing using a function attribute since programs can use
the -fexceptions options for C code as well. */
# if !defined __cplusplus && __GNUC_PREREQ (3, 3)
# if !defined __cplusplus \
&& (__GNUC_PREREQ (3, 4) || __glibc_clang_has_attribute (__nothrow__))
# define __THROW __attribute__ ((__nothrow__ __LEAF))
# define __THROWNL __attribute__ ((__nothrow__))
# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
# define __NTHNL(fct) __attribute__ ((__nothrow__)) fct
# else
# if defined __cplusplus && __GNUC_PREREQ (2,8)
# define __THROW throw ()
# define __THROWNL throw ()
# define __NTH(fct) __LEAF_ATTR fct throw ()
# define __NTHNL(fct) fct throw ()
# if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major >= 4)
# if __cplusplus >= 201103L
# define __THROW noexcept (true)
# else
# define __THROW throw ()
# endif
# define __THROWNL __THROW
# define __NTH(fct) __LEAF_ATTR fct __THROW
# define __NTHNL(fct) fct __THROW
# else
# define __THROW
# define __THROWNL
@ -70,7 +102,7 @@
# endif
# endif
#else /* Not GCC. */
#else /* Not GCC or clang. */
# if (defined __cplusplus \
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
@ -83,16 +115,7 @@
# define __THROWNL
# define __NTH(fct) fct
#endif /* GCC. */
/* Compilers that are not clang may object to
#if defined __clang__ && __has_extension(...)
even though they do not need to evaluate the right-hand side of the &&. */
#if defined __clang__ && defined __has_extension
# define __glibc_clang_has_extension(ext) __has_extension (ext)
#else
# define __glibc_clang_has_extension(ext) 0
#endif
#endif /* GCC || clang. */
/* These two macros are not used in glibc anymore. They are kept here
only because some other projects expect the macros to be defined. */
@ -123,14 +146,20 @@
#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
#define __bos0(ptr) __builtin_object_size (ptr, 0)
/* Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. */
#if __USE_FORTIFY_LEVEL == 3 && __glibc_clang_prereq (9, 0)
# define __glibc_objsize0(__o) __builtin_dynamic_object_size (__o, 0)
# define __glibc_objsize(__o) __builtin_dynamic_object_size (__o, 1)
#else
# define __glibc_objsize0(__o) __bos0 (__o)
# define __glibc_objsize(__o) __bos (__o)
#endif
#if __GNUC_PREREQ (4,3)
# define __warndecl(name, msg) \
extern void name (void) __attribute__((__warning__ (msg)))
# define __warnattr(msg) __attribute__((__warning__ (msg)))
# define __errordecl(name, msg) \
extern void name (void) __attribute__((__error__ (msg)))
#else
# define __warndecl(name, msg) extern void name (void)
# define __warnattr(msg)
# define __errordecl(name, msg) extern void name (void)
#endif
@ -142,8 +171,8 @@
#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L && !defined __HP_cc
# define __flexarr []
# define __glibc_c99_flexarr_available 1
#elif __GNUC_PREREQ (2,97)
/* GCC 2.97 supports C99 flexible array members as an extension,
#elif __GNUC_PREREQ (2,97) || defined __clang__
/* GCC 2.97 and clang support C99 flexible array members as an extension,
even when in C89 mode or compiling C++ (any version). */
# define __flexarr []
# define __glibc_c99_flexarr_available 1
@ -169,7 +198,7 @@
Example:
int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */
#if defined __GNUC__ && __GNUC__ >= 2
#if (defined __GNUC__ && __GNUC__ >= 2) || (__clang_major__ >= 4)
# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
# ifdef __cplusplus
@ -194,17 +223,17 @@
*/
#endif
/* GCC has various useful declarations that can be made with the
`__attribute__' syntax. All of the ways we use this do fine if
they are omitted for compilers that don't understand it. */
#if !defined __GNUC__ || __GNUC__ < 2
/* GCC and clang have various useful declarations that can be made with
the '__attribute__' syntax. All of the ways we use this do fine if
they are omitted for compilers that don't understand it. */
#if !(defined __GNUC__ || defined __clang__)
# define __attribute__(xyz) /* Ignore */
#endif
/* At some point during the gcc 2.96 development the `malloc' attribute
for functions was introduced. We don't want to use it unconditionally
(although this would be possible) since it generates warnings. */
#if __GNUC_PREREQ (2,96)
#if __GNUC_PREREQ (2,96) || __glibc_clang_has_attribute (__malloc__)
# define __attribute_malloc__ __attribute__ ((__malloc__))
#else
# define __attribute_malloc__ /* Ignore */
@ -222,14 +251,14 @@
/* At some point during the gcc 2.96 development the `pure' attribute
for functions was introduced. We don't want to use it unconditionally
(although this would be possible) since it generates warnings. */
#if __GNUC_PREREQ (2,96)
#if __GNUC_PREREQ (2,96) || __glibc_clang_has_attribute (__pure__)
# define __attribute_pure__ __attribute__ ((__pure__))
#else
# define __attribute_pure__ /* Ignore */
#endif
/* This declaration tells the compiler that the value is constant. */
#if __GNUC_PREREQ (2,5)
#if __GNUC_PREREQ (2,5) || __glibc_clang_has_attribute (__const__)
# define __attribute_const__ __attribute__ ((__const__))
#else
# define __attribute_const__ /* Ignore */
@ -238,7 +267,7 @@
/* At some point during the gcc 3.1 development the `used' attribute
for functions was introduced. We don't want to use it unconditionally
(although this would be possible) since it generates warnings. */
#if __GNUC_PREREQ (3,1)
#if __GNUC_PREREQ (3,1) || __glibc_clang_has_attribute (__used__)
# define __attribute_used__ __attribute__ ((__used__))
# define __attribute_noinline__ __attribute__ ((__noinline__))
#else
@ -247,7 +276,7 @@
#endif
/* Since version 3.2, gcc allows marking deprecated functions. */
#if __GNUC_PREREQ (3,2)
#if __GNUC_PREREQ (3,2) || __glibc_clang_has_attribute (__deprecated__)
# define __attribute_deprecated__ __attribute__ ((__deprecated__))
#else
# define __attribute_deprecated__ /* Ignore */
@ -256,8 +285,8 @@
/* Since version 4.5, gcc also allows one to specify the message printed
when a deprecated function is used. clang claims to be gcc 4.2, but
may also support this feature. */
#if __GNUC_PREREQ (4,5) || \
__glibc_clang_has_extension (__attribute_deprecated_with_message__)
#if __GNUC_PREREQ (4,5) \
|| __glibc_clang_has_extension (__attribute_deprecated_with_message__)
# define __attribute_deprecated_msg__(msg) \
__attribute__ ((__deprecated__ (msg)))
#else
@ -270,7 +299,7 @@
If several `format_arg' attributes are given for the same function, in
gcc-3.0 and older, all but the last one are ignored. In newer gccs,
all designated arguments are considered. */
#if __GNUC_PREREQ (2,8)
#if __GNUC_PREREQ (2,8) || __glibc_clang_has_attribute (__format_arg__)
# define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
#else
# define __attribute_format_arg__(x) /* Ignore */
@ -280,7 +309,7 @@
attribute for functions was introduced. We don't want to use it
unconditionally (although this would be possible) since it
generates warnings. */
#if __GNUC_PREREQ (2,97)
#if __GNUC_PREREQ (2,97) || __glibc_clang_has_attribute (__format__)
# define __attribute_format_strfmon__(a,b) \
__attribute__ ((__format__ (__strfmon__, a, b)))
#else
@ -291,7 +320,7 @@
must not be NULL. Do not define __nonnull if it is already defined,
for portability when this file is used in Gnulib. */
#ifndef __nonnull
# if __GNUC_PREREQ (3,3)
# if __GNUC_PREREQ (3,3) || __glibc_clang_has_attribute (__nonnull__)
# define __nonnull(params) __attribute__ ((__nonnull__ params))
# else
# define __nonnull(params)
@ -300,7 +329,7 @@
/* If fortification mode, we warn about unused results of certain
function calls which can lead to problems. */
#if __GNUC_PREREQ (3,4)
#if __GNUC_PREREQ (3,4) || __glibc_clang_has_attribute (__warn_unused_result__)
# define __attribute_warn_unused_result__ \
__attribute__ ((__warn_unused_result__))
# if defined __USE_FORTIFY_LEVEL && __USE_FORTIFY_LEVEL > 0
@ -314,7 +343,7 @@
#endif
/* Forces a function to be always inlined. */
#if __GNUC_PREREQ (3,2)
#if __GNUC_PREREQ (3,2) || __glibc_clang_has_attribute (__always_inline__)
/* The Linux kernel defines __always_inline in stddef.h (283d7573), and
it conflicts with this definition. Therefore undefine it first to
allow either header to be included first. */
@ -327,7 +356,7 @@
/* Associate error messages with the source location of the call site rather
than with the source location inside the function. */
#if __GNUC_PREREQ (4,3)
#if __GNUC_PREREQ (4,3) || __glibc_clang_has_attribute (__artificial__)
# define __attribute_artificial__ __attribute__ ((__artificial__))
#else
# define __attribute_artificial__ /* Ignore */
@ -370,12 +399,14 @@
run in pedantic mode if the uses are carefully marked using the
`__extension__' keyword. But this is not generally available before
version 2.8. */
#if !__GNUC_PREREQ (2,8)
#if !(__GNUC_PREREQ (2,8) || defined __clang__)
# define __extension__ /* Ignore */
#endif
/* __restrict is known in EGCS 1.2 and above. */
#if !__GNUC_PREREQ (2,92)
/* __restrict is known in EGCS 1.2 and above, and in clang.
It works also in C++ mode (outside of arrays), but only when spelled
as '__restrict', not 'restrict'. */
#if !(__GNUC_PREREQ (2,92) || __clang_major__ >= 3)
# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
# define __restrict restrict
# else
@ -385,8 +416,9 @@
/* ISO C99 also allows to declare arrays as non-overlapping. The syntax is
array_name[restrict]
GCC 3.1 supports this. */
#if __GNUC_PREREQ (3,1) && !defined __GNUG__
GCC 3.1 and clang support this.
This syntax is not usable in C++ mode. */
#if (__GNUC_PREREQ (3,1) || __clang_major__ >= 3) && !defined __cplusplus
# define __restrict_arr __restrict
#else
# ifdef __GNUC__
@ -401,7 +433,7 @@
# endif
#endif
#if __GNUC__ >= 3
#if (__GNUC__ >= 3) || __glibc_clang_has_builtin (__builtin_expect)
# define __glibc_unlikely(cond) __builtin_expect ((cond), 0)
# define __glibc_likely(cond) __builtin_expect ((cond), 1)
#else
@ -417,7 +449,8 @@
#if (!defined _Noreturn \
&& (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
&& !__GNUC_PREREQ (4,7))
&& !(__GNUC_PREREQ (4,7) \
|| (3 < __clang_major__ + (5 <= __clang_minor__))))
# if __GNUC_PREREQ (2,8)
# define _Noreturn __attribute__ ((__noreturn__))
# else
@ -434,9 +467,20 @@
# define __attribute_nonstring__
#endif
/* Undefine (also defined in libc-symbols.h). */
#undef __attribute_copy__
#if __GNUC_PREREQ (9, 0)
/* Copies attributes from the declaration or type referenced by
the argument. */
# define __attribute_copy__(arg) __attribute__ ((__copy__ (arg)))
#else
# define __attribute_copy__(arg)
#endif
#if (!defined _Static_assert && !defined __cplusplus \
&& (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
&& (!__GNUC_PREREQ (4, 6) || defined __STRICT_ANSI__))
&& (!(__GNUC_PREREQ (4, 6) || __clang_major__ >= 4) \
|| defined __STRICT_ANSI__))
# define _Static_assert(expr, diagnostic) \
extern int (*__Static_assert_function (void)) \
[!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })]
@ -449,7 +493,37 @@
# include <bits/long-double.h>
#endif
#if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH
#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
# ifdef __REDIRECT
/* Alias name defined automatically. */
# define __LDBL_REDIR(name, proto) ... unused__ldbl_redir
# define __LDBL_REDIR_DECL(name) \
extern __typeof (name) name __asm (__ASMNAME ("__" #name "ieee128"));
/* Alias name defined automatically, with leading underscores. */
# define __LDBL_REDIR2_DECL(name) \
extern __typeof (__##name) __##name \
__asm (__ASMNAME ("__" #name "ieee128"));
/* Alias name defined manually. */
# define __LDBL_REDIR1(name, proto, alias) ... unused__ldbl_redir1
# define __LDBL_REDIR1_DECL(name, alias) \
extern __typeof (name) name __asm (__ASMNAME (#alias));
# define __LDBL_REDIR1_NTH(name, proto, alias) \
__REDIRECT_NTH (name, proto, alias)
# define __REDIRECT_NTH_LDBL(name, proto, alias) \
__LDBL_REDIR1_NTH (name, proto, __##alias##ieee128)
/* Unused. */
# define __REDIRECT_LDBL(name, proto, alias) ... unused__redirect_ldbl
# define __LDBL_REDIR_NTH(name, proto) ... unused__ldbl_redir_nth
# else
_Static_assert (0, "IEEE 128-bits long double requires redirection on this platform");
# endif
#elif defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH
# define __LDBL_COMPAT 1
# ifdef __REDIRECT
# define __LDBL_REDIR1(name, proto, alias) __REDIRECT (name, proto, alias)
@ -458,6 +532,8 @@
# define __LDBL_REDIR1_NTH(name, proto, alias) __REDIRECT_NTH (name, proto, alias)
# define __LDBL_REDIR_NTH(name, proto) \
__LDBL_REDIR1_NTH (name, proto, __nldbl_##name)
# define __LDBL_REDIR2_DECL(name) \
extern __typeof (__##name) __##name __asm (__ASMNAME ("__nldbl___" #name));
# define __LDBL_REDIR1_DECL(name, alias) \
extern __typeof (name) name __asm (__ASMNAME (#alias));
# define __LDBL_REDIR_DECL(name) \
@ -468,11 +544,13 @@
__LDBL_REDIR1_NTH (name, proto, __nldbl_##alias)
# endif
#endif
#if !defined __LDBL_COMPAT || !defined __REDIRECT
#if (!defined __LDBL_COMPAT && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0) \
|| !defined __REDIRECT
# define __LDBL_REDIR1(name, proto, alias) name proto
# define __LDBL_REDIR(name, proto) name proto
# define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW
# define __LDBL_REDIR_NTH(name, proto) name proto __THROW
# define __LDBL_REDIR2_DECL(name)
# define __LDBL_REDIR_DECL(name)
# ifdef __REDIRECT
# define __REDIRECT_LDBL(name, proto, alias) __REDIRECT (name, proto, alias)
@ -511,4 +589,23 @@
# define __HAVE_GENERIC_SELECTION 0
#endif
#if __GNUC_PREREQ (10, 0)
/* Designates a 1-based positional argument ref-index of pointer type
that can be used to access size-index elements of the pointed-to
array according to access mode, or at least one element when
size-index is not provided:
access (access-mode, <ref-index> [, <size-index>]) */
#define __attr_access(x) __attribute__ ((__access__ x))
#else
# define __attr_access(x)
#endif
/* Specify that a function such as setjmp or vfork may return
twice. */
#if __GNUC_PREREQ (4, 1)
# define __attribute_returns_twice__ __attribute__ ((__returns_twice__))
#else
# define __attribute_returns_twice__ /* Ignore. */
#endif
#endif /* sys/cdefs.h */

View File

@ -1,5 +1,5 @@
/* provide a chdir function that tries not to fail due to ENAMETOOLONG
Copyright (C) 2004-2020 Free Software Foundation, Inc.
Copyright (C) 2004-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* provide a chdir function that tries not to fail due to ENAMETOOLONG
Copyright (C) 2004-2005, 2009-2020 Free Software Foundation, Inc.
Copyright (C) 2004-2005, 2009-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,6 @@
/* cloexec.c - set or clear the close-on-exec descriptor flag
Copyright (C) 1991, 2004-2006, 2009-2020 Free Software Foundation, Inc.
Copyright (C) 1991, 2004-2006, 2009-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,6 @@
/* cloexec.c - set or clear the close-on-exec descriptor flag
Copyright (C) 2004, 2009-2020 Free Software Foundation, Inc.
Copyright (C) 2004, 2009-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* close replacement.
Copyright (C) 2008-2020 Free Software Foundation, Inc.
Copyright (C) 2008-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -28,7 +28,8 @@
#undef close
#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
#if defined _WIN32 && !defined __CYGWIN__
# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
static int
close_nothrow (int fd)
{
@ -36,7 +37,7 @@ close_nothrow (int fd)
TRY_MSVC_INVAL
{
result = close (fd);
result = _close (fd);
}
CATCH_MSVC_INVAL
{
@ -47,6 +48,9 @@ close_nothrow (int fd)
return result;
}
# else
# define close_nothrow _close
# endif
#else
# define close_nothrow close
#endif

View File

@ -1,5 +1,5 @@
/* Stop reading the entries of a directory.
Copyright (C) 2006-2020 Free Software Foundation, Inc.
Copyright (C) 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 General Public License as published by

View File

@ -1,5 +1,5 @@
/* count-one-bits.h -- counts the number of 1-bits in a word.
Copyright (C) 2007-2020 Free Software Foundation, Inc.
Copyright (C) 2007-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -38,7 +38,8 @@ extern "C" {
expand to code that computes the number of 1-bits of the local
variable 'x' of type TYPE (an unsigned integer type) and return it
from the current function. */
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) \
|| (__clang_major__ >= 4)
# define COUNT_ONE_BITS(GCC_BUILTIN, MSC_BUILTIN, TYPE) \
return GCC_BUILTIN (x)
#else

View File

@ -1,6 +1,6 @@
/* A substitute for ISO C99 <ctype.h>, for platforms on which it is incomplete.
Copyright (C) 2009-2020 Free Software Foundation, Inc.
Copyright (C) 2009-2021 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* Private details of the DIR type.
Copyright (C) 2011-2020 Free Software Foundation, Inc.
Copyright (C) 2011-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* A GNU-like <dirent.h>.
Copyright (C) 2006-2020 Free Software Foundation, Inc.
Copyright (C) 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 General Public License as published by
@ -58,7 +58,7 @@ typedef struct gl_directory DIR;
/* The __attribute__ feature is available in gcc versions 2.5 and later.
The attribute __pure__ was added in gcc 2.96. */
#ifndef _GL_ATTRIBUTE_PURE
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__
# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
# else
# define _GL_ATTRIBUTE_PURE /* empty */

View File

@ -1,6 +1,6 @@
/* dirfd.c -- return the file descriptor associated with an open DIR*
Copyright (C) 2001, 2006, 2008-2020 Free Software Foundation, Inc.
Copyright (C) 2001, 2006, 2008-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,6 @@
/* dirname.c -- return all but the last element in a file name
Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2020 Free Software
Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2021 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify

View File

@ -1,6 +1,6 @@
/* Take file names apart into directory and base names.
Copyright (C) 1998, 2001, 2003-2006, 2009-2020 Free Software Foundation,
Copyright (C) 1998, 2001, 2003-2006, 2009-2021 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
@ -22,15 +22,12 @@
# include <stdbool.h>
# include <stddef.h>
# include "filename.h"
# include "basename-lgpl.h"
# ifndef DIRECTORY_SEPARATOR
# define DIRECTORY_SEPARATOR '/'
# endif
# ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
# endif
#ifdef __cplusplus
extern "C" {
#endif
@ -41,9 +38,7 @@ char *dir_name (char const *file);
# endif
char *mdir_name (char const *file);
size_t base_len (char const *file) _GL_ATTRIBUTE_PURE;
size_t dir_len (char const *file) _GL_ATTRIBUTE_PURE;
char *last_component (char const *file) _GL_ATTRIBUTE_PURE;
bool strip_trailing_slashes (char *file);

View File

@ -1,7 +1,7 @@
/* Duplicate a file descriptor result, avoiding clobbering
STD{IN,OUT,ERR}_FILENO, with specific flags.
Copyright (C) 2001, 2004-2006, 2009-2020 Free Software Foundation, Inc.
Copyright (C) 2001, 2004-2006, 2009-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,6 @@
/* Invoke dup, but avoid some glitches.
Copyright (C) 2001, 2004-2006, 2009-2020 Free Software Foundation, Inc.
Copyright (C) 2001, 2004-2006, 2009-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,6 @@
/* Duplicate an open file descriptor.
Copyright (C) 2011-2020 Free Software Foundation, Inc.
Copyright (C) 2011-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -28,7 +28,8 @@
#undef dup
#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
#if defined _WIN32 && !defined __CYGWIN__
# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
static int
dup_nothrow (int fd)
{
@ -36,7 +37,7 @@ dup_nothrow (int fd)
TRY_MSVC_INVAL
{
result = dup (fd);
result = _dup (fd);
}
CATCH_MSVC_INVAL
{
@ -47,6 +48,9 @@ dup_nothrow (int fd)
return result;
}
# else
# define dup_nothrow _dup
# endif
#elif defined __KLIBC__
# include <fcntl.h>
# include <sys/stat.h>

View File

@ -1,6 +1,6 @@
/* Duplicate an open file descriptor to a specified file descriptor.
Copyright (C) 1999, 2004-2007, 2009-2020 Free Software Foundation, Inc.
Copyright (C) 1999, 2004-2007, 2009-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -25,28 +25,26 @@
#include <errno.h>
#include <fcntl.h>
#if HAVE_DUP2
#undef dup2
# undef dup2
# if defined _WIN32 && ! defined __CYGWIN__
#if defined _WIN32 && ! defined __CYGWIN__
/* Get declarations of the native Windows API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
# include "msvc-inval.h"
# endif
# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
# include "msvc-inval.h"
# endif
/* Get _get_osfhandle. */
# if GNULIB_MSVC_NOTHROW
# include "msvc-nothrow.h"
# else
# include <io.h>
# endif
# if GNULIB_MSVC_NOTHROW
# include "msvc-nothrow.h"
# else
# include <io.h>
# endif
# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
static int
dup2_nothrow (int fd, int desired_fd)
{
@ -54,7 +52,7 @@ dup2_nothrow (int fd, int desired_fd)
TRY_MSVC_INVAL
{
result = dup2 (fd, desired_fd);
result = _dup2 (fd, desired_fd);
}
CATCH_MSVC_INVAL
{
@ -65,9 +63,9 @@ dup2_nothrow (int fd, int desired_fd)
return result;
}
# else
# define dup2_nothrow dup2
# endif
# else
# define dup2_nothrow _dup2
# endif
static int
ms_windows_dup2 (int fd, int desired_fd)
@ -103,11 +101,11 @@ ms_windows_dup2 (int fd, int desired_fd)
return result;
}
# define dup2 ms_windows_dup2
# define dup2 ms_windows_dup2
# elif defined __KLIBC__
#elif defined __KLIBC__
# include <InnoTekLIBC/backend.h>
# include <InnoTekLIBC/backend.h>
static int
klibc_dup2dirfd (int fd, int desired_fd)
@ -155,81 +153,37 @@ klibc_dup2 (int fd, int desired_fd)
return dupfd;
}
# define dup2 klibc_dup2
# endif
# define dup2 klibc_dup2
#endif
int
rpl_dup2 (int fd, int desired_fd)
{
int result;
# ifdef F_GETFL
#ifdef F_GETFL
/* On Linux kernels 2.6.26-2.6.29, dup2 (fd, fd) returns -EBADF.
On Cygwin 1.5.x, dup2 (1, 1) returns 0.
On Cygwin 1.7.17, dup2 (1, -1) dumps core.
On Cygwin 1.7.25, dup2 (1, 256) can dump core.
On Haiku, dup2 (fd, fd) mistakenly clears FD_CLOEXEC. */
# if HAVE_SETDTABLESIZE
# if HAVE_SETDTABLESIZE
setdtablesize (desired_fd + 1);
# endif
# endif
if (desired_fd < 0)
fd = desired_fd;
if (fd == desired_fd)
return fcntl (fd, F_GETFL) == -1 ? -1 : fd;
# endif
#endif
result = dup2 (fd, desired_fd);
/* Correct an errno value on FreeBSD 6.1 and Cygwin 1.5.x. */
if (result == -1 && errno == EMFILE)
errno = EBADF;
# if REPLACE_FCHDIR
#if REPLACE_FCHDIR
if (fd != desired_fd && result != -1)
result = _gl_register_dup (fd, result);
# endif
#endif
return result;
}
#else /* !HAVE_DUP2 */
/* On older platforms, dup2 did not exist. */
# ifndef F_DUPFD
static int
dupfd (int fd, int desired_fd)
{
int duplicated_fd = dup (fd);
if (duplicated_fd < 0 || duplicated_fd == desired_fd)
return duplicated_fd;
else
{
int r = dupfd (fd, desired_fd);
int e = errno;
close (duplicated_fd);
errno = e;
return r;
}
}
# endif
int
dup2 (int fd, int desired_fd)
{
int result = fcntl (fd, F_GETFL) < 0 ? -1 : fd;
if (result == -1 || fd == desired_fd)
return result;
close (desired_fd);
# ifdef F_DUPFD
result = fcntl (fd, F_DUPFD, desired_fd);
# if REPLACE_FCHDIR
if (0 <= result)
result = _gl_register_dup (fd, result);
# endif
# else
result = dupfd (fd, desired_fd);
# endif
if (result == -1 && (errno == EMFILE || errno == EINVAL))
errno = EBADF;
return result;
}
#endif /* !HAVE_DUP2 */

View File

@ -0,0 +1,83 @@
/* Threshold at which to diagnose ELOOP. Generic version.
Copyright (C) 2012-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
#ifndef _ELOOP_THRESHOLD_H
#define _ELOOP_THRESHOLD_H 1
#include <limits.h>
#ifdef _LIBC
# include <sys/param.h>
# define _GL_ATTRIBUTE_CONST __attribute__ ((const))
#else
# include <unistd.h>
# include "minmax.h"
# define __sysconf sysconf
# if (!defined SYMLOOP_MAX \
&& ! (defined _SC_SYMLOOP_MAX && defined _POSIX_SYMLOOP_MAX))
# define SYMLOOP_MAX 8
# endif
#endif
/* POSIX specifies SYMLOOP_MAX as the "Maximum number of symbolic
links that can be reliably traversed in the resolution of a
pathname in the absence of a loop." This makes it a minimum that
we should certainly accept. But it leaves open the possibility
that more might sometimes work--just not "reliably".
For example, Linux implements a complex policy whereby there is a
small limit on the number of direct symlink traversals (a symlink
to a symlink to a symlink), but larger limit on the total number of
symlink traversals overall. Hence the SYMLOOP_MAX number should be
the small one, but the limit library functions enforce on users
should be the larger one.
So, we use the larger of the reported SYMLOOP_MAX (if any) and our
own constant MIN_ELOOP_THRESHOLD, below. This constant should be
large enough that it never rules out a file name and directory tree
that the underlying system (i.e. calls to 'open' et al) would
resolve successfully. It should be small enough that actual loops
are detected without a huge number of iterations. */
#ifndef MIN_ELOOP_THRESHOLD
# define MIN_ELOOP_THRESHOLD 40
#endif
/* Return the maximum number of symlink traversals to permit
before diagnosing ELOOP. */
static inline unsigned int _GL_ATTRIBUTE_CONST
__eloop_threshold (void)
{
#ifdef SYMLOOP_MAX
const int symloop_max = SYMLOOP_MAX;
#else
/* The function is marked 'const' even though we use memory and
call a function, because sysconf is required to return the
same value in every call and so it must always be safe to
call __eloop_threshold exactly once and reuse the value. */
static long int sysconf_symloop_max;
if (sysconf_symloop_max == 0)
sysconf_symloop_max = __sysconf (_SC_SYMLOOP_MAX);
const unsigned int symloop_max = (sysconf_symloop_max <= 0
? _POSIX_SYMLOOP_MAX
: sysconf_symloop_max);
#endif
return MAX (symloop_max, MIN_ELOOP_THRESHOLD);
}
#endif /* eloop-threshold.h */

View File

@ -1,6 +1,6 @@
/* A POSIX-like <errno.h>.
Copyright (C) 2008-2020 Free Software Foundation, Inc.
Copyright (C) 2008-2021 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* Error handler for noninteractive utilities
Copyright (C) 1990-1998, 2000-2007, 2009-2020 Free Software Foundation, Inc.
Copyright (C) 1990-1998, 2000-2007, 2009-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@ -40,7 +40,7 @@
# include <wchar.h>
# define mbsrtowcs __mbsrtowcs
# define USE_UNLOCKED_IO 0
# define _GL_ATTRIBUTE_FORMAT_PRINTF(a, b)
# define _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD(a, b)
# define _GL_ARG_NONNULL(a)
#else
# include "getprogname.h"
@ -202,7 +202,7 @@ print_errno_message (int errnum)
#endif
}
static void _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) _GL_ARG_NONNULL ((3))
static void _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0) _GL_ARG_NONNULL ((3))
error_tail (int status, int errnum, const char *message, va_list args)
{
#if _LIBC

View File

@ -1,5 +1,5 @@
/* Declaration for error-reporting function
Copyright (C) 1995-1997, 2003, 2006, 2008-2020 Free Software Foundation,
Copyright (C) 1995-1997, 2003, 2006, 2008-2021 Free Software Foundation,
Inc.
This file is part of the GNU C Library.
@ -19,15 +19,8 @@
#ifndef _ERROR_H
#define _ERROR_H 1
/* On mingw, the flavor of printf depends on whether the extensions module
* is in use; the check for <stdio.h> determines the witness macro. */
#ifndef _GL_ATTRIBUTE_SPEC_PRINTF
# if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU
# define _GL_ATTRIBUTE_SPEC_PRINTF __gnu_printf__
# else
# define _GL_ATTRIBUTE_SPEC_PRINTF __printf__
# endif
#endif
/* Get _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM. */
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
@ -38,11 +31,21 @@ extern "C" {
If STATUS is nonzero, terminate the program with 'exit (STATUS)'. */
extern void error (int __status, int __errnum, const char *__format, ...)
_GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF, 3, 4));
#if GNULIB_VFPRINTF_POSIX
_GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 3, 4))
#else
_GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM, 3, 4))
#endif
;
extern void error_at_line (int __status, int __errnum, const char *__fname,
unsigned int __lineno, const char *__format, ...)
_GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF, 5, 6));
#if GNULIB_VFPRINTF_POSIX
_GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 5, 6))
#else
_GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM, 5, 6))
#endif
;
/* If NULL, error will flush stdout, then print on stderr the program
name, a colon and a space. Otherwise, error will call this

View File

@ -1,6 +1,6 @@
/* Failure exit status
Copyright (C) 2002-2003, 2005-2007, 2009-2020 Free Software Foundation, Inc.
Copyright (C) 2002-2003, 2005-2007, 2009-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,6 @@
/* Failure exit status
Copyright (C) 2002, 2009-2020 Free Software Foundation, Inc.
Copyright (C) 2002, 2009-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -3,7 +3,7 @@
# Update an FSF copyright year list to include the current year.
# Copyright (C) 2009-2020 Free Software Foundation, Inc.
# Copyright (C) 2009-2021 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* fchdir replacement.
Copyright (C) 2006-2020 Free Software Foundation, Inc.
Copyright (C) 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 General Public License as published by

View File

@ -1,6 +1,6 @@
/* Provide file descriptor control.
Copyright (C) 2009-2020 Free Software Foundation, Inc.
Copyright (C) 2009-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -70,14 +70,14 @@ dupfd (int oldfd, int newfd, int flags)
return -1;
}
if (old_handle == INVALID_HANDLE_VALUE
|| (mode = setmode (oldfd, O_BINARY)) == -1)
|| (mode = _setmode (oldfd, O_BINARY)) == -1)
{
/* oldfd is not open, or is an unassigned standard file
descriptor. */
errno = EBADF;
return -1;
}
setmode (oldfd, mode);
_setmode (oldfd, mode);
flags |= mode;
for (;;)
@ -491,7 +491,9 @@ rpl_fcntl_DUPFD_CLOEXEC (int fd, int target)
#if !HAVE_FCNTL
result = dupfd (fd, target, O_CLOEXEC);
#else /* HAVE_FCNTL */
# if defined __HAIKU__
# if defined __NetBSD__ || defined __HAIKU__
/* On NetBSD 9.0, the system fcntl (fd, F_DUPFD_CLOEXEC, target)
has only the same effect as fcntl (fd, F_DUPFD, target). */
/* On Haiku, the system fcntl (fd, F_DUPFD_CLOEXEC, target) sets
the FD_CLOEXEC flag on fd, not on target. Therefore avoid the
system fcntl in this case. */

View File

@ -1,6 +1,6 @@
/* Like <fcntl.h>, but with non-working flags defined to 0.
Copyright (C) 2006-2020 Free Software Foundation, Inc.
Copyright (C) 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 General Public License as published by
@ -97,6 +97,12 @@
_GL_FUNCDECL_RPL (creat, int, (const char *filename, mode_t mode)
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (creat, int, (const char *filename, mode_t mode));
# elif defined _WIN32 && !defined __CYGWIN__
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef creat
# define creat _creat
# endif
_GL_CXXALIAS_MDA (creat, int, (const char *filename, mode_t mode));
# else
_GL_CXXALIAS_SYS (creat, int, (const char *filename, mode_t mode));
# endif
@ -106,6 +112,21 @@ _GL_CXXALIASWARN (creat);
/* Assume creat is always declared. */
_GL_WARN_ON_USE (creat, "creat is not always POSIX compliant - "
"use gnulib module creat for portability");
#elif @GNULIB_MDA_CREAT@
/* On native Windows, map 'creat' to '_creat', so that -loldnames is not
required. In C++ with GNULIB_NAMESPACE, avoid differences between
platforms by defining GNULIB_NAMESPACE::creat always. */
# if defined _WIN32 && !defined __CYGWIN__
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef creat
# define creat _creat
# endif
/* Need to cast, because in mingw the last argument is 'int mode'. */
_GL_CXXALIAS_MDA_CAST (creat, int, (const char *filename, mode_t mode));
# else
_GL_CXXALIAS_SYS (creat, int, (const char *filename, mode_t mode));
# endif
_GL_CXXALIASWARN (creat);
#endif
#if @GNULIB_FCNTL@
@ -146,6 +167,12 @@ _GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - "
_GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
# elif defined _WIN32 && !defined __CYGWIN__
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef open
# define open _open
# endif
_GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...));
# else
_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
# endif
@ -159,6 +186,22 @@ _GL_CXXALIASWARN (open);
/* Assume open is always declared. */
_GL_WARN_ON_USE (open, "open is not always POSIX compliant - "
"use gnulib module open for portability");
#elif @GNULIB_MDA_OPEN@
/* On native Windows, map 'open' to '_open', so that -loldnames is not
required. In C++ with GNULIB_NAMESPACE, avoid differences between
platforms by defining GNULIB_NAMESPACE::open always. */
# if defined _WIN32 && !defined __CYGWIN__
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef open
# define open _open
# endif
_GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...));
# else
_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
# endif
# if !defined __hpux
_GL_CXXALIASWARN (open);
# endif
#endif
#if @GNULIB_OPENAT@

View File

@ -1,5 +1,5 @@
/* Hook for making file descriptor functions close(), ioctl() extensible.
Copyright (C) 2009-2020 Free Software Foundation, Inc.
Copyright (C) 2009-2021 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This program is free software: you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/* Hook for making file descriptor functions close(), ioctl() extensible.
Copyright (C) 2009-2020 Free Software Foundation, Inc.
Copyright (C) 2009-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published

View File

@ -1,7 +1,7 @@
/* Adjust a file descriptor result so that it avoids clobbering
STD{IN,OUT,ERR}_FILENO, with specific flags.
Copyright (C) 2005-2006, 2009-2020 Free Software Foundation, Inc.
Copyright (C) 2005-2006, 2009-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,6 @@
/* Return a safer copy of a file descriptor.
Copyright (C) 2005-2006, 2009-2020 Free Software Foundation, Inc.
Copyright (C) 2005-2006, 2009-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* provide a replacement fdopendir function
Copyright (C) 2004-2020 Free Software Foundation, Inc.
Copyright (C) 2004-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,18 +1,20 @@
/* Basic filename support macros.
Copyright (C) 2001-2004, 2007-2020 Free Software Foundation, Inc.
Copyright (C) 2001-2004, 2007-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
You should have received a copy of the GNU General Public
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
/* From Paul Eggert and Jim Meyering. */

View File

@ -1,6 +1,6 @@
/* Concatenate two arbitrary file names.
Copyright (C) 1996-2007, 2009-2020 Free Software Foundation, Inc.
Copyright (C) 1996-2007, 2009-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -25,7 +25,8 @@
#include <stdlib.h>
#include <string.h>
#include "dirname.h"
#include "basename-lgpl.h"
#include "filename.h"
#if ! HAVE_MEMPCPY && ! defined mempcpy
# define mempcpy(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N)))

View File

@ -1,6 +1,6 @@
/* Concatenate two arbitrary file names.
Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2020 Free Software
Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2021 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify

View File

@ -1,6 +1,6 @@
/* Sizes of structs with flexible array members.
Copyright 2016-2020 Free Software Foundation, Inc.
Copyright 2016-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.

View File

@ -1,5 +1,5 @@
/* Supplemental information about the floating-point formats.
Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/* Auxiliary definitions for <float.h>.
Copyright (C) 2011-2020 Free Software Foundation, Inc.
Copyright (C) 2011-2021 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify

View File

@ -1,6 +1,6 @@
/* A correct <float.h>.
Copyright (C) 2007-2020 Free Software Foundation, Inc.
Copyright (C) 2007-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -93,11 +93,14 @@
extern const long double LDBL_MAX;
Unfortunately, this is not a constant expression. */
# if !GNULIB_defined_long_double_union
union gl_long_double_union
{
struct { unsigned int lo; unsigned int hi; unsigned int exponent; } xd;
long double ld;
};
# define GNULIB_defined_long_double_union 1
# endif
extern const union gl_long_double_union gl_LDBL_MAX;
# define LDBL_MAX (gl_LDBL_MAX.ld)
/* Minimum e such that 10^e is in the range of normalized numbers. */
@ -146,11 +149,14 @@ extern const union gl_long_double_union gl_LDBL_MAX;
Unfortunately, this is not a constant expression, and the latter expression
does not work well when GCC is optimizing.. */
# if !GNULIB_defined_long_double_union
union gl_long_double_union
{
struct { double hi; double lo; } dd;
long double ld;
};
# define GNULIB_defined_long_double_union 1
# endif
extern const union gl_long_double_union gl_LDBL_MAX;
# define LDBL_MAX (gl_LDBL_MAX.ld)
#endif

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -64,10 +64,10 @@ extern int fnmatch (const char *pattern, const char *string, int flags);
#endif
#ifdef _LIBC
# if __GNUC__ < 7
# define FALLTHROUGH ((void) 0)
# else
# if (__GNUC__ >= 7) || (__clang_major__ >= 10)
# define FALLTHROUGH __attribute__ ((__fallthrough__))
# else
# define FALLTHROUGH ((void) 0)
# endif
#else
# include "attribute.h"
@ -76,6 +76,12 @@ extern int fnmatch (const char *pattern, const char *string, int flags);
#include <intprops.h>
#include <flexmember.h>
#ifdef _LIBC
typedef ptrdiff_t idx_t;
#else
# include "idx.h"
#endif
/* We often have to test for FNM_FILE_NAME and FNM_PERIOD being both set. */
#define NO_LEADING_PERIOD(flags) \
((flags & (FNM_FILE_NAME | FNM_PERIOD)) == (FNM_FILE_NAME | FNM_PERIOD))

View File

@ -1,5 +1,5 @@
/* Substitute for and wrapper around <fnmatch.h>.
Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2020 Free
Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2021 Free
Software Foundation, Inc.
This file is part of the GNU C Library.

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -549,7 +549,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
/* Get the collation sequence value. */
is_seqval = true;
# if WIDE_CHAR_VERSION
cold = wextra[1 + wextra[idx]];
cold = wextra[1 + wextra[0]];
# else
idx += 1 + extra[idx];
/* Adjust for the alignment. */
@ -726,7 +726,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
/* Get the collation sequence value. */
is_seqval = true;
# if WIDE_CHAR_VERSION
cend = wextra[1 + wextra[idx]];
cend = wextra[1 + wextra[0]];
# else
idx += 1 + extra[idx];
/* Adjust for the alignment. */
@ -978,12 +978,12 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
bool no_leading_period, int flags, size_t alloca_used)
{
const CHAR *startp;
size_t level;
ptrdiff_t level;
struct patternlist
{
struct patternlist *next;
CHAR malloced;
CHAR str[FLEXIBLE_ARRAY_MEMBER];
CHAR str __flexarr;
} *list = NULL;
struct patternlist **lastp = &list;
size_t pattern_len = STRLEN (pattern);
@ -994,7 +994,7 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
/* Parse the pattern. Store the individual parts in the list. */
level = 0;
for (startp = p = pattern + 1; ; ++p)
for (startp = p = pattern + 1; level >= 0; ++p)
if (*p == L_('\0'))
{
/* This is an invalid pattern. */
@ -1036,9 +1036,9 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
struct patternlist *newp; \
size_t plen = (opt == L_('?') || opt == L_('@') \
? pattern_len : (p - startp + 1UL)); \
ptrdiff_t slen = FLEXSIZEOF (struct patternlist, str, 0); \
ptrdiff_t new_used = alloca_used + slen; \
ptrdiff_t plensize; \
idx_t slen = FLEXSIZEOF (struct patternlist, str, 0); \
idx_t new_used = alloca_used + slen; \
idx_t plensize; \
if (INT_MULTIPLY_WRAPV (plen, sizeof (CHAR), &plensize) \
|| INT_ADD_WRAPV (new_used, plensize, &new_used)) \
{ \
@ -1065,7 +1065,6 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
*lastp = newp; \
lastp = &newp->next
NEW_PATTERN;
break;
}
}
else if (*p == L_('|'))

View File

@ -1,5 +1,5 @@
/* Manipulating the FPU control word. -*- coding: utf-8 -*-
Copyright (C) 2007-2020 Free Software Foundation, Inc.
Copyright (C) 2007-2021 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
@ -61,8 +61,8 @@
'long double' safe operation precision
*/
/* Inline assembler like this works only with GNU C. */
#if (defined __i386__ || defined __x86_64__) && defined __GNUC__
/* Inline assembler like this works only with GNU C and clang. */
#if (defined __i386__ || defined __x86_64__) && (defined __GNUC__ || defined __clang__)
typedef unsigned short fpucw_t; /* glibc calls this fpu_control_t */

47
gnulib/import/free.c Normal file
View File

@ -0,0 +1,47 @@
/* Make free() preserve errno.
Copyright (C) 2003, 2006, 2009-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* written by Paul Eggert */
#include <config.h>
#include <stdlib.h>
#include <errno.h>
void
rpl_free (void *p)
#undef free
{
#if defined __GNUC__ && !defined __clang__
/* An invalid GCC optimization
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98396>
would optimize away the assignments in the code below, when link-time
optimization (LTO) is enabled. Make the code more complicated, so that
GCC does not grok how to optimize it. */
int err[2];
err[0] = errno;
err[1] = errno;
errno = 0;
free (p);
errno = err[errno == 0];
#else
int err = errno;
free (p);
errno = err;
#endif
}

View File

@ -1,5 +1,5 @@
/* Split a double into fraction and mantissa.
Copyright (C) 2007-2020 Free Software Foundation, Inc.
Copyright (C) 2007-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* Split a 'long double' into fraction and mantissa.
Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* fstat() replacement.
Copyright (C) 2011-2020 Free Software Foundation, Inc.
Copyright (C) 2011-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,6 @@
/* Work around an fstatat bug on Solaris 9.
Copyright (C) 2006, 2009-2020 Free Software Foundation, Inc.
Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2011-2020 Free Software Foundation, Inc.
/* Copyright (C) 2011-2021 Free Software Foundation, Inc.
This file is part of gnulib.
This program is free software: you can redistribute it and/or modify
@ -38,6 +38,10 @@ typedef int dummy;
necessary. */
# undef getcwd
# if defined _WIN32 && !defined __CYGWIN__
# define getcwd _getcwd
# endif
char *
rpl_getcwd (char *buf, size_t size)
{

View File

@ -1,22 +1,29 @@
/* Copyright (C) 1991-1999, 2004-2020 Free Software Foundation, Inc.
/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
You should have received a copy of the GNU General Public
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
#if !_LIBC
# include <config.h>
# include <unistd.h>
# include "pathmax.h"
#else
# define HAVE_OPENAT 1
# define D_INO_IN_DIRENT 1
# define HAVE_MSVC_INVALID_PARAMETER_HANDLER 0
# define HAVE_MINIMALLY_WORKING_GETCWD 0
#endif
#include <errno.h>
@ -65,8 +72,6 @@
# define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
#include "pathmax.h"
/* In this file, PATH_MAX only serves as a threshold for choosing among two
algorithms. */
#ifndef PATH_MAX
@ -84,11 +89,24 @@
#endif
#if !_LIBC
# define __getcwd rpl_getcwd
# define __lstat lstat
# define GETCWD_RETURN_TYPE char *
# define __close_nocancel_nostatus close
# define __getcwd_generic rpl_getcwd
# undef stat64
# define stat64 stat
# define __fstat64 fstat
# define __fstatat64 fstatat
# define __lstat64 lstat
# define __closedir closedir
# define __opendir opendir
# define __readdir readdir
# define __readdir64 readdir
# define __fdopendir fdopendir
# define __openat openat
# define __rewinddir rewinddir
# define __openat64 openat
# define dirent64 dirent
#else
# include <not-cancel.h>
#endif
/* The results of opendir() in this file are not used with dirfd and fchdir,
@ -104,7 +122,7 @@
# undef closedir
#endif
#ifdef _MSC_VER
#if defined _WIN32 && !defined __CYGWIN__
# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
static char *
getcwd_nothrow (char *buf, size_t size)
@ -138,8 +156,8 @@ getcwd_nothrow (char *buf, size_t size)
if BUF is NULL, an array is allocated with 'malloc'; the array is SIZE
bytes long, unless SIZE == 0, in which case it is as big as necessary. */
char *
__getcwd (char *buf, size_t size)
GETCWD_RETURN_TYPE
__getcwd_generic (char *buf, size_t size)
{
/* Lengths of big file name components and entire file names, and a
deep level of file name nesting. These numbers are not upper
@ -167,7 +185,7 @@ __getcwd (char *buf, size_t size)
ino_t rootino, thisino;
char *dir;
register char *dirp;
struct stat st;
struct stat64 st;
size_t allocated = size;
size_t used;
@ -210,7 +228,6 @@ __getcwd (char *buf, size_t size)
return NULL;
# endif
#endif
if (size == 0)
{
if (buf != NULL)
@ -234,19 +251,19 @@ __getcwd (char *buf, size_t size)
dirp = dir + allocated;
*--dirp = '\0';
if (__lstat (".", &st) < 0)
if (__lstat64 (".", &st) < 0)
goto lose;
thisdev = st.st_dev;
thisino = st.st_ino;
if (__lstat ("/", &st) < 0)
if (__lstat64 ("/", &st) < 0)
goto lose;
rootdev = st.st_dev;
rootino = st.st_ino;
while (!(thisdev == rootdev && thisino == rootino))
{
struct dirent *d;
struct dirent64 *d;
dev_t dotdev;
ino_t dotino;
bool mount_point;
@ -257,16 +274,16 @@ __getcwd (char *buf, size_t size)
/* Look at the parent directory. */
#if HAVE_OPENAT_SUPPORT
fd = openat (fd, "..", O_RDONLY);
fd = __openat64 (fd, "..", O_RDONLY);
if (fd < 0)
goto lose;
fd_needs_closing = true;
parent_status = fstat (fd, &st);
parent_status = __fstat64 (fd, &st);
#else
dotlist[dotlen++] = '.';
dotlist[dotlen++] = '.';
dotlist[dotlen] = '\0';
parent_status = __lstat (dotlist, &st);
parent_status = __lstat64 (dotlist, &st);
#endif
if (parent_status != 0)
goto lose;
@ -284,7 +301,7 @@ __getcwd (char *buf, size_t size)
/* Search for the last directory. */
#if HAVE_OPENAT_SUPPORT
dirstream = fdopendir (fd);
dirstream = __fdopendir (fd);
if (dirstream == NULL)
goto lose;
fd_needs_closing = false;
@ -299,7 +316,7 @@ __getcwd (char *buf, size_t size)
/* Clear errno to distinguish EOF from error if readdir returns
NULL. */
__set_errno (0);
d = __readdir (dirstream);
d = __readdir64 (dirstream);
/* When we've iterated through all directory entries without finding
one with a matching d_ino, rewind the stream and consider each
@ -311,8 +328,8 @@ __getcwd (char *buf, size_t size)
if (d == NULL && errno == 0 && use_d_ino)
{
use_d_ino = false;
rewinddir (dirstream);
d = __readdir (dirstream);
__rewinddir (dirstream);
d = __readdir64 (dirstream);
}
if (d == NULL)
@ -338,7 +355,7 @@ __getcwd (char *buf, size_t size)
{
int entry_status;
#if HAVE_OPENAT_SUPPORT
entry_status = fstatat (fd, d->d_name, &st, AT_SYMLINK_NOFOLLOW);
entry_status = __fstatat64 (fd, d->d_name, &st, AT_SYMLINK_NOFOLLOW);
#else
/* Compute size needed for this file name, or for the file
name ".." in the same directory, whichever is larger.
@ -375,7 +392,7 @@ __getcwd (char *buf, size_t size)
}
memcpy (dotlist + dotlen, d->d_name, _D_ALLOC_NAMLEN (d));
entry_status = __lstat (dotlist, &st);
entry_status = __lstat64 (dotlist, &st);
#endif
/* We don't fail here if we cannot stat() a directory entry.
This can happen when (network) file systems fail. If this
@ -461,7 +478,7 @@ __getcwd (char *buf, size_t size)
__closedir (dirstream);
#if HAVE_OPENAT_SUPPORT
if (fd_needs_closing)
close (fd);
__close_nocancel_nostatus (fd);
#else
if (dotlist != dots)
free (dotlist);
@ -473,6 +490,7 @@ __getcwd (char *buf, size_t size)
return NULL;
}
#ifdef weak_alias
#if defined _LIBC && !defined GETCWD_RETURN_TYPE
libc_hidden_def (__getcwd)
weak_alias (__getcwd, getcwd)
#endif

View File

@ -1,5 +1,5 @@
/* getdtablesize() function: Return maximum possible file descriptor value + 1.
Copyright (C) 2008-2020 Free Software Foundation, Inc.
Copyright (C) 2008-2021 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify

View File

@ -1,6 +1,6 @@
/* Provide a working getlogin_r for systems which lack it.
Copyright (C) 2005-2007, 2010-2020 Free Software Foundation, Inc.
Copyright (C) 2005-2007, 2010-2021 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* Program name management.
Copyright (C) 2016-2020 Free Software Foundation, Inc.
Copyright (C) 2016-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -51,7 +51,13 @@
# include <sys/procfs.h>
#endif
#include "dirname.h"
#if defined __SCO_VERSION__ || defined __sysv5__
# include <fcntl.h>
# include <stdlib.h>
# include <string.h>
#endif
#include "basename-lgpl.h"
#ifndef HAVE_GETPROGNAME /* not Mac OS X, FreeBSD, NetBSD, OpenBSD >= 5.4, Cygwin */
char const *
@ -245,6 +251,38 @@ getprogname (void)
}
}
return NULL;
# elif defined __SCO_VERSION__ || defined __sysv5__ /* SCO OpenServer6/UnixWare */
char buf[80];
int fd;
sprintf (buf, "/proc/%d/cmdline", getpid());
fd = open (buf, O_RDONLY);
if (0 <= fd)
{
size_t n = read (fd, buf, 79);
if (n > 0)
{
buf[n] = '\0'; /* Guarantee null-termination */
char *progname;
progname = strrchr (buf, '/');
if (progname)
{
progname = progname + 1; /* Skip the '/' */
}
else
{
progname = buf;
}
char *ret;
ret = malloc (strlen (progname) + 1);
if (ret)
{
strcpy (ret, progname);
return ret;
}
}
close (fd);
}
return "?";
# else
# error "getprogname module not ported to this OS"
# endif

View File

@ -1,5 +1,5 @@
/* Program name management.
Copyright (C) 2016-2020 Free Software Foundation, Inc.
Copyright (C) 2016-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,6 @@
/* Obtain a series of random bytes.
Copyright 2020 Free Software Foundation, Inc.
Copyright 2020-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -32,7 +32,7 @@
# if HAVE_BCRYPT_H
# include <bcrypt.h>
# else
# include <ntdef.h> /* NTSTATUS */
# define NTSTATUS LONG
typedef void * BCRYPT_ALG_HANDLE;
# define BCRYPT_USE_SYSTEM_PREFERRED_RNG 0x00000002
# if HAVE_LIB_BCRYPT

View File

@ -1,5 +1,5 @@
/* Convenience header for conditional use of GNU <libintl.h>.
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2020 Free Software
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2021 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify

View File

@ -1,6 +1,6 @@
/* Provide gettimeofday for systems that don't have it or for which it's broken.
Copyright (C) 2001-2003, 2005-2007, 2009-2020 Free Software Foundation, Inc.
Copyright (C) 2001-2003, 2005-2007, 2009-2021 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -29,8 +29,6 @@
# include <windows.h>
#endif
#include "localtime-buffer.h"
#ifdef WINDOWS_NATIVE
/* Don't assume that UNICODE is not defined. */
@ -123,11 +121,6 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
#else
# if HAVE_GETTIMEOFDAY
# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
/* Save and restore the contents of the buffer used for localtime's
result around the call to gettimeofday. */
struct tm save = *localtime_buffer_addr;
# endif
# if defined timeval /* 'struct timeval' overridden by gnulib? */
# undef timeval
@ -142,10 +135,6 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
int result = gettimeofday (tv, (struct timezone *) tz);
# endif
# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
*localtime_buffer_addr = save;
# endif
return result;
# else

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -59,12 +59,6 @@
# define readdir(str) __readdir64 (str)
# define getpwnam_r(name, bufp, buf, len, res) \
__getpwnam_r (name, bufp, buf, len, res)
# ifndef __lstat64
# define __lstat64(fname, buf) __lxstat64 (_STAT_VER, fname, buf)
# endif
# ifndef __stat64
# define __stat64(fname, buf) __xstat64 (_STAT_VER, fname, buf)
# endif
# define struct_stat64 struct stat64
# define FLEXIBLE_ARRAY_MEMBER
# include <shlib-compat.h>
@ -72,8 +66,8 @@
# define __glob glob
# define __getlogin_r(buf, len) getlogin_r (buf, len)
# define __lstat64(fname, buf) lstat (fname, buf)
# ifdef __MINGW32__
/* Avoid GCC warning. mingw has an unused __stat64 macro. */
# if defined _WIN32 && !defined __CYGWIN__
/* Avoid GCC or clang warning. The original __stat64 macro is unused. */
# undef __stat64
# endif
# define __stat64(fname, buf) stat (fname, buf)
@ -227,7 +221,7 @@ glob_lstat (glob_t *pglob, int flags, const char *fullname)
static bool
size_add_wrapv (size_t a, size_t b, size_t *r)
{
#if 5 <= __GNUC__ && !defined __ICC
#if 7 <= __GNUC__ && !defined __ICC
return __builtin_add_overflow (a, b, r);
#else
*r = a + b;

View File

@ -1,6 +1,6 @@
/* glob.h -- Find a path matching a pattern.
Copyright (C) 2005-2007, 2009-2020 Free Software Foundation, Inc.
Copyright (C) 2005-2007, 2009-2021 Free Software Foundation, Inc.
Written by Derek Price <derek@ximbiot.com> & Paul Eggert <eggert@CS.UCLA.EDU>
@ -45,7 +45,9 @@
'configure' might #define 'restrict' to those words, so pick a
different name. */
#ifndef _Restrict_
# if defined __restrict || 2 < __GNUC__ + (95 <= __GNUC_MINOR__)
# if defined __restrict \
|| 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \
|| __clang_major__ >= 3
# define _Restrict_ __restrict
# elif 199901L <= __STDC_VERSION__ || defined restrict
# define _Restrict_ restrict

View File

@ -1,5 +1,5 @@
/* Shared definition for glob and glob_pattern_p.
Copyright (C) 2017-2020 Free Software Foundation, Inc.
Copyright (C) 2017-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View File

@ -1,5 +1,5 @@
/* Return nonzero if PATTERN contains any metacharacters.
Copyright (C) 2017-2020 Free Software Foundation, Inc.
Copyright (C) 2017-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View File

@ -1,5 +1,5 @@
/* Frees the dynamically allocated storage from an earlier call to glob.
Copyright (C) 2017-2020 Free Software Foundation, Inc.
Copyright (C) 2017-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View File

@ -1,5 +1,5 @@
/* Locking in multithreaded situations.
Copyright (C) 2005-2020 Free Software Foundation, Inc.
Copyright (C) 2005-2021 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* Locking in multithreaded situations.
Copyright (C) 2005-2020 Free Software Foundation, Inc.
Copyright (C) 2005-2021 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* Multithreading primitives.
Copyright (C) 2005-2020 Free Software Foundation, Inc.
Copyright (C) 2005-2021 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -24,11 +24,44 @@
/* Use the POSIX threads library. */
# include <errno.h>
# include <pthread.h>
# include <stdlib.h>
# if PTHREAD_IN_USE_DETECTION_HARD
# if defined __FreeBSD__ || defined __DragonFly__ /* FreeBSD */
/* Test using pthread_key_create. */
int
glthread_in_use (void)
{
static int tested;
static int result; /* 1: linked with -lpthread, 0: only with libc */
if (!tested)
{
pthread_key_t key;
int err = pthread_key_create (&key, NULL);
if (err == ENOSYS)
result = 0;
else
{
result = 1;
if (err == 0)
pthread_key_delete (key);
}
tested = 1;
}
return result;
}
# else /* Solaris, HP-UX */
/* Test using pthread_create. */
/* The function to be executed by a dummy thread. */
static void *
dummy_thread_func (void *arg)
@ -62,6 +95,8 @@ glthread_in_use (void)
return result;
}
# endif
# endif
#endif

View File

@ -1,6 +1,6 @@
/* hard-locale.c -- Determine whether a locale is hard.
Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2020 Free Software
Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2021 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify

View File

@ -1,6 +1,6 @@
/* Determine whether a locale is hard.
Copyright (C) 1999, 2003-2004, 2009-2020 Free Software Foundation, Inc.
Copyright (C) 1999, 2003-2004, 2009-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

114
gnulib/import/idx.h Normal file
View File

@ -0,0 +1,114 @@
/* A type for indices and sizes.
Copyright (C) 2020-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
#ifndef _IDX_H
#define _IDX_H
/* Get ptrdiff_t. */
#include <stddef.h>
/* Get PTRDIFF_MAX. */
#include <stdint.h>
/* The type 'idx_t' holds an (array) index or an (object) size.
Its implementation promotes to a signed integer type,
which can hold the values
0..2^63-1 (on 64-bit platforms) or
0..2^31-1 (on 32-bit platforms).
Why a signed integer type?
* Security: Signed types can be checked for overflow via
'-fsanitize=undefined', but unsigned types cannot.
* Comparisons without surprises: ISO C99 § 6.3.1.8 specifies a few
surprising results for comparisons, such as
(int) -3 < (unsigned long) 7 => false
(int) -3 < (unsigned int) 7 => false
and on 32-bit machines:
(long) -3 < (unsigned int) 7 => false
This is surprising because the natural comparison order is by
value in the realm of infinite-precision signed integers ().
The best way to get rid of such surprises is to use signed types
for numerical integer values, and use unsigned types only for
bit masks and enums.
Why not use 'size_t' directly?
* Because 'size_t' is an unsigned type, and a signed type is better.
See above.
Why not use 'ptrdiff_t' directly?
* Maintainability: When reading and modifying code, it helps to know that
a certain variable cannot have negative values. For example, when you
have a loop
int n = ...;
for (int i = 0; i < n; i++) ...
or
ptrdiff_t n = ...;
for (ptrdiff_t i = 0; i < n; i++) ...
you have to ask yourself "what if n < 0?". Whereas in
idx_t n = ...;
for (idx_t i = 0; i < n; i++) ...
you know that this case cannot happen.
Similarly, when a programmer writes
idx_t = ptr2 - ptr1;
there is an implied assertion that ptr1 and ptr2 point into the same
object and that ptr1 <= ptr2.
* Being future-proof: In the future, range types (integers which are
constrained to a certain range of values) may be added to C compilers
or to the C standard. Several programming languages (Ada, Haskell,
Common Lisp, Pascal) already have range types. Such range types may
help producing good code and good warnings. The type 'idx_t' could
then be typedef'ed to a range type that is signed after promotion. */
/* In the future, idx_t could be typedef'ed to a signed range type.
The clang "extended integer types", supported in Clang 11 or newer
<https://clang.llvm.org/docs/LanguageExtensions.html#extended-integer-types>,
are a special case of range types. However, these types don't support binary
operators with plain integer types (e.g. expressions such as x > 1).
Therefore, they don't behave like signed types (and not like unsigned types
either). So, we cannot use them here. */
/* Use the signed type 'ptrdiff_t'. */
/* Note: ISO C does not mandate that 'size_t' and 'ptrdiff_t' have the same
size, but it is so on all platforms we have seen since 1990. */
typedef ptrdiff_t idx_t;
/* IDX_MAX is the maximum value of an idx_t. */
#define IDX_MAX PTRDIFF_MAX
/* So far no need has been found for an IDX_WIDTH macro.
Perhaps there should be another macro IDX_VALUE_BITS that does not
count the sign bit and is therefore one less than PTRDIFF_WIDTH. */
#endif /* _IDX_H */

View File

@ -1,6 +1,6 @@
/* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form
Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc.
Copyright (C) 2005-2006, 2008-2021 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,6 @@
/* intprops.h -- properties of integer types
Copyright (C) 2001-2020 Free Software Foundation, Inc.
Copyright (C) 2001-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
@ -48,7 +48,7 @@
/* Minimum and maximum values for integer types and expressions. */
/* The width in bits of the integer type or expression T.
Do not evaluate T.
Do not evaluate T. T must not be a bit-field expression.
Padding bits are not supported; this is checked at compile-time below. */
#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
@ -70,7 +70,7 @@
? _GL_SIGNED_INT_MAXIMUM (e) \
: _GL_INT_NEGATE_CONVERT (e, 1))
#define _GL_SIGNED_INT_MAXIMUM(e) \
(((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH ((e) + 0) - 2)) - 1) * 2 + 1)
(((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH (+ (e)) - 2)) - 1) * 2 + 1)
/* Work around OpenVMS incompatibility with C99. */
#if !defined LLONG_MAX && defined __INT64_MAX
@ -86,6 +86,7 @@
/* Does the __typeof__ keyword work? This could be done by
'configure', but for now it's easier to do it by hand. */
#if (2 <= __GNUC__ \
|| (4 <= __clang_major__) \
|| (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
|| (0x5110 <= __SUNPRO_C && !__STDC__))
# define _GL_HAVE___TYPEOF__ 1
@ -94,8 +95,9 @@
#endif
/* Return 1 if the integer type or expression T might be signed. Return 0
if it is definitely unsigned. This macro does not evaluate its argument,
and expands to an integer constant expression. */
if it is definitely unsigned. T must not be a bit-field expression.
This macro does not evaluate its argument, and expands to an
integer constant expression. */
#if _GL_HAVE___TYPEOF__
# define _GL_SIGNED_TYPE_OR_EXPR(t) TYPE_SIGNED (__typeof__ (t))
#else
@ -108,6 +110,8 @@
#define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485)
/* Bound on length of the string representing an integer type or expression T.
T must not be a bit-field expression.
Subtract 1 for the sign bit if T is signed, and then add 1 more for
a minus sign if needed.
@ -119,7 +123,7 @@
+ _GL_SIGNED_TYPE_OR_EXPR (t))
/* Bound on buffer size needed to represent an integer type or expression T,
including the terminating null. */
including the terminating null. T must not be a bit-field expression. */
#define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)
@ -222,7 +226,9 @@
/* True if __builtin_add_overflow (A, B, P) and __builtin_sub_overflow
(A, B, P) work when P is non-null. */
#if 5 <= __GNUC__ && !defined __ICC
/* __builtin_{add,sub}_overflow exists but is not reliable in GCC 5.x and 6.x,
see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98269>. */
#if 7 <= __GNUC__ && !defined __ICC
# define _GL_HAS_BUILTIN_ADD_OVERFLOW 1
#elif defined __has_builtin
# define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow)
@ -239,8 +245,18 @@
#endif
/* True if __builtin_add_overflow_p (A, B, C) works, and similarly for
__builtin_mul_overflow_p and __builtin_mul_overflow_p. */
#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
__builtin_sub_overflow_p and __builtin_mul_overflow_p. */
#if defined __clang__ || defined __ICC
/* Clang 11 lacks __builtin_mul_overflow_p, and even if it did it
would presumably run afoul of Clang bug 16404. ICC 2021.1's
__builtin_add_overflow_p etc. are not treated as integral constant
expressions even when all arguments are. */
# define _GL_HAS_BUILTIN_OVERFLOW_P 0
#elif defined __has_builtin
# define _GL_HAS_BUILTIN_OVERFLOW_P __has_builtin (__builtin_mul_overflow_p)
#else
# define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
#endif
/* The _GL*_OVERFLOW macros have the same restrictions as the
*_RANGE_OVERFLOW macros, except that they do not assume that operands
@ -373,8 +389,9 @@
_GL_INT_OP_WRAPV (a, b, r, -, _GL_INT_SUBTRACT_RANGE_OVERFLOW)
#endif
#if _GL_HAS_BUILTIN_MUL_OVERFLOW
# if (9 < __GNUC__ + (3 <= __GNUC_MINOR__) \
|| (__GNUC__ == 8 && 4 <= __GNUC_MINOR__))
# if ((9 < __GNUC__ + (3 <= __GNUC_MINOR__) \
|| (__GNUC__ == 8 && 4 <= __GNUC_MINOR__)) \
&& !defined __ICC)
# define INT_MULTIPLY_WRAPV(a, b, r) __builtin_mul_overflow (a, b, r)
# else
/* Work around GCC bug 91450. */
@ -395,7 +412,7 @@
For now, assume all versions of GCC-like compilers generate bogus
warnings for _Generic. This matters only for compilers that
lack relevant builtins. */
#if __GNUC__
#if __GNUC__ || defined __clang__
# define _GL__GENERIC_BOGUS 1
#else
# define _GL__GENERIC_BOGUS 0
@ -565,7 +582,7 @@
? (EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \
? (a) < (tmax) / (b) \
: ((INT_NEGATE_OVERFLOW (b) \
? _GL_INT_CONVERT (b, tmax) >> (TYPE_WIDTH (b) - 1) \
? _GL_INT_CONVERT (b, tmax) >> (TYPE_WIDTH (+ (b)) - 1) \
: (tmax) / -(b)) \
<= -1 - (a))) \
: INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (b, tmin)) && (b) == -1 \
@ -581,4 +598,33 @@
: (tmin) / (a) < (b)) \
: (tmax) / (b) < (a)))
/* The following macros compute A + B, A - B, and A * B, respectively.
If no overflow occurs, they set *R to the result and return 1;
otherwise, they return 0 and may modify *R.
Example usage:
long int result;
if (INT_ADD_OK (a, b, &result))
printf ("result is %ld\n", result);
else
printf ("overflow\n");
A, B, and *R should be integers; they need not be the same type,
and they need not be all signed or all unsigned.
These macros work correctly on all known practical hosts, and do not rely
on undefined behavior due to signed arithmetic overflow.
These macros are not constant expressions.
These macros may evaluate their arguments zero or multiple times, so the
arguments should not have side effects.
These macros are tuned for B being a constant. */
#define INT_ADD_OK(a, b, r) ! INT_ADD_WRAPV (a, b, r)
#define INT_SUBTRACT_OK(a, b, r) ! INT_SUBTRACT_WRAPV (a, b, r)
#define INT_MULTIPLY_OK(a, b, r) ! INT_MULTIPLY_WRAPV (a, b, r)
#endif /* _GL_INTPROPS_H */

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/* Test whether a character is a blank.
Copyright (C) 2009-2020 Free Software Foundation, Inc.
Copyright (C) 2009-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

Some files were not shown because too many files have changed in this diff Show More