aboutsummaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert2019-09-22 23:50:59 -0700
committerPaul Eggert2019-09-22 23:51:44 -0700
commit78669517dc3db4d6d51fb26d71073fc0c196ab5d (patch)
treea3dff006cf177da51fd6458203d8e4751e36e78b /m4
parenta33cda168e35cb93cdf115f7d12765f590226601 (diff)
downloademacs-78669517dc3db4d6d51fb26d71073fc0c196ab5d.tar.gz
emacs-78669517dc3db4d6d51fb26d71073fc0c196ab5d.zip
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 @@
1# canonicalize.m4 serial 30 1# canonicalize.m4 serial 31
2 2
3dnl Copyright (C) 2003-2007, 2009-2019 Free Software Foundation, Inc. 3dnl Copyright (C) 2003-2007, 2009-2019 Free Software Foundation, Inc.
4 4
@@ -117,8 +117,8 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS],
117 *-musl*) gl_cv_func_realpath_works="guessing yes" ;; 117 *-musl*) gl_cv_func_realpath_works="guessing yes" ;;
118 # Guess no on native Windows. 118 # Guess no on native Windows.
119 mingw*) gl_cv_func_realpath_works="guessing no" ;; 119 mingw*) gl_cv_func_realpath_works="guessing no" ;;
120 # If we don't know, assume the worst. 120 # If we don't know, obey --enable-cross-guesses.
121 *) gl_cv_func_realpath_works="guessing no" ;; 121 *) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
122 esac 122 esac
123 ]) 123 ])
124 rm -rf conftest.a conftest.d 124 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],
32 https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html 32 https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html
33 33
34 DragonFly; see 34 DragonFly; see
35 http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log 35 http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log
36 36
37 FreeBSD; see: 37 FreeBSD; see:
38 https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html 38 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 @@
1# serial 15 1# serial 16
2# Configure fcntl.h. 2# Configure fcntl.h.
3dnl Copyright (C) 2006-2007, 2009-2019 Free Software Foundation, Inc. 3dnl Copyright (C) 2006-2007, 2009-2019 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
@@ -37,6 +37,7 @@ AC_DEFUN([gl_FCNTL_MODULE_INDICATOR],
37 37
38AC_DEFUN([gl_FCNTL_H_DEFAULTS], 38AC_DEFUN([gl_FCNTL_H_DEFAULTS],
39[ 39[
40 GNULIB_CREAT=0; AC_SUBST([GNULIB_CREAT])
40 GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL]) 41 GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL])
41 GNULIB_NONBLOCKING=0; AC_SUBST([GNULIB_NONBLOCKING]) 42 GNULIB_NONBLOCKING=0; AC_SUBST([GNULIB_NONBLOCKING])
42 GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN]) 43 GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN])
@@ -44,6 +45,7 @@ AC_DEFUN([gl_FCNTL_H_DEFAULTS],
44 dnl Assume proper GNU behavior unless another module says otherwise. 45 dnl Assume proper GNU behavior unless another module says otherwise.
45 HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL]) 46 HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL])
46 HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT]) 47 HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT])
48 REPLACE_CREAT=0; AC_SUBST([REPLACE_CREAT])
47 REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL]) 49 REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL])
48 REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN]) 50 REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN])
49 REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT]) 51 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 @@
1# serial 11 1# serial 12
2# See if we need to provide fdopendir. 2# See if we need to provide fdopendir.
3 3
4dnl Copyright (C) 2009-2019 Free Software Foundation, Inc. 4dnl Copyright (C) 2009-2019 Free Software Foundation, Inc.
@@ -49,8 +49,8 @@ DIR *fdopendir (int);
49 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;; 49 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
50 # Guess yes on musl systems. 50 # Guess yes on musl systems.
51 *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;; 51 *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;;
52 # If we don't know, assume the worst. 52 # If we don't know, obey --enable-cross-guesses.
53 *) gl_cv_func_fdopendir_works="guessing no" ;; 53 *) gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
54 esac 54 esac
55 ])]) 55 ])])
56 case "$gl_cv_func_fdopendir_works" in 56 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 @@
1# serial 22 1# serial 23
2 2
3dnl From Jim Meyering. 3dnl From Jim Meyering.
4dnl A wrapper around AC_FUNC_GETGROUPS. 4dnl A wrapper around AC_FUNC_GETGROUPS.
@@ -9,8 +9,6 @@ dnl A wrapper around AC_FUNC_GETGROUPS.
9# gives unlimited permission to copy and/or distribute it, 9# gives unlimited permission to copy and/or distribute it,
10# with or without modifications, as long as this notice is preserved. 10# with or without modifications, as long as this notice is preserved.
11 11
12m4_version_prereq([2.70], [] ,[
13
14# This is taken from the following Autoconf patch: 12# This is taken from the following Autoconf patch:
15# https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9 13# https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9
16AC_DEFUN([AC_FUNC_GETGROUPS], 14AC_DEFUN([AC_FUNC_GETGROUPS],
@@ -44,8 +42,8 @@ AC_DEFUN([AC_FUNC_GETGROUPS],
44 *-gnu* | gnu*) ac_cv_func_getgroups_works="guessing yes" ;; 42 *-gnu* | gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
45 # Guess yes on musl systems. 43 # Guess yes on musl systems.
46 *-musl*) ac_cv_func_getgroups_works="guessing yes" ;; 44 *-musl*) ac_cv_func_getgroups_works="guessing yes" ;;
47 # If we don't know, assume the worst. 45 # If we don't know, obey --enable-cross-guesses.
48 *) ac_cv_func_getgroups_works="guessing no" ;; 46 *) ac_cv_func_getgroups_works="$gl_cross_guess_normal" ;;
49 esac 47 esac
50 ]) 48 ])
51 ]) 49 ])
@@ -61,8 +59,6 @@ AC_DEFUN([AC_FUNC_GETGROUPS],
61 LIBS=$ac_save_LIBS 59 LIBS=$ac_save_LIBS
62])# AC_FUNC_GETGROUPS 60])# AC_FUNC_GETGROUPS
63 61
64])
65
66AC_DEFUN([gl_FUNC_GETGROUPS], 62AC_DEFUN([gl_FUNC_GETGROUPS],
67[ 63[
68 AC_REQUIRE([AC_TYPE_GETGROUPS]) 64 AC_REQUIRE([AC_TYPE_GETGROUPS])
@@ -99,8 +95,8 @@ AC_DEFUN([gl_FUNC_GETGROUPS],
99 *-gnu* | gnu*) gl_cv_func_getgroups_works="guessing yes" ;; 95 *-gnu* | gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
100 # Guess yes on musl systems. 96 # Guess yes on musl systems.
101 *-musl*) gl_cv_func_getgroups_works="guessing yes" ;; 97 *-musl*) gl_cv_func_getgroups_works="guessing yes" ;;
102 # If we don't know, assume the worst. 98 # If we don't know, obey --enable-cross-guesses.
103 *) gl_cv_func_getgroups_works="guessing no" ;; 99 *) gl_cv_func_getgroups_works="$gl_cross_guess_normal" ;;
104 esac 100 esac
105 ])]) 101 ])])
106 case "$gl_cv_func_getgroups_works" in 102 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 @@
1# getopt.m4 serial 46 1# getopt.m4 serial 47
2dnl Copyright (C) 2002-2006, 2008-2019 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2006, 2008-2019 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -302,8 +302,10 @@ dnl is ambiguous with environment values that contain newlines.
302 ]])], 302 ]])],
303 [gl_cv_func_getopt_gnu=yes], 303 [gl_cv_func_getopt_gnu=yes],
304 [gl_cv_func_getopt_gnu=no], 304 [gl_cv_func_getopt_gnu=no],
305 [dnl Cross compiling. Assume the worst, even on glibc platforms. 305 [dnl Cross compiling.
306 gl_cv_func_getopt_gnu="guessing no" 306 dnl Assume the worst, even on glibc platforms.
307 dnl But obey --enable-cross-guesses.
308 gl_cv_func_getopt_gnu="$gl_cross_guess_normal"
307 ]) 309 ])
308 case $gl_had_POSIXLY_CORRECT in 310 case $gl_had_POSIXLY_CORRECT in
309 exported) ;; 311 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 @@
1# serial 26 1# serial 27
2 2
3# Copyright (C) 2001-2003, 2005, 2007, 2009-2019 Free Software Foundation, Inc. 3# Copyright (C) 2001-2003, 2005, 2007, 2009-2019 Free Software Foundation, Inc.
4# This file is free software; the Free Software Foundation 4# This file is free software; the Free Software Foundation
@@ -109,8 +109,8 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
109 *-musl*) gl_cv_func_gettimeofday_clobber="guessing no" ;; 109 *-musl*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
110 # Guess no on native Windows. 110 # Guess no on native Windows.
111 mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;; 111 mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
112 # If we don't know, assume the worst. 112 # If we don't know, obey --enable-cross-guesses.
113 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; 113 *) gl_cv_func_gettimeofday_clobber="$gl_cross_guess_inverted" ;;
114 esac 114 esac
115 ])]) 115 ])])
116 116
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 @@
1# gnulib-common.m4 serial 44 1# gnulib-common.m4 serial 45
2dnl Copyright (C) 2007-2019 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -94,7 +94,7 @@ AC_DEFUN([gl_COMMON_BODY], [
94 invoked from such signal handlers. Such functions have some restrictions: 94 invoked from such signal handlers. Such functions have some restrictions:
95 * All functions that it calls should be marked _GL_ASYNC_SAFE as well, 95 * All functions that it calls should be marked _GL_ASYNC_SAFE as well,
96 or should be listed as async-signal-safe in POSIX 96 or should be listed as async-signal-safe in POSIX
97 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04> 97 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04>
98 section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in 98 section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in
99 particular, are NOT async-signal-safe. 99 particular, are NOT async-signal-safe.
100 * All memory locations (variables and struct fields) that these functions 100 * All memory locations (variables and struct fields) that these functions
@@ -115,6 +115,33 @@ AC_DEFUN([gl_COMMON_BODY], [
115 errno. */ 115 errno. */
116#define _GL_ASYNC_SAFE 116#define _GL_ASYNC_SAFE
117]) 117])
118 dnl Hint which direction to take regarding cross-compilation guesses:
119 dnl When a user installs a program on a platform they are not intimately
120 dnl familiar with, --enable-cross-guesses=conservative is the appropriate
121 dnl choice. It implements the "If we don't know, assume the worst" principle.
122 dnl However, when an operating system developer (on a platform which is not
123 dnl yet known to gnulib) builds packages for their platform, they want to
124 dnl expose, not hide, possible platform bugs; in this case,
125 dnl --enable-cross-guesses=risky is the appropriate choice.
126 dnl Sets the variables
127 dnl gl_cross_guess_normal (to be used when 'yes' is good and 'no' is bad),
128 dnl gl_cross_guess_inverted (to be used when 'no' is good and 'yes' is bad).
129 AC_ARG_ENABLE([cross-guesses],
130 [AS_HELP_STRING([--enable-cross-guesses={conservative|risky}],
131 [specify policy for cross-compilation guesses])],
132 [if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
133 AC_MSG_WARN([invalid argument supplied to --enable-cross-guesses])
134 enableval=conservative
135 fi
136 gl_cross_guesses="$enableval"],
137 [gl_cross_guesses=conservative])
138 if test $gl_cross_guesses = risky; then
139 gl_cross_guess_normal="guessing yes"
140 gl_cross_guess_inverted="guessing no"
141 else
142 gl_cross_guess_normal="guessing no"
143 gl_cross_guess_inverted="guessing yes"
144 fi
118 dnl Preparation for running test programs: 145 dnl Preparation for running test programs:
119 dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not 146 dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not
120 dnl to /dev/tty, so they can be redirected to log files. Such diagnostics 147 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], [
1104 m4/nstrftime.m4 1104 m4/nstrftime.m4
1105 m4/off_t.m4 1105 m4/off_t.m4
1106 m4/open-cloexec.m4 1106 m4/open-cloexec.m4
1107 m4/open-slash.m4
1107 m4/open.m4 1108 m4/open.m4
1108 m4/pathmax.m4 1109 m4/pathmax.m4
1109 m4/pipe2.m4 1110 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
56# By default, many hosts won't let programs access large files; 56# By default, many hosts won't let programs access large files;
57# one must use special compiler options to get large-file access to work. 57# one must use special compiler options to get large-file access to work.
58# For more details about this brain damage please see: 58# For more details about this brain damage please see:
59# http://www.unix-systems.org/version2/whatsnew/lfs20mar.html 59# http://www.unix.org/version2/whatsnew/lfs20mar.html
60AC_DEFUN([AC_SYS_LARGEFILE], 60AC_DEFUN([AC_SYS_LARGEFILE],
61[AC_ARG_ENABLE(largefile, 61[AC_ARG_ENABLE(largefile,
62 [ --disable-largefile omit support for large files]) 62 [ --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 @@
1# serial 32 1# serial 33
2 2
3# Copyright (C) 1997-2001, 2003-2019 Free Software Foundation, Inc. 3# Copyright (C) 1997-2001, 2003-2019 Free Software Foundation, Inc.
4# 4#
@@ -63,8 +63,8 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
63 # Guess no on native Windows. 63 # Guess no on native Windows.
64 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; 64 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
65 *) 65 *)
66 # If we don't know, assume the worst. 66 # If we don't know, obey --enable-cross-guesses.
67 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; 67 gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
68 esac 68 esac
69 ]) 69 ])
70 rm -f conftest.sym conftest.file 70 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 @@
1# memmem.m4 serial 25 1# memmem.m4 serial 26
2dnl Copyright (C) 2002-2004, 2007-2019 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2004, 2007-2019 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -68,7 +68,7 @@ AC_DEFUN([gl_FUNC_MEMMEM_SIMPLE],
68#endif 68#endif
69 ], 69 ],
70 [gl_cv_func_memmem_works_always="guessing yes"], 70 [gl_cv_func_memmem_works_always="guessing yes"],
71 [gl_cv_func_memmem_works_always="guessing no"]) 71 [gl_cv_func_memmem_works_always="$gl_cross_guess_normal"])
72 ]) 72 ])
73 ]) 73 ])
74 case "$gl_cv_func_memmem_works_always" in 74 case "$gl_cv_func_memmem_works_always" in
@@ -138,7 +138,7 @@ static void quit (int sig) { _exit (sig + 128); }
138#endif 138#endif
139 ], 139 ],
140 [gl_cv_func_memmem_works_fast="guessing yes"], 140 [gl_cv_func_memmem_works_fast="guessing yes"],
141 [gl_cv_func_memmem_works_fast="guessing no"]) 141 [gl_cv_func_memmem_works_fast="$gl_cross_guess_normal"])
142 ]) 142 ])
143 ]) 143 ])
144 case "$gl_cv_func_memmem_works_fast" in 144 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 @@
1# serial 30 1# serial 31
2dnl Copyright (C) 2002-2003, 2005-2007, 2009-2019 Free Software Foundation, 2dnl Copyright (C) 2002-2003, 2005-2007, 2009-2019 Free Software Foundation,
3dnl Inc. 3dnl Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
@@ -247,7 +247,7 @@ main ()
247 [case "$host_os" in 247 [case "$host_os" in
248 # Guess no on native Windows. 248 # Guess no on native Windows.
249 mingw*) gl_cv_func_working_mktime="guessing no" ;; 249 mingw*) gl_cv_func_working_mktime="guessing no" ;;
250 *) gl_cv_func_working_mktime="guessing no" ;; 250 *) gl_cv_func_working_mktime="$gl_cross_guess_normal" ;;
251 esac 251 esac
252 ]) 252 ])
253 ]) 253 ])
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)
53 /* Allocate a port on which the thread shall listen for exceptions. */ 53 /* Allocate a port on which the thread shall listen for exceptions. */
54 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) 54 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
55 == KERN_SUCCESS) { 55 == KERN_SUCCESS) {
56 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ 56 /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
57 if (mach_port_insert_right (self, our_exception_port, our_exception_port, 57 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
58 MACH_MSG_TYPE_MAKE_SEND) 58 MACH_MSG_TYPE_MAKE_SEND)
59 == KERN_SUCCESS) { 59 == KERN_SUCCESS) {
@@ -72,7 +72,7 @@ nocrash_init (void)
72 for a particular thread. This has the effect that when our exception 72 for a particular thread. This has the effect that when our exception
73 port gets the message, the thread specific exception port has already 73 port gets the message, the thread specific exception port has already
74 been asked, and we don't need to bother about it. 74 been asked, and we don't need to bother about it.
75 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ 75 See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
76 task_set_exception_ports (self, mask, our_exception_port, 76 task_set_exception_ports (self, mask, our_exception_port,
77 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); 77 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
78 } 78 }
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 @@
1# open-slash.m4 serial 1
2dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl Tests whether open() and creat() recognize a trailing slash.
8dnl Sets gl_cv_func_open_slash.
9AC_DEFUN([gl_OPEN_TRAILING_SLASH_BUG],
10[
11 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
12 dnl open("foo/") should not create a file when the file name has a
13 dnl trailing slash. FreeBSD only has the problem on symlinks.
14 AC_CHECK_FUNCS_ONCE([lstat])
15 AC_CACHE_CHECK([whether open recognizes a trailing slash],
16 [gl_cv_func_open_slash],
17 [# Assume that if we have lstat, we can also check symlinks.
18 if test $ac_cv_func_lstat = yes; then
19 touch conftest.tmp
20 ln -s conftest.tmp conftest.lnk
21 fi
22 AC_RUN_IFELSE(
23 [AC_LANG_SOURCE([[
24#include <fcntl.h>
25#if HAVE_UNISTD_H
26# include <unistd.h>
27#endif
28int main ()
29{
30 int result = 0;
31#if HAVE_LSTAT
32 if (open ("conftest.lnk/", O_RDONLY) != -1)
33 result |= 1;
34#endif
35 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
36 result |= 2;
37 return result;
38}]])],
39 [gl_cv_func_open_slash=yes],
40 [gl_cv_func_open_slash=no],
41 [
42changequote(,)dnl
43 case "$host_os" in
44 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
45 gl_cv_func_open_slash="guessing no" ;;
46 *)
47 gl_cv_func_open_slash="guessing yes" ;;
48 esac
49changequote([,])dnl
50 ])
51 rm -f conftest.sl conftest.tmp conftest.lnk
52 ])
53 case "$gl_cv_func_open_slash" in
54 *no)
55 AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1],
56 [Define to 1 if open() fails to recognize a trailing slash.])
57 ;;
58 esac
59])
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],
19 if test "$gl_cv_macro_O_CLOEXEC" != yes; then 19 if test "$gl_cv_macro_O_CLOEXEC" != yes; then
20 REPLACE_OPEN=1 20 REPLACE_OPEN=1
21 fi 21 fi
22 AC_CACHE_CHECK([whether open recognizes a trailing slash], 22 gl_OPEN_TRAILING_SLASH_BUG
23 [gl_cv_func_open_slash],
24 [# Assume that if we have lstat, we can also check symlinks.
25 if test $ac_cv_func_lstat = yes; then
26 touch conftest.tmp
27 ln -s conftest.tmp conftest.lnk
28 fi
29 AC_RUN_IFELSE(
30 [AC_LANG_SOURCE([[
31#include <fcntl.h>
32#if HAVE_UNISTD_H
33# include <unistd.h>
34#endif
35int main ()
36{
37 int result = 0;
38#if HAVE_LSTAT
39 if (open ("conftest.lnk/", O_RDONLY) != -1)
40 result |= 1;
41#endif
42 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
43 result |= 2;
44 return result;
45}]])],
46 [gl_cv_func_open_slash=yes],
47 [gl_cv_func_open_slash=no],
48 [
49changequote(,)dnl
50 case "$host_os" in
51 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
52 gl_cv_func_open_slash="guessing no" ;;
53 *)
54 gl_cv_func_open_slash="guessing yes" ;;
55 esac
56changequote([,])dnl
57 ])
58 rm -f conftest.sl conftest.tmp conftest.lnk
59 ])
60 case "$gl_cv_func_open_slash" in 23 case "$gl_cv_func_open_slash" in
61 *no) 24 *no)
62 AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1],
63 [Define to 1 if open() fails to recognize a trailing slash.])
64 REPLACE_OPEN=1 25 REPLACE_OPEN=1
65 ;; 26 ;;
66 esac 27 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 @@
1# pselect.m4 serial 7 1# pselect.m4 serial 8
2dnl Copyright (C) 2011-2019 Free Software Foundation, Inc. 2dnl Copyright (C) 2011-2019 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -55,8 +55,8 @@ AC_DEFUN([gl_FUNC_PSELECT],
55 linux-* | linux) gl_cv_func_pselect_detects_ebadf="guessing yes" ;; 55 linux-* | linux) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
56 # Guess yes on glibc systems. 56 # Guess yes on glibc systems.
57 *-gnu* | gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;; 57 *-gnu* | gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
58 # If we don't know, assume the worst. 58 # If we don't know, obey --enable-cross-guesses.
59 *) gl_cv_func_pselect_detects_ebadf="guessing no" ;; 59 *) gl_cv_func_pselect_detects_ebadf="$gl_cross_guess_normal" ;;
60 esac 60 esac
61 ]) 61 ])
62 ]) 62 ])
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 @@
1# putenv.m4 serial 23 1# putenv.m4 serial 24
2dnl Copyright (C) 2002-2019 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2019 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -40,8 +40,8 @@ AC_DEFUN([gl_FUNC_PUTENV],
40 *-musl*) gl_cv_func_svid_putenv="guessing yes" ;; 40 *-musl*) gl_cv_func_svid_putenv="guessing yes" ;;
41 # Guess no on native Windows. 41 # Guess no on native Windows.
42 mingw*) gl_cv_func_svid_putenv="guessing no" ;; 42 mingw*) gl_cv_func_svid_putenv="guessing no" ;;
43 # If we don't know, assume the worst. 43 # If we don't know, obey --enable-cross-guesses.
44 *) gl_cv_func_svid_putenv="guessing no" ;; 44 *) gl_cv_func_svid_putenv="$gl_cross_guess_normal" ;;
45 esac 45 esac
46 ]) 46 ])
47 ]) 47 ])
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 @@
1# readlink.m4 serial 14 1# readlink.m4 serial 15
2dnl Copyright (C) 2003, 2007, 2009-2019 Free Software Foundation, Inc. 2dnl Copyright (C) 2003, 2007, 2009-2019 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -38,8 +38,8 @@ AC_DEFUN([gl_FUNC_READLINK],
38 linux-* | linux) gl_cv_func_readlink_works="guessing yes" ;; 38 linux-* | linux) gl_cv_func_readlink_works="guessing yes" ;;
39 # Guess yes on glibc systems. 39 # Guess yes on glibc systems.
40 *-gnu* | gnu*) gl_cv_func_readlink_works="guessing yes" ;; 40 *-gnu* | gnu*) gl_cv_func_readlink_works="guessing yes" ;;
41 # If we don't know, assume the worst. 41 # If we don't know, obey --enable-cross-guesses.
42 *) gl_cv_func_readlink_works="guessing no" ;; 42 *) gl_cv_func_readlink_works="$gl_cross_guess_normal" ;;
43 esac 43 esac
44 ]) 44 ])
45 rm -f conftest.link conftest.lnk2]) 45 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 @@
1# serial 68 1# serial 69
2 2
3# Copyright (C) 1996-2001, 2003-2019 Free Software Foundation, Inc. 3# Copyright (C) 1996-2001, 2003-2019 Free Software Foundation, Inc.
4# 4#
@@ -243,8 +243,8 @@ AC_DEFUN([gl_REGEX],
243 [case "$host_os" in 243 [case "$host_os" in
244 # Guess no on native Windows. 244 # Guess no on native Windows.
245 mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;; 245 mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
246 # Otherwise, assume it is not working. 246 # Otherwise obey --enable-cross-guesses.
247 *) gl_cv_func_re_compile_pattern_working="guessing no" ;; 247 *) gl_cv_func_re_compile_pattern_working="$gl_cross_guess_normal" ;;
248 esac 248 esac
249 ]) 249 ])
250 ]) 250 ])
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 @@
1# serial 8 1# serial 9
2# See if we need to provide symlink replacement. 2# See if we need to provide symlink replacement.
3 3
4dnl Copyright (C) 2009-2019 Free Software Foundation, Inc. 4dnl Copyright (C) 2009-2019 Free Software Foundation, Inc.
@@ -40,8 +40,8 @@ AC_DEFUN([gl_FUNC_SYMLINK],
40 linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;; 40 linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;;
41 # Guess yes on glibc systems. 41 # Guess yes on glibc systems.
42 *-gnu* | gnu*) gl_cv_func_symlink_works="guessing yes" ;; 42 *-gnu* | gnu*) gl_cv_func_symlink_works="guessing yes" ;;
43 # If we don't know, assume the worst. 43 # If we don't know, obey --enable-cross-guesses.
44 *) gl_cv_func_symlink_works="guessing no" ;; 44 *) gl_cv_func_symlink_works="$gl_cross_guess_normal" ;;
45 esac 45 esac
46 ]) 46 ])
47 rm -f conftest.f conftest.link conftest.lnk2]) 47 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 @@
1# unistd_h.m4 serial 75 1# unistd_h.m4 serial 76
2dnl Copyright (C) 2006-2019 Free Software Foundation, Inc. 2dnl Copyright (C) 2006-2019 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -41,9 +41,9 @@ AC_DEFUN([gl_UNISTD_H],
41# include <io.h> 41# include <io.h>
42# endif 42# endif
43#endif 43#endif
44 ]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat 44 ]], [access chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir
45 fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups 45 fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize
46 gethostname getlogin getlogin_r getpagesize getpass 46 getgroups gethostname getlogin getlogin_r getpagesize getpass
47 getusershell setusershell endusershell 47 getusershell setusershell endusershell
48 group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite 48 group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite
49 readlink readlinkat rmdir sethostname sleep symlink symlinkat 49 readlink readlinkat rmdir sethostname sleep symlink symlinkat
@@ -61,6 +61,7 @@ AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
61 61
62AC_DEFUN([gl_UNISTD_H_DEFAULTS], 62AC_DEFUN([gl_UNISTD_H_DEFAULTS],
63[ 63[
64 GNULIB_ACCESS=0; AC_SUBST([GNULIB_ACCESS])
64 GNULIB_CHDIR=0; AC_SUBST([GNULIB_CHDIR]) 65 GNULIB_CHDIR=0; AC_SUBST([GNULIB_CHDIR])
65 GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN]) 66 GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN])
66 GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE]) 67 GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE])
@@ -159,6 +160,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
159 HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R]) 160 HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R])
160 HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) 161 HAVE_OS_H=0; AC_SUBST([HAVE_OS_H])
161 HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) 162 HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H])
163 REPLACE_ACCESS=0; AC_SUBST([REPLACE_ACCESS])
162 REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) 164 REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN])
163 REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) 165 REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE])
164 REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) 166 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
3dnl gives unlimited permission to copy and/or distribute it, 3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved. 4dnl with or without modifications, as long as this notice is preserved.
5 5
6dnl serial 9 6dnl serial 10
7 7
8AC_DEFUN([gl_UTIMENS], 8AC_DEFUN([gl_UTIMENS],
9[ 9[
@@ -35,8 +35,8 @@ AC_DEFUN([gl_UTIMENS],
35 linux-* | linux) gl_cv_func_futimesat_works="guessing yes" ;; 35 linux-* | linux) gl_cv_func_futimesat_works="guessing yes" ;;
36 # Guess yes on glibc systems. 36 # Guess yes on glibc systems.
37 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;; 37 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
38 # If we don't know, assume the worst. 38 # If we don't know, obey --enable-cross-guesses.
39 *) gl_cv_func_futimesat_works="guessing no" ;; 39 *) gl_cv_func_futimesat_works="$gl_cross_guess_normal" ;;
40 esac 40 esac
41 ]) 41 ])
42 rm -f conftest.file]) 42 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 @@
1# Detect some bugs in glibc's implementation of utimes. 1# Detect some bugs in glibc's implementation of utimes.
2# serial 6 2# serial 7
3 3
4dnl Copyright (C) 2003-2005, 2009-2019 Free Software Foundation, Inc. 4dnl Copyright (C) 2003-2005, 2009-2019 Free Software Foundation, Inc.
5dnl This file is free software; the Free Software Foundation 5dnl This file is free software; the Free Software Foundation
@@ -147,7 +147,7 @@ main ()
147 *-musl*) gl_cv_func_working_utimes="guessing yes" ;; 147 *-musl*) gl_cv_func_working_utimes="guessing yes" ;;
148 # Guess no on native Windows. 148 # Guess no on native Windows.
149 mingw*) gl_cv_func_working_utimes="guessing no" ;; 149 mingw*) gl_cv_func_working_utimes="guessing no" ;;
150 *) gl_cv_func_working_utimes="guessing no" ;; 150 *) gl_cv_func_working_utimes="$gl_cross_guess_normal" ;;
151 esac 151 esac
152 ]) 152 ])
153 ]) 153 ])