Update from Gnulib by running admin/merge-gnulib

This commit is contained in:
Paul Eggert 2023-01-07 15:08:45 -08:00
parent 0be40fbe43
commit a1b558a2e2
18 changed files with 66 additions and 46 deletions

View file

@ -1,5 +1,5 @@
/* Basic filename support macros.
Copyright (C) 2001-2022 Free Software Foundation, Inc.
Copyright (C) 2001-2023 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

@ -204,6 +204,7 @@ CFLAGS_SOUND = @CFLAGS_SOUND@
CHECK_STRUCTS = @CHECK_STRUCTS@
CLIENTRES = @CLIENTRES@
CLIENTW = @CLIENTW@
CLOCK_TIME_LIB = @CLOCK_TIME_LIB@
CM_OBJ = @CM_OBJ@
COM_ERRLIB = @COM_ERRLIB@
CPP = @CPP@
@ -238,6 +239,7 @@ ENOLINK_VALUE = @ENOLINK_VALUE@
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
ERRNO_H = @ERRNO_H@
EUIDACCESS_LIBGEN = @EUIDACCESS_LIBGEN@
EXECINFO_H = @EXECINFO_H@
EXEEXT = @EXEEXT@
FILE_HAS_ACL_LIB = @FILE_HAS_ACL_LIB@
@ -254,6 +256,7 @@ GETADDRINFO_A_LIBS = @GETADDRINFO_A_LIBS@
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
GETOPT_H = @GETOPT_H@
GETRANDOM_LIB = @GETRANDOM_LIB@
GFILENOTIFY_CFLAGS = @GFILENOTIFY_CFLAGS@
GFILENOTIFY_LIBS = @GFILENOTIFY_LIBS@
GL_CFLAG_ALLOW_WARNINGS = @GL_CFLAG_ALLOW_WARNINGS@
@ -940,7 +943,6 @@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_EACCESS = @LIB_EACCESS@
LIB_EXECINFO = @LIB_EXECINFO@
LIB_GETRANDOM = @LIB_GETRANDOM@
LIB_HAS_ACL = @LIB_HAS_ACL@
LIB_MATH = @LIB_MATH@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
LIB_PTHREAD = @LIB_PTHREAD@
@ -960,6 +962,7 @@ MKDIR_P = @MKDIR_P@
MODULES_OBJ = @MODULES_OBJ@
MODULES_SECONDARY_SUFFIX = @MODULES_SECONDARY_SUFFIX@
MODULES_SUFFIX = @MODULES_SUFFIX@
NANOSLEEP_LIB = @NANOSLEEP_LIB@
NATIVE_COMPILATION_AOT = @NATIVE_COMPILATION_AOT@
NEXT_ASSERT_H = @NEXT_ASSERT_H@
NEXT_AS_FIRST_DIRECTIVE_ASSERT_H = @NEXT_AS_FIRST_DIRECTIVE_ASSERT_H@
@ -1036,6 +1039,7 @@ PRE_ALLOC_OBJ = @PRE_ALLOC_OBJ@
PRIPTR_PREFIX = @PRIPTR_PREFIX@
PROFILING_CFLAGS = @PROFILING_CFLAGS@
PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
PTHREAD_SIGMASK_LIB = @PTHREAD_SIGMASK_LIB@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RALLOC_OBJ = @RALLOC_OBJ@
RANLIB = @RANLIB@
@ -1223,6 +1227,7 @@ SUBDIR_MAKEFILES_IN = @SUBDIR_MAKEFILES_IN@
SYSTEM_TYPE = @SYSTEM_TYPE@
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
TERMCAP_OBJ = @TERMCAP_OBJ@
TIMER_TIME_LIB = @TIMER_TIME_LIB@
TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
TIME_H_DEFINES_TIME_UTC = @TIME_H_DEFINES_TIME_UTC@
TOOLKIT_LIBW = @TOOLKIT_LIBW@

View file

@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
Copyright (C) 2015-2022 Free Software Foundation, Inc.
Copyright (C) 2015-2023 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 @@
/* Variable-sized buffer with on-stack default allocation.
Copyright (C) 2015-2022 Free Software Foundation, Inc.
Copyright (C) 2015-2023 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 @@
/* Variable-sized buffer with on-stack default allocation.
Copyright (C) 2015-2022 Free Software Foundation, Inc.
Copyright (C) 2015-2023 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 @@
/* Variable-sized buffer with on-stack default allocation.
Copyright (C) 2015-2022 Free Software Foundation, Inc.
Copyright (C) 2015-2023 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 @@
/* Internals of mktime and related functions
Copyright 2016-2022 Free Software Foundation, Inc.
Copyright 2016-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Paul Eggert <eggert@cs.ucla.edu>.

View file

@ -1,5 +1,5 @@
/* Convert a 'struct tm' to a time_t value.
Copyright (C) 1993-2022 Free Software Foundation, Inc.
Copyright (C) 1993-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Paul Eggert <eggert@twinsun.com>.

View file

@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
Copyright (C) 2002-2022 Free Software Foundation, Inc.
Copyright (C) 2002-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.

View file

@ -1,6 +1,6 @@
/* Definitions for data structures and routines for the regular
expression library.
Copyright (C) 1985, 1989-2022 Free Software Foundation, Inc.
Copyright (C) 1985, 1989-2023 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,6 +1,6 @@
/* Convert UTC calendar time to simple time. Like mktime but assumes UTC.
Copyright (C) 1994-2022 Free Software Foundation, Inc.
Copyright (C) 1994-2023 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 @@
# acl.m4 - check for access control list (ACL) primitives
# serial 25
# serial 26
# Copyright (C) 2002, 2004-2023 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@ -141,7 +141,6 @@ int type = ACL_TYPE_EXTENDED;]])],
fi
if test -n "$gl_need_lib_has_acl"; then
FILE_HAS_ACL_LIB=$LIB_ACL
LIB_HAS_ACL="$FILE_HAS_ACL_LIB"
fi
AC_SUBST([LIB_ACL])
AC_DEFINE_UNQUOTED([USE_ACL], [$use_acl],
@ -211,7 +210,4 @@ AC_DEFUN([gl_FILE_HAS_ACL],
FILE_HAS_ACL_LIB=$LIB_ACL
fi
AC_SUBST([FILE_HAS_ACL_LIB])
dnl For backward compatibility (e.g. coreutils still uses LIB_HAS_ACL).
LIB_HAS_ACL="$FILE_HAS_ACL_LIB"
AC_SUBST([LIB_HAS_ACL])
])

View file

@ -1,14 +1,14 @@
# clock_time.m4 serial 11
# clock_time.m4 serial 12
dnl Copyright (C) 2002-2006, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Check for clock_getres, clock_gettime and clock_settime,
# and set LIB_CLOCK_GETTIME.
# and set CLOCK_TIME_LIB.
# For a program named, say foo, you should add a line like the following
# in the corresponding Makefile.am file:
# foo_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME)
# foo_LDADD = $(LDADD) $(CLOCK_TIME_LIB)
AC_DEFUN([gl_CLOCK_TIME],
[
@ -21,12 +21,15 @@ AC_DEFUN([gl_CLOCK_TIME],
# Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
# programs in the package would end up linked with that potentially-shared
# library, inducing unnecessary run-time overhead.
LIB_CLOCK_GETTIME=
AC_SUBST([LIB_CLOCK_GETTIME])
CLOCK_TIME_LIB=
AC_SUBST([CLOCK_TIME_LIB])
gl_saved_libs=$LIBS
AC_SEARCH_LIBS([clock_gettime], [rt posix4],
[test "$ac_cv_search_clock_gettime" = "none required" ||
LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
CLOCK_TIME_LIB=$ac_cv_search_clock_gettime])
AC_CHECK_FUNCS([clock_getres clock_gettime clock_settime])
LIBS=$gl_saved_libs
# For backward compatibility.
LIB_CLOCK_GETTIME="$CLOCK_TIME_LIB"
AC_SUBST([LIB_CLOCK_GETTIME])
])

View file

@ -1,4 +1,4 @@
# euidaccess.m4 serial 15
# euidaccess.m4 serial 16
dnl Copyright (C) 2002-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -41,12 +41,15 @@ AC_DEFUN([gl_PREREQ_EUIDACCESS], [
# Save and restore LIBS so -lgen isn't added to it. Otherwise, *all*
# programs in the package would end up linked with that potentially-shared
# library, inducing unnecessary run-time overhead.
LIB_EACCESS=
AC_SUBST([LIB_EACCESS])
EUIDACCESS_LIBGEN=
AC_SUBST([EUIDACCESS_LIBGEN])
gl_saved_libs=$LIBS
AC_SEARCH_LIBS([eaccess], [gen],
[test "$ac_cv_search_eaccess" = "none required" ||
LIB_EACCESS=$ac_cv_search_eaccess])
EUIDACCESS_LIBGEN=$ac_cv_search_eaccess])
AC_CHECK_FUNCS([eaccess])
LIBS=$gl_saved_libs
# For backward compatibility.
LIB_EACCESS="$EUIDACCESS_LIBGEN"
AC_SUBST([LIB_EACCESS])
])

View file

@ -1,4 +1,4 @@
# getrandom.m4 serial 9
# getrandom.m4 serial 10
dnl Copyright 2020-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -62,13 +62,16 @@ AC_DEFUN([gl_FUNC_GETRANDOM],
if test $gl_cv_lib_assume_bcrypt = yes; then
AC_DEFINE([HAVE_LIB_BCRYPT], [1],
[Define to 1 if the bcrypt library is guaranteed to be present.])
LIB_GETRANDOM='-lbcrypt'
GETRANDOM_LIB='-lbcrypt'
else
LIB_GETRANDOM='-ladvapi32'
GETRANDOM_LIB='-ladvapi32'
fi
;;
*)
LIB_GETRANDOM= ;;
GETRANDOM_LIB= ;;
esac
AC_SUBST([GETRANDOM_LIB])
dnl For backward compatibility.
LIB_GETRANDOM="$GETRANDOM_LIB"
AC_SUBST([LIB_GETRANDOM])
])

View file

@ -1,4 +1,4 @@
# serial 42
# serial 43
dnl From Jim Meyering.
dnl Check for the nanosleep function.
@ -25,11 +25,11 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
# Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
LIB_NANOSLEEP=
AC_SUBST([LIB_NANOSLEEP])
NANOSLEEP_LIB=
AC_SUBST([NANOSLEEP_LIB])
AC_SEARCH_LIBS([nanosleep], [rt posix4],
[test "$ac_cv_search_nanosleep" = "none required" ||
LIB_NANOSLEEP=$ac_cv_search_nanosleep])
NANOSLEEP_LIB=$ac_cv_search_nanosleep])
if test "x$ac_cv_search_nanosleep" != xno; then
dnl The system has a nanosleep function.
@ -143,4 +143,8 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
HAVE_NANOSLEEP=0
fi
LIBS=$nanosleep_save_libs
# For backward compatibility.
LIB_NANOSLEEP="$NANOSLEEP_LIB"
AC_SUBST([LIB_NANOSLEEP])
])

View file

@ -1,4 +1,4 @@
# pthread_sigmask.m4 serial 21
# pthread_sigmask.m4 serial 22
dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -24,7 +24,7 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
[gl_cv_func_pthread_sigmask_macro=no])
])
LIB_PTHREAD_SIGMASK=
PTHREAD_SIGMASK_LIB=
if test $gl_cv_func_pthread_sigmask_macro = yes; then
dnl pthread_sigmask is a dummy macro.
@ -62,7 +62,7 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
])
if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
dnl pthread_sigmask is available with -pthread or -lpthread.
LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
PTHREAD_SIGMASK_LIB="$LIBMULTITHREAD"
else
dnl pthread_sigmask is not available at all.
HAVE_PTHREAD_SIGMASK=0
@ -101,6 +101,9 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
])
fi
AC_SUBST([PTHREAD_SIGMASK_LIB])
dnl For backward compatibility.
LIB_PTHREAD_SIGMASK="$PTHREAD_SIGMASK_LIB"
AC_SUBST([LIB_PTHREAD_SIGMASK])
dnl We don't need a variable LTLIB_PTHREAD_SIGMASK, because when
dnl "$gl_threads_api" = posix, $LTLIBMULTITHREAD and $LIBMULTITHREAD are the
@ -114,7 +117,7 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
dnl On FreeBSD 13.0, MidnightBSD 1.1, HP-UX 11.31, Solaris 9, in programs
dnl that are not linked with -lpthread, the pthread_sigmask() function
dnl always returns 0 and has no effect.
if test -z "$LIB_PTHREAD_SIGMASK"; then
if test -z "$PTHREAD_SIGMASK_LIB"; then
case " $LIBS " in
*' -pthread '*) ;;
*' -lpthread '*) ;;
@ -162,7 +165,7 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
[gl_cv_func_pthread_sigmask_return_works],
[
gl_save_LIBS="$LIBS"
LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
LIBS="$LIBS $PTHREAD_SIGMASK_LIB"
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <pthread.h>
@ -208,7 +211,7 @@ int main ()
gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
esac
m4_ifdef([gl_][THREADLIB],
[dnl Link against $LIBMULTITHREAD, not only $LIB_PTHREAD_SIGMASK.
[dnl Link against $LIBMULTITHREAD, not only $PTHREAD_SIGMASK_LIB.
dnl Otherwise we get a false positive on those platforms where
dnl $gl_cv_func_pthread_sigmask_in_libc_works is "no".
gl_save_LIBS=$LIBS

View file

@ -1,10 +1,10 @@
# timer_time.m4 serial 5
# timer_time.m4 serial 6
dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Check for timer_settime, and set LIB_TIMER_TIME.
# Check for timer_settime, and set TIMER_TIME_LIB.
AC_DEFUN([gl_TIMER_TIME],
[
@ -21,13 +21,13 @@ AC_DEFUN([gl_TIMER_TIME],
AC_CHECK_DECL([timer_settime], [], [],
[[#include <time.h>
]])
LIB_TIMER_TIME=
AC_SUBST([LIB_TIMER_TIME])
TIMER_TIME_LIB=
AC_SUBST([TIMER_TIME_LIB])
AS_IF([test "$ac_cv_have_decl_timer_settime" = yes], [
gl_saved_libs=$LIBS
AC_SEARCH_LIBS([timer_settime], [rt posix4],
[test "$ac_cv_search_timer_settime" = "none required" ||
LIB_TIMER_TIME=$ac_cv_search_timer_settime])
TIMER_TIME_LIB=$ac_cv_search_timer_settime])
m4_ifdef([gl_][PTHREADLIB],
[dnl GLIBC uses threads to emulate posix timers when kernel support
dnl is not available (like Linux < 2.6 or when used with kFreeBSD)
@ -42,8 +42,11 @@ AC_DEFUN([gl_TIMER_TIME],
#endif
#endif
],
[LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBPMULTITHREAD"])])
[TIMER_TIME_LIB="$TIMER_TIME_LIB $LIBPMULTITHREAD"])])
AC_CHECK_FUNCS([timer_settime])
LIBS=$gl_saved_libs
])
dnl For backward compatibility.
LIB_TIMER_TIME="$TIMER_TIME_LIB"
AC_SUBST([LIB_TIMER_TIME])
])