From a1b558a2e24d71ff6634a0ff50d46380c162c961 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 7 Jan 2023 15:08:45 -0800 Subject: [PATCH] Update from Gnulib by running admin/merge-gnulib --- lib/filename.h | 2 +- lib/gnulib.mk.in | 7 ++++++- lib/malloc/scratch_buffer.h | 2 +- lib/malloc/scratch_buffer_grow.c | 2 +- lib/malloc/scratch_buffer_grow_preserve.c | 2 +- lib/malloc/scratch_buffer_set_array_size.c | 2 +- lib/mktime-internal.h | 2 +- lib/mktime.c | 2 +- lib/regex.c | 2 +- lib/regex.h | 2 +- lib/timegm.c | 2 +- m4/acl.m4 | 6 +----- m4/clock_time.m4 | 15 +++++++++------ m4/euidaccess.m4 | 11 +++++++---- m4/getrandom.m4 | 11 +++++++---- m4/nanosleep.m4 | 12 ++++++++---- m4/pthread_sigmask.m4 | 15 +++++++++------ m4/timer_time.m4 | 15 +++++++++------ 18 files changed, 66 insertions(+), 46 deletions(-) diff --git a/lib/filename.h b/lib/filename.h index ab77ca2df91..a2400a9dfe3 100644 --- a/lib/filename.h +++ b/lib/filename.h @@ -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 diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index 0b4e0458a3c..2ebf187e867 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in @@ -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@ diff --git a/lib/malloc/scratch_buffer.h b/lib/malloc/scratch_buffer.h index a9bdcadec21..33fd2b29cd5 100644 --- a/lib/malloc/scratch_buffer.h +++ b/lib/malloc/scratch_buffer.h @@ -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 diff --git a/lib/malloc/scratch_buffer_grow.c b/lib/malloc/scratch_buffer_grow.c index 9a5e4dbb1eb..a5e8f2f7230 100644 --- a/lib/malloc/scratch_buffer_grow.c +++ b/lib/malloc/scratch_buffer_grow.c @@ -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 diff --git a/lib/malloc/scratch_buffer_grow_preserve.c b/lib/malloc/scratch_buffer_grow_preserve.c index 3fe5a0720ec..c0b5d87b7e4 100644 --- a/lib/malloc/scratch_buffer_grow_preserve.c +++ b/lib/malloc/scratch_buffer_grow_preserve.c @@ -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 diff --git a/lib/malloc/scratch_buffer_set_array_size.c b/lib/malloc/scratch_buffer_set_array_size.c index 89c37a950e9..24c39350ade 100644 --- a/lib/malloc/scratch_buffer_set_array_size.c +++ b/lib/malloc/scratch_buffer_set_array_size.c @@ -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 diff --git a/lib/mktime-internal.h b/lib/mktime-internal.h index 170764eabc8..709c36bdf56 100644 --- a/lib/mktime-internal.h +++ b/lib/mktime-internal.h @@ -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 . diff --git a/lib/mktime.c b/lib/mktime.c index 7dc9d67ef9d..94a4320e6ca 100644 --- a/lib/mktime.c +++ b/lib/mktime.c @@ -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 . diff --git a/lib/regex.c b/lib/regex.c index ff1176782e4..3beb0deb987 100644 --- a/lib/regex.c +++ b/lib/regex.c @@ -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 . diff --git a/lib/regex.h b/lib/regex.h index a7e0bd02757..9ef0252ffff 100644 --- a/lib/regex.h +++ b/lib/regex.h @@ -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 diff --git a/lib/timegm.c b/lib/timegm.c index a1b19efc392..b47025a0545 100644 --- a/lib/timegm.c +++ b/lib/timegm.c @@ -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 diff --git a/m4/acl.m4 b/m4/acl.m4 index 6c2db7d3203..e612f1ae34b 100644 --- a/m4/acl.m4 +++ b/m4/acl.m4 @@ -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]) ]) diff --git a/m4/clock_time.m4 b/m4/clock_time.m4 index 411e0710e7f..d624a73d35d 100644 --- a/m4/clock_time.m4 +++ b/m4/clock_time.m4 @@ -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]) ]) diff --git a/m4/euidaccess.m4 b/m4/euidaccess.m4 index 0dc757820ee..f0eb5bde84a 100644 --- a/m4/euidaccess.m4 +++ b/m4/euidaccess.m4 @@ -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]) ]) diff --git a/m4/getrandom.m4 b/m4/getrandom.m4 index f2010c0213f..c508f1a55c3 100644 --- a/m4/getrandom.m4 +++ b/m4/getrandom.m4 @@ -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]) ]) diff --git a/m4/nanosleep.m4 b/m4/nanosleep.m4 index 21ee5a21daf..e21a3e343cb 100644 --- a/m4/nanosleep.m4 +++ b/m4/nanosleep.m4 @@ -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]) ]) diff --git a/m4/pthread_sigmask.m4 b/m4/pthread_sigmask.m4 index 5110668155e..27795282bee 100644 --- a/m4/pthread_sigmask.m4 +++ b/m4/pthread_sigmask.m4 @@ -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 @@ -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 diff --git a/m4/timer_time.m4 b/m4/timer_time.m4 index 4c2608b58e8..437d1dc5428 100644 --- a/m4/timer_time.m4 +++ b/m4/timer_time.m4 @@ -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 ]]) - 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]) ])