summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-09-22 23:50:59 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-09-22 23:51:44 -0700
commit78669517dc3db4d6d51fb26d71073fc0c196ab5d (patch)
treea3dff006cf177da51fd6458203d8e4751e36e78b /m4
parenta33cda168e35cb93cdf115f7d12765f590226601 (diff)
downloademacs-78669517dc3db4d6d51fb26d71073fc0c196ab5d.tar.gz
Update from Gnulib
This incorporates: 2019-09-22 Update some URLs 2019-09-15 fcntl-h: fix compilation error of creat.c on MSVC 2019-09-15 creat: new module 2019-09-15 access: new module 2019-09-09 Add option to assume best, not worst, when cross-compiling. * build-aux/config.guess, build-aux/config.sub, doc/misc/texinfo.tex: * lib/careadlinkat.c, lib/careadlinkat.h, lib/count-leading-zeros.h: * lib/count-trailing-zeros.h, lib/diffseq.h, lib/fcntl.in.h: * lib/ftoastr.c, lib/get-permissions.c: * lib/ieee754.in.h, lib/inttypes.in.h, lib/mktime.c, lib/open.c: * lib/pathmax.h, lib/pipe2.c, lib/stddef.in.h, lib/stdint.in.h: * lib/stdlib.in.h, lib/str-two-way.h, lib/string.in.h, lib/time.in.h: * lib/timegm.c, lib/unistd.in.h, m4/canonicalize.m4: * m4/extern-inline.m4, m4/fcntl_h.m4, m4/fdopendir.m4: * m4/getgroups.m4, m4/getopt.m4, m4/gettimeofday.m4: * m4/gnulib-common.m4, m4/largefile.m4: * m4/lstat.m4, m4/memmem.m4, m4/mktime.m4, m4/nocrash.m4, m4/open.m4: * m4/pselect.m4, m4/putenv.m4, m4/readlink.m4, m4/regex.m4: * m4/symlink.m4, m4/unistd_h.m4, m4/utimens.m4, m4/utimes.m4: Copy from Gnulib. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * m4/open-slash.m4: New file, copied from Gnulib.
Diffstat (limited to 'm4')
-rw-r--r--m4/canonicalize.m46
-rw-r--r--m4/extern-inline.m42
-rw-r--r--m4/fcntl_h.m44
-rw-r--r--m4/fdopendir.m46
-rw-r--r--m4/getgroups.m414
-rw-r--r--m4/getopt.m48
-rw-r--r--m4/gettimeofday.m46
-rw-r--r--m4/gnulib-common.m431
-rw-r--r--m4/gnulib-comp.m41
-rw-r--r--m4/largefile.m42
-rw-r--r--m4/lstat.m46
-rw-r--r--m4/memmem.m46
-rw-r--r--m4/mktime.m44
-rw-r--r--m4/nocrash.m44
-rw-r--r--m4/open-slash.m459
-rw-r--r--m4/open.m441
-rw-r--r--m4/pselect.m46
-rw-r--r--m4/putenv.m46
-rw-r--r--m4/readlink.m46
-rw-r--r--m4/regex.m46
-rw-r--r--m4/symlink.m46
-rw-r--r--m4/unistd_h.m410
-rw-r--r--m4/utimens.m46
-rw-r--r--m4/utimes.m44
24 files changed, 150 insertions, 100 deletions
diff --git a/m4/canonicalize.m4 b/m4/canonicalize.m4
index b61747bd1a5..cb0896fbd8b 100644
--- a/m4/canonicalize.m4
+++ b/m4/canonicalize.m4
@@ -1,4 +1,4 @@
-# canonicalize.m4 serial 30
+# canonicalize.m4 serial 31
dnl Copyright (C) 2003-2007, 2009-2019 Free Software Foundation, Inc.
@@ -117,8 +117,8 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS],
*-musl*) gl_cv_func_realpath_works="guessing yes" ;;
# Guess no on native Windows.
mingw*) gl_cv_func_realpath_works="guessing no" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_realpath_works="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
esac
])
rm -rf conftest.a conftest.d
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4
index ec9f2218bf3..84421cef847 100644
--- a/m4/extern-inline.m4
+++ b/m4/extern-inline.m4
@@ -32,7 +32,7 @@ AC_DEFUN([gl_EXTERN_INLINE],
https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html
DragonFly; see
- http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
+ http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log
FreeBSD; see:
https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html
diff --git a/m4/fcntl_h.m4 b/m4/fcntl_h.m4
index a86fdae5feb..60dc5e21037 100644
--- a/m4/fcntl_h.m4
+++ b/m4/fcntl_h.m4
@@ -1,4 +1,4 @@
-# serial 15
+# serial 16
# Configure fcntl.h.
dnl Copyright (C) 2006-2007, 2009-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
@@ -37,6 +37,7 @@ AC_DEFUN([gl_FCNTL_MODULE_INDICATOR],
AC_DEFUN([gl_FCNTL_H_DEFAULTS],
[
+ GNULIB_CREAT=0; AC_SUBST([GNULIB_CREAT])
GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL])
GNULIB_NONBLOCKING=0; AC_SUBST([GNULIB_NONBLOCKING])
GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN])
@@ -44,6 +45,7 @@ AC_DEFUN([gl_FCNTL_H_DEFAULTS],
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL])
HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT])
+ REPLACE_CREAT=0; AC_SUBST([REPLACE_CREAT])
REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL])
REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN])
REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT])
diff --git a/m4/fdopendir.m4 b/m4/fdopendir.m4
index b2b3b037316..ad48e4ef2d5 100644
--- a/m4/fdopendir.m4
+++ b/m4/fdopendir.m4
@@ -1,4 +1,4 @@
-# serial 11
+# serial 12
# See if we need to provide fdopendir.
dnl Copyright (C) 2009-2019 Free Software Foundation, Inc.
@@ -49,8 +49,8 @@ DIR *fdopendir (int);
*-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
# Guess yes on musl systems.
*-musl*) gl_cv_func_fdopendir_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_fdopendir_works="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
esac
])])
case "$gl_cv_func_fdopendir_works" in
diff --git a/m4/getgroups.m4 b/m4/getgroups.m4
index c93447bb11c..556c177449b 100644
--- a/m4/getgroups.m4
+++ b/m4/getgroups.m4
@@ -1,4 +1,4 @@
-# serial 22
+# serial 23
dnl From Jim Meyering.
dnl A wrapper around AC_FUNC_GETGROUPS.
@@ -9,8 +9,6 @@ dnl A wrapper around AC_FUNC_GETGROUPS.
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-m4_version_prereq([2.70], [] ,[
-
# This is taken from the following Autoconf patch:
# https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9
AC_DEFUN([AC_FUNC_GETGROUPS],
@@ -44,8 +42,8 @@ AC_DEFUN([AC_FUNC_GETGROUPS],
*-gnu* | gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
# Guess yes on musl systems.
*-musl*) ac_cv_func_getgroups_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) ac_cv_func_getgroups_works="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) ac_cv_func_getgroups_works="$gl_cross_guess_normal" ;;
esac
])
])
@@ -61,8 +59,6 @@ AC_DEFUN([AC_FUNC_GETGROUPS],
LIBS=$ac_save_LIBS
])# AC_FUNC_GETGROUPS
-])
-
AC_DEFUN([gl_FUNC_GETGROUPS],
[
AC_REQUIRE([AC_TYPE_GETGROUPS])
@@ -99,8 +95,8 @@ AC_DEFUN([gl_FUNC_GETGROUPS],
*-gnu* | gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
# Guess yes on musl systems.
*-musl*) gl_cv_func_getgroups_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_getgroups_works="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_getgroups_works="$gl_cross_guess_normal" ;;
esac
])])
case "$gl_cv_func_getgroups_works" in
diff --git a/m4/getopt.m4 b/m4/getopt.m4
index 5991bf83e89..8cc78278739 100644
--- a/m4/getopt.m4
+++ b/m4/getopt.m4
@@ -1,4 +1,4 @@
-# getopt.m4 serial 46
+# getopt.m4 serial 47
dnl Copyright (C) 2002-2006, 2008-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -302,8 +302,10 @@ dnl is ambiguous with environment values that contain newlines.
]])],
[gl_cv_func_getopt_gnu=yes],
[gl_cv_func_getopt_gnu=no],
- [dnl Cross compiling. Assume the worst, even on glibc platforms.
- gl_cv_func_getopt_gnu="guessing no"
+ [dnl Cross compiling.
+ dnl Assume the worst, even on glibc platforms.
+ dnl But obey --enable-cross-guesses.
+ gl_cv_func_getopt_gnu="$gl_cross_guess_normal"
])
case $gl_had_POSIXLY_CORRECT in
exported) ;;
diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4
index 5e2ef6f47e2..7eebabd9c70 100644
--- a/m4/gettimeofday.m4
+++ b/m4/gettimeofday.m4
@@ -1,4 +1,4 @@
-# serial 26
+# serial 27
# Copyright (C) 2001-2003, 2005, 2007, 2009-2019 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -109,8 +109,8 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
*-musl*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
# Guess no on native Windows.
mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_gettimeofday_clobber="$gl_cross_guess_inverted" ;;
esac
])])
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index 57b94ed5325..479c9de9eab 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 44
+# gnulib-common.m4 serial 45
dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -94,7 +94,7 @@ AC_DEFUN([gl_COMMON_BODY], [
invoked from such signal handlers. Such functions have some restrictions:
* All functions that it calls should be marked _GL_ASYNC_SAFE as well,
or should be listed as async-signal-safe in POSIX
- <http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04>
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04>
section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in
particular, are NOT async-signal-safe.
* All memory locations (variables and struct fields) that these functions
@@ -115,6 +115,33 @@ AC_DEFUN([gl_COMMON_BODY], [
errno. */
#define _GL_ASYNC_SAFE
])
+ dnl Hint which direction to take regarding cross-compilation guesses:
+ dnl When a user installs a program on a platform they are not intimately
+ dnl familiar with, --enable-cross-guesses=conservative is the appropriate
+ dnl choice. It implements the "If we don't know, assume the worst" principle.
+ dnl However, when an operating system developer (on a platform which is not
+ dnl yet known to gnulib) builds packages for their platform, they want to
+ dnl expose, not hide, possible platform bugs; in this case,
+ dnl --enable-cross-guesses=risky is the appropriate choice.
+ dnl Sets the variables
+ dnl gl_cross_guess_normal (to be used when 'yes' is good and 'no' is bad),
+ dnl gl_cross_guess_inverted (to be used when 'no' is good and 'yes' is bad).
+ AC_ARG_ENABLE([cross-guesses],
+ [AS_HELP_STRING([--enable-cross-guesses={conservative|risky}],
+ [specify policy for cross-compilation guesses])],
+ [if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
+ AC_MSG_WARN([invalid argument supplied to --enable-cross-guesses])
+ enableval=conservative
+ fi
+ gl_cross_guesses="$enableval"],
+ [gl_cross_guesses=conservative])
+ if test $gl_cross_guesses = risky; then
+ gl_cross_guess_normal="guessing yes"
+ gl_cross_guess_inverted="guessing no"
+ else
+ gl_cross_guess_normal="guessing no"
+ gl_cross_guess_inverted="guessing yes"
+ fi
dnl Preparation for running test programs:
dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not
dnl to /dev/tty, so they can be redirected to log files. Such diagnostics
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index 77563edc84d..625c2211665 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -1104,6 +1104,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/nstrftime.m4
m4/off_t.m4
m4/open-cloexec.m4
+ m4/open-slash.m4
m4/open.m4
m4/pathmax.m4
m4/pipe2.m4
diff --git a/m4/largefile.m4 b/m4/largefile.m4
index 1938188c17b..c6dd9a10032 100644
--- a/m4/largefile.m4
+++ b/m4/largefile.m4
@@ -56,7 +56,7 @@ rm -rf conftest*[]dnl
# By default, many hosts won't let programs access large files;
# one must use special compiler options to get large-file access to work.
# For more details about this brain damage please see:
-# http://www.unix-systems.org/version2/whatsnew/lfs20mar.html
+# http://www.unix.org/version2/whatsnew/lfs20mar.html
AC_DEFUN([AC_SYS_LARGEFILE],
[AC_ARG_ENABLE(largefile,
[ --disable-largefile omit support for large files])
diff --git a/m4/lstat.m4 b/m4/lstat.m4
index ace163867e2..be6d3f24b43 100644
--- a/m4/lstat.m4
+++ b/m4/lstat.m4
@@ -1,4 +1,4 @@
-# serial 32
+# serial 33
# Copyright (C) 1997-2001, 2003-2019 Free Software Foundation, Inc.
#
@@ -63,8 +63,8 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
# Guess no on native Windows.
gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
*)
- # If we don't know, assume the worst.
- gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
esac
])
rm -f conftest.sym conftest.file
diff --git a/m4/memmem.m4 b/m4/memmem.m4
index af2d5bbcf52..dcccefa7045 100644
--- a/m4/memmem.m4
+++ b/m4/memmem.m4
@@ -1,4 +1,4 @@
-# memmem.m4 serial 25
+# memmem.m4 serial 26
dnl Copyright (C) 2002-2004, 2007-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -68,7 +68,7 @@ AC_DEFUN([gl_FUNC_MEMMEM_SIMPLE],
#endif
],
[gl_cv_func_memmem_works_always="guessing yes"],
- [gl_cv_func_memmem_works_always="guessing no"])
+ [gl_cv_func_memmem_works_always="$gl_cross_guess_normal"])
])
])
case "$gl_cv_func_memmem_works_always" in
@@ -138,7 +138,7 @@ static void quit (int sig) { _exit (sig + 128); }
#endif
],
[gl_cv_func_memmem_works_fast="guessing yes"],
- [gl_cv_func_memmem_works_fast="guessing no"])
+ [gl_cv_func_memmem_works_fast="$gl_cross_guess_normal"])
])
])
case "$gl_cv_func_memmem_works_fast" in
diff --git a/m4/mktime.m4 b/m4/mktime.m4
index a86e1eebc68..405476145c2 100644
--- a/m4/mktime.m4
+++ b/m4/mktime.m4
@@ -1,4 +1,4 @@
-# serial 30
+# serial 31
dnl Copyright (C) 2002-2003, 2005-2007, 2009-2019 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
@@ -247,7 +247,7 @@ main ()
[case "$host_os" in
# Guess no on native Windows.
mingw*) gl_cv_func_working_mktime="guessing no" ;;
- *) gl_cv_func_working_mktime="guessing no" ;;
+ *) gl_cv_func_working_mktime="$gl_cross_guess_normal" ;;
esac
])
])
diff --git a/m4/nocrash.m4 b/m4/nocrash.m4
index 4d9f0226906..8577038d796 100644
--- a/m4/nocrash.m4
+++ b/m4/nocrash.m4
@@ -53,7 +53,7 @@ nocrash_init (void)
/* Allocate a port on which the thread shall listen for exceptions. */
if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
== KERN_SUCCESS) {
- /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
+ /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
if (mach_port_insert_right (self, our_exception_port, our_exception_port,
MACH_MSG_TYPE_MAKE_SEND)
== KERN_SUCCESS) {
@@ -72,7 +72,7 @@ nocrash_init (void)
for a particular thread. This has the effect that when our exception
port gets the message, the thread specific exception port has already
been asked, and we don't need to bother about it.
- See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
+ See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
task_set_exception_ports (self, mask, our_exception_port,
EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
}
diff --git a/m4/open-slash.m4 b/m4/open-slash.m4
new file mode 100644
index 00000000000..a8756ae8fea
--- /dev/null
+++ b/m4/open-slash.m4
@@ -0,0 +1,59 @@
+# open-slash.m4 serial 1
+dnl Copyright (C) 2007-2019 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.
+
+dnl Tests whether open() and creat() recognize a trailing slash.
+dnl Sets gl_cv_func_open_slash.
+AC_DEFUN([gl_OPEN_TRAILING_SLASH_BUG],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ dnl open("foo/") should not create a file when the file name has a
+ dnl trailing slash. FreeBSD only has the problem on symlinks.
+ AC_CHECK_FUNCS_ONCE([lstat])
+ AC_CACHE_CHECK([whether open recognizes a trailing slash],
+ [gl_cv_func_open_slash],
+ [# Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ touch conftest.tmp
+ ln -s conftest.tmp conftest.lnk
+ fi
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <fcntl.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+int main ()
+{
+ int result = 0;
+#if HAVE_LSTAT
+ if (open ("conftest.lnk/", O_RDONLY) != -1)
+ result |= 1;
+#endif
+ if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
+ result |= 2;
+ return result;
+}]])],
+ [gl_cv_func_open_slash=yes],
+ [gl_cv_func_open_slash=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
+ gl_cv_func_open_slash="guessing no" ;;
+ *)
+ gl_cv_func_open_slash="guessing yes" ;;
+ esac
+changequote([,])dnl
+ ])
+ rm -f conftest.sl conftest.tmp conftest.lnk
+ ])
+ case "$gl_cv_func_open_slash" in
+ *no)
+ AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1],
+ [Define to 1 if open() fails to recognize a trailing slash.])
+ ;;
+ esac
+])
diff --git a/m4/open.m4 b/m4/open.m4
index 5d73f4de1ac..6cf0bebb176 100644
--- a/m4/open.m4
+++ b/m4/open.m4
@@ -19,48 +19,9 @@ AC_DEFUN([gl_FUNC_OPEN],
if test "$gl_cv_macro_O_CLOEXEC" != yes; then
REPLACE_OPEN=1
fi
- AC_CACHE_CHECK([whether open recognizes a trailing slash],
- [gl_cv_func_open_slash],
- [# Assume that if we have lstat, we can also check symlinks.
- if test $ac_cv_func_lstat = yes; then
- touch conftest.tmp
- ln -s conftest.tmp conftest.lnk
- fi
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
-#include <fcntl.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-int main ()
-{
- int result = 0;
-#if HAVE_LSTAT
- if (open ("conftest.lnk/", O_RDONLY) != -1)
- result |= 1;
-#endif
- if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
- result |= 2;
- return result;
-}]])],
- [gl_cv_func_open_slash=yes],
- [gl_cv_func_open_slash=no],
- [
-changequote(,)dnl
- case "$host_os" in
- freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
- gl_cv_func_open_slash="guessing no" ;;
- *)
- gl_cv_func_open_slash="guessing yes" ;;
- esac
-changequote([,])dnl
- ])
- rm -f conftest.sl conftest.tmp conftest.lnk
- ])
+ gl_OPEN_TRAILING_SLASH_BUG
case "$gl_cv_func_open_slash" in
*no)
- AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1],
- [Define to 1 if open() fails to recognize a trailing slash.])
REPLACE_OPEN=1
;;
esac
diff --git a/m4/pselect.m4 b/m4/pselect.m4
index 5c72b69587a..250463d80a3 100644
--- a/m4/pselect.m4
+++ b/m4/pselect.m4
@@ -1,4 +1,4 @@
-# pselect.m4 serial 7
+# pselect.m4 serial 8
dnl Copyright (C) 2011-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -55,8 +55,8 @@ AC_DEFUN([gl_FUNC_PSELECT],
linux-* | linux) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_pselect_detects_ebadf="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_pselect_detects_ebadf="$gl_cross_guess_normal" ;;
esac
])
])
diff --git a/m4/putenv.m4 b/m4/putenv.m4
index 342ba2636ab..1267b901bec 100644
--- a/m4/putenv.m4
+++ b/m4/putenv.m4
@@ -1,4 +1,4 @@
-# putenv.m4 serial 23
+# putenv.m4 serial 24
dnl Copyright (C) 2002-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -40,8 +40,8 @@ AC_DEFUN([gl_FUNC_PUTENV],
*-musl*) gl_cv_func_svid_putenv="guessing yes" ;;
# Guess no on native Windows.
mingw*) gl_cv_func_svid_putenv="guessing no" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_svid_putenv="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_svid_putenv="$gl_cross_guess_normal" ;;
esac
])
])
diff --git a/m4/readlink.m4 b/m4/readlink.m4
index 2d7681576cc..7aa6ce03379 100644
--- a/m4/readlink.m4
+++ b/m4/readlink.m4
@@ -1,4 +1,4 @@
-# readlink.m4 serial 14
+# readlink.m4 serial 15
dnl Copyright (C) 2003, 2007, 2009-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -38,8 +38,8 @@ AC_DEFUN([gl_FUNC_READLINK],
linux-* | linux) gl_cv_func_readlink_works="guessing yes" ;;
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_readlink_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_readlink_works="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_readlink_works="$gl_cross_guess_normal" ;;
esac
])
rm -f conftest.link conftest.lnk2])
diff --git a/m4/regex.m4 b/m4/regex.m4
index 35119c5c85f..ad36dc2b020 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -1,4 +1,4 @@
-# serial 68
+# serial 69
# Copyright (C) 1996-2001, 2003-2019 Free Software Foundation, Inc.
#
@@ -243,8 +243,8 @@ AC_DEFUN([gl_REGEX],
[case "$host_os" in
# Guess no on native Windows.
mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
- # Otherwise, assume it is not working.
- *) gl_cv_func_re_compile_pattern_working="guessing no" ;;
+ # Otherwise obey --enable-cross-guesses.
+ *) gl_cv_func_re_compile_pattern_working="$gl_cross_guess_normal" ;;
esac
])
])
diff --git a/m4/symlink.m4 b/m4/symlink.m4
index 508e94dd410..2bec317e9b8 100644
--- a/m4/symlink.m4
+++ b/m4/symlink.m4
@@ -1,4 +1,4 @@
-# serial 8
+# serial 9
# See if we need to provide symlink replacement.
dnl Copyright (C) 2009-2019 Free Software Foundation, Inc.
@@ -40,8 +40,8 @@ AC_DEFUN([gl_FUNC_SYMLINK],
linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;;
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_symlink_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_symlink_works="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_symlink_works="$gl_cross_guess_normal" ;;
esac
])
rm -f conftest.f conftest.link conftest.lnk2])
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4
index a3b3905f84e..18b7140e598 100644
--- a/m4/unistd_h.m4
+++ b/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 75
+# unistd_h.m4 serial 76
dnl Copyright (C) 2006-2019 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,9 +41,9 @@ AC_DEFUN([gl_UNISTD_H],
# include <io.h>
# endif
#endif
- ]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat
- fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups
- gethostname getlogin getlogin_r getpagesize getpass
+ ]], [access chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir
+ fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize
+ getgroups gethostname getlogin getlogin_r getpagesize getpass
getusershell setusershell endusershell
group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite
readlink readlinkat rmdir sethostname sleep symlink symlinkat
@@ -61,6 +61,7 @@ AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
AC_DEFUN([gl_UNISTD_H_DEFAULTS],
[
+ GNULIB_ACCESS=0; AC_SUBST([GNULIB_ACCESS])
GNULIB_CHDIR=0; AC_SUBST([GNULIB_CHDIR])
GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN])
GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE])
@@ -159,6 +160,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R])
HAVE_OS_H=0; AC_SUBST([HAVE_OS_H])
HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H])
+ REPLACE_ACCESS=0; AC_SUBST([REPLACE_ACCESS])
REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN])
REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE])
REPLACE_DUP=0; AC_SUBST([REPLACE_DUP])
diff --git a/m4/utimens.m4 b/m4/utimens.m4
index dda86b09d77..6ed65934064 100644
--- a/m4/utimens.m4
+++ b/m4/utimens.m4
@@ -3,7 +3,7 @@ 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.
-dnl serial 9
+dnl serial 10
AC_DEFUN([gl_UTIMENS],
[
@@ -35,8 +35,8 @@ AC_DEFUN([gl_UTIMENS],
linux-* | linux) gl_cv_func_futimesat_works="guessing yes" ;;
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_futimesat_works="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_futimesat_works="$gl_cross_guess_normal" ;;
esac
])
rm -f conftest.file])
diff --git a/m4/utimes.m4 b/m4/utimes.m4
index 5806d8fbbb6..703f823ad53 100644
--- a/m4/utimes.m4
+++ b/m4/utimes.m4
@@ -1,5 +1,5 @@
# Detect some bugs in glibc's implementation of utimes.
-# serial 6
+# serial 7
dnl Copyright (C) 2003-2005, 2009-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
@@ -147,7 +147,7 @@ main ()
*-musl*) gl_cv_func_working_utimes="guessing yes" ;;
# Guess no on native Windows.
mingw*) gl_cv_func_working_utimes="guessing no" ;;
- *) gl_cv_func_working_utimes="guessing no" ;;
+ *) gl_cv_func_working_utimes="$gl_cross_guess_normal" ;;
esac
])
])