summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2020-12-25 02:33:29 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2020-12-25 02:36:03 -0800
commit42d58264db165d265cba68d6dbebc53a50738355 (patch)
tree87543f2f0992a6b57a34dbd6ee04f48c3f6e7486 /m4
parent5880c7caab394eac55c44d4be42b2f45dbd9bc53 (diff)
downloademacs-42d58264db165d265cba68d6dbebc53a50738355.tar.gz
Update Gnulib.
All changes in this commit are autogenerated by running admin/merge-gnulib.
Diffstat (limited to 'm4')
-rw-r--r--m4/canonicalize.m410
-rw-r--r--m4/faccessat.m433
-rw-r--r--m4/gnulib-comp.m432
3 files changed, 54 insertions, 21 deletions
diff --git a/m4/canonicalize.m4 b/m4/canonicalize.m4
index 14ea3e12fa0..c8da4dfcb6b 100644
--- a/m4/canonicalize.m4
+++ b/m4/canonicalize.m4
@@ -1,4 +1,4 @@
-# canonicalize.m4 serial 33
+# canonicalize.m4 serial 34
dnl Copyright (C) 2003-2007, 2009-2020 Free Software Foundation, Inc.
@@ -11,7 +11,9 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_CANONICALIZE_FILENAME_MODE],
[
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
- AC_CHECK_FUNCS_ONCE([canonicalize_file_name])
+ AC_REQUIRE([gl_FUNC_FACCESSAT_EOVERFLOW])
+ AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
+ AC_CHECK_FUNCS_ONCE([canonicalize_file_name faccessat])
AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
AC_REQUIRE([gl_FUNC_REALPATH_WORKS])
if test $ac_cv_func_canonicalize_file_name = no; then
@@ -56,7 +58,9 @@ AC_DEFUN([gl_CANONICALIZE_LGPL],
AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE],
[
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
- AC_CHECK_FUNCS_ONCE([canonicalize_file_name readlink])
+ AC_REQUIRE([gl_FUNC_FACCESSAT_EOVERFLOW])
+ AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
+ AC_CHECK_FUNCS_ONCE([canonicalize_file_name faccessat])
dnl On native Windows, we use _getcwd(), regardless whether getcwd() is
dnl available through the linker option '-loldnames'.
diff --git a/m4/faccessat.m4 b/m4/faccessat.m4
index 7a8b979f8db..a4ad31a469b 100644
--- a/m4/faccessat.m4
+++ b/m4/faccessat.m4
@@ -1,4 +1,4 @@
-# serial 8
+# serial 9
# See if we need to provide faccessat replacement.
dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
@@ -8,6 +8,31 @@ dnl with or without modifications, as long as this notice is preserved.
# Written by Eric Blake.
+AC_DEFUN([gl_FUNC_FACCESSAT_EOVERFLOW],
+[
+ AC_CHECK_FUNCS_ONCE([faccessat])
+ if test "$ac_cv_func_faccessat" = yes; then
+ AC_CACHE_CHECK([whether faccessat works when stat would EOVERFLOW],
+ [gl_cv_func_faccessat_never_eoverflows],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([],
+ [[#ifdef __linux__
+ #include <linux/version.h>
+ #if (! (KERNEL_VERSION (5, 8, 0) <= LINUX_VERSION_CODE \
+ && 2 < (__GLIBC__ + (33 <= __GLIBC_MINOR__))))
+ #error "faccessat might fail with EOVERFLOW"
+ #endif
+ #endif
+ ]])],
+ [gl_cv_func_faccessat_never_eoverflows=yes],
+ [gl_cv_func_faccessat_never_eoverflows=no])])
+ if test "$gl_cv_func_faccessat_never_eoverflows" = yes; then
+ AC_DEFINE([FACCESSAT_NEVER_EOVERFLOWS], 1,
+ [Define to 1 if faccessat is EOVERFLOW-free.])
+ fi
+ fi
+])
+
AC_DEFUN([gl_FUNC_FACCESSAT],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
@@ -16,12 +41,14 @@ AC_DEFUN([gl_FUNC_FACCESSAT],
dnl Persuade glibc <unistd.h> to declare faccessat().
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([gl_FUNC_FACCESSAT_EOVERFLOW])
+
AC_CHECK_FUNCS_ONCE([faccessat])
if test $ac_cv_func_faccessat = no; then
HAVE_FACCESSAT=0
else
- case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
- *yes) ;;
+ case $gl_cv_func_lstat_dereferences_slashed_symlink,$gl_cv_func_faccessat_never_eoverflows in
+ *yes,*yes) ;;
*) REPLACE_FACCESSAT=1 ;;
esac
fi
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index beb9817d266..0971636c33d 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -75,6 +75,7 @@ AC_DEFUN([gl_EARLY],
# Code from module dtoastr:
# Code from module dtotimespec:
# Code from module dup2:
+ # Code from module eloop-threshold:
# Code from module environ:
# Code from module errno:
# Code from module euidaccess:
@@ -291,6 +292,12 @@ AC_DEFUN([gl_INIT],
if test $gl_cv_func___fpending = no; then
AC_LIBOBJ([fpending])
fi
+ gl_FUNC_FREE
+ if test $REPLACE_FREE = 1; then
+ AC_LIBOBJ([free])
+ gl_PREREQ_FREE
+ fi
+ gl_STDLIB_MODULE_INDICATOR([free-posix])
gl_FUNC_FSTATAT
if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
AC_LIBOBJ([fstatat])
@@ -510,8 +517,8 @@ AC_DEFUN([gl_INIT],
gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false
gl_gnulib_enabled_cloexec=false
gl_gnulib_enabled_dirfd=false
+ gl_gnulib_enabled_925677f0343de64b89a9f0c790b4104c=false
gl_gnulib_enabled_euidaccess=false
- gl_gnulib_enabled_ef07dc4b3077c11ea9cef586db4e5955=false
gl_gnulib_enabled_getdtablesize=false
gl_gnulib_enabled_getgroups=false
gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
@@ -557,6 +564,12 @@ AC_DEFUN([gl_INIT],
gl_gnulib_enabled_dirfd=true
fi
}
+ func_gl_gnulib_m4code_925677f0343de64b89a9f0c790b4104c ()
+ {
+ if ! $gl_gnulib_enabled_925677f0343de64b89a9f0c790b4104c; then
+ gl_gnulib_enabled_925677f0343de64b89a9f0c790b4104c=true
+ fi
+ }
func_gl_gnulib_m4code_euidaccess ()
{
if ! $gl_gnulib_enabled_euidaccess; then
@@ -573,18 +586,6 @@ AC_DEFUN([gl_INIT],
func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c
fi
}
- func_gl_gnulib_m4code_ef07dc4b3077c11ea9cef586db4e5955 ()
- {
- if ! $gl_gnulib_enabled_ef07dc4b3077c11ea9cef586db4e5955; then
- gl_FUNC_FREE
- if test $REPLACE_FREE = 1; then
- AC_LIBOBJ([free])
- gl_PREREQ_FREE
- fi
- gl_STDLIB_MODULE_INDICATOR([free-posix])
- gl_gnulib_enabled_ef07dc4b3077c11ea9cef586db4e5955=true
- fi
- }
func_gl_gnulib_m4code_getdtablesize ()
{
if ! $gl_gnulib_enabled_getdtablesize; then
@@ -734,7 +735,7 @@ AC_DEFUN([gl_INIT],
fi
}
if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
- func_gl_gnulib_m4code_ef07dc4b3077c11ea9cef586db4e5955
+ func_gl_gnulib_m4code_925677f0343de64b89a9f0c790b4104c
fi
if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
func_gl_gnulib_m4code_idx
@@ -818,8 +819,8 @@ AC_DEFUN([gl_INIT],
AM_CONDITIONAL([gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b], [$gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b])
AM_CONDITIONAL([gl_GNULIB_ENABLED_cloexec], [$gl_gnulib_enabled_cloexec])
AM_CONDITIONAL([gl_GNULIB_ENABLED_dirfd], [$gl_gnulib_enabled_dirfd])
+ AM_CONDITIONAL([gl_GNULIB_ENABLED_925677f0343de64b89a9f0c790b4104c], [$gl_gnulib_enabled_925677f0343de64b89a9f0c790b4104c])
AM_CONDITIONAL([gl_GNULIB_ENABLED_euidaccess], [$gl_gnulib_enabled_euidaccess])
- AM_CONDITIONAL([gl_GNULIB_ENABLED_ef07dc4b3077c11ea9cef586db4e5955], [$gl_gnulib_enabled_ef07dc4b3077c11ea9cef586db4e5955])
AM_CONDITIONAL([gl_GNULIB_ENABLED_getdtablesize], [$gl_gnulib_enabled_getdtablesize])
AM_CONDITIONAL([gl_GNULIB_ENABLED_getgroups], [$gl_gnulib_enabled_getgroups])
AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], [$gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36])
@@ -1020,6 +1021,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/dtoastr.c
lib/dtotimespec.c
lib/dup2.c
+ lib/eloop-threshold.h
lib/errno.in.h
lib/euidaccess.c
lib/execinfo.c