summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-07-17 09:14:31 +0200
committerUlf Hermann <ulf.hermann@qt.io>2018-07-20 14:45:07 +0000
commit6166020e5f1acc87c3f00f0d2f15f073971be545 (patch)
tree14720ecb9d6e28847c78fa77a931a5328e8afe31 /m4
parent191f0057b0b978a0e5bf9168acdcc381b4196494 (diff)
Update gnulib modules, replacing canonicalize with canonicalize-lgpl
We need realpath() now, as upstream has changed to use that. Updating single gnulib modules is not really possible, so we update everything. Change-Id: I32943a1c8af7c1ecce625dca173a942cc58d9c38 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'm4')
-rw-r--r--m4/00gnulib.m42
-rw-r--r--m4/absolute-header.m42
-rw-r--r--m4/alloca.m46
-rw-r--r--m4/argp.m42
-rw-r--r--m4/builtin-expect.m42
-rw-r--r--m4/canonicalize.m410
-rw-r--r--m4/chdir-long.m410
-rw-r--r--m4/close.m414
-rw-r--r--m4/closedir.m45
-rw-r--r--m4/configmake.m455
-rw-r--r--m4/cycle-check.m42
-rw-r--r--m4/d-ino.m414
-rw-r--r--m4/d-type.m46
-rw-r--r--m4/dirent-safer.m410
-rw-r--r--m4/dirent_h.m42
-rw-r--r--m4/dirfd.m411
-rw-r--r--m4/dirname.m42
-rw-r--r--m4/double-slash-root.m42
-rw-r--r--m4/dup.m422
-rw-r--r--m4/dup2.m42
-rw-r--r--m4/eealloc.m431
-rw-r--r--m4/errno_h.m42
-rw-r--r--m4/error.m42
-rw-r--r--m4/exponentd.m42
-rw-r--r--m4/extensions.m420
-rw-r--r--m4/extern-inline.m410
-rw-r--r--m4/fchdir.m416
-rw-r--r--m4/fcntl-o.m413
-rw-r--r--m4/fcntl-safer.m42
-rw-r--r--m4/fcntl.m42
-rw-r--r--m4/fcntl_h.m42
-rw-r--r--m4/fdopendir.m42
-rw-r--r--m4/filenamecat.m42
-rw-r--r--m4/flexmember.m42
-rw-r--r--m4/float_h.m436
-rw-r--r--m4/fnmatch.m42
-rw-r--r--m4/fstat.m429
-rw-r--r--m4/fstatat.m423
-rw-r--r--m4/fts.m419
-rw-r--r--m4/getcwd-abort-bug.m4140
-rw-r--r--m4/getcwd-path-max.m4217
-rw-r--r--m4/getcwd.m422
-rw-r--r--m4/getdelim.m48
-rw-r--r--m4/getdtablesize.m456
-rw-r--r--m4/getline.m48
-rw-r--r--m4/getopt.m42
-rw-r--r--m4/getprogname.m42
-rw-r--r--m4/gettimeofday.m4138
-rw-r--r--m4/glibc21.m434
-rw-r--r--m4/gnulib-cache.m49
-rw-r--r--m4/gnulib-common.m437
-rw-r--r--m4/gnulib-comp.m4429
-rw-r--r--m4/gnulib-tool.m42
-rw-r--r--m4/hard-locale.m42
-rw-r--r--m4/i-ring.m42
-rw-r--r--m4/include_next.m47
-rw-r--r--m4/intmax_t.m42
-rw-r--r--m4/inttypes_h.m42
-rw-r--r--m4/langinfo_h.m419
-rw-r--r--m4/largefile.m423
-rw-r--r--m4/limits-h.m42
-rw-r--r--m4/link.m414
-rw-r--r--m4/localcharset.m410
-rw-r--r--m4/locale-fr.m431
-rw-r--r--m4/locale-ja.m439
-rw-r--r--m4/locale-zh.m439
-rw-r--r--m4/longlong.m42
-rw-r--r--m4/lseek.m42
-rw-r--r--m4/lstat.m418
-rw-r--r--m4/malloc.m410
-rw-r--r--m4/malloca.m415
-rw-r--r--m4/math_h.m45
-rw-r--r--m4/mbrtowc.m428
-rw-r--r--m4/mbsinit.m42
-rw-r--r--m4/mbsrtowcs.m42
-rw-r--r--m4/mbstate_t.m42
-rw-r--r--m4/memchr.m433
-rw-r--r--m4/mempcpy.m42
-rw-r--r--m4/memrchr.m42
-rw-r--r--m4/mmap-anon.m42
-rw-r--r--m4/mode_t.m42
-rw-r--r--m4/msvc-inval.m42
-rw-r--r--m4/msvc-nothrow.m42
-rw-r--r--m4/multiarch.m42
-rw-r--r--m4/nocrash.m46
-rw-r--r--m4/obstack-printf.m42
-rw-r--r--m4/obstack.m42
-rw-r--r--m4/off_t.m42
-rw-r--r--m4/open-cloexec.m421
-rw-r--r--m4/open.m48
-rw-r--r--m4/openat.m410
-rw-r--r--m4/opendir.m45
-rw-r--r--m4/pathmax.m46
-rw-r--r--m4/pread.m42
-rw-r--r--m4/printf.m4230
-rw-r--r--m4/pwrite.m42
-rw-r--r--m4/qsort_r.m42
-rw-r--r--m4/raise.m414
-rw-r--r--m4/rawmemchr.m42
-rw-r--r--m4/read.m414
-rw-r--r--m4/readdir.m42
-rw-r--r--m4/readlink.m414
-rw-r--r--m4/realloc.m48
-rw-r--r--m4/rewinddir.m415
-rw-r--r--m4/same.m413
-rw-r--r--m4/save-cwd.m42
-rw-r--r--m4/signal_h.m42
-rw-r--r--m4/size_max.m42
-rw-r--r--m4/sleep.m414
-rw-r--r--m4/ssize_t.m42
-rw-r--r--m4/stat-time.m483
-rw-r--r--m4/stat.m4113
-rw-r--r--m4/stdalign.m44
-rw-r--r--m4/stdbool.m46
-rw-r--r--m4/stddef_h.m42
-rw-r--r--m4/stdint.m4110
-rw-r--r--m4/stdint_h.m42
-rw-r--r--m4/stdio_h.m46
-rw-r--r--m4/stdlib_h.m417
-rw-r--r--m4/stpcpy.m42
-rw-r--r--m4/stpncpy.m42
-rw-r--r--m4/strcase.m42
-rw-r--r--m4/strchrnul.m42
-rw-r--r--m4/strdup.m42
-rw-r--r--m4/strerror.m422
-rw-r--r--m4/string_h.m416
-rw-r--r--m4/strings_h.m42
-rw-r--r--m4/strndup.m42
-rw-r--r--m4/strnlen.m42
-rw-r--r--m4/strsep.m42
-rw-r--r--m4/sys_socket_h.m42
-rw-r--r--m4/sys_stat_h.m420
-rw-r--r--m4/sys_time_h.m4111
-rw-r--r--m4/sys_types_h.m419
-rw-r--r--m4/sys_utsname_h.m42
-rw-r--r--m4/sys_wait_h.m42
-rw-r--r--m4/sysexits.m42
-rw-r--r--m4/time_h.m414
-rw-r--r--m4/unistd-safer.m42
-rw-r--r--m4/unistd_h.m414
-rw-r--r--m4/vasnprintf.m42
-rw-r--r--m4/vsnprintf.m42
-rw-r--r--m4/warn-on-use.m42
-rw-r--r--m4/wchar_h.m425
-rw-r--r--m4/wchar_t.m42
-rw-r--r--m4/wctype_h.m49
-rw-r--r--m4/wint_t.m416
-rw-r--r--m4/write.m414
-rw-r--r--m4/xalloc.m47
-rw-r--r--m4/xgetcwd.m410
-rw-r--r--m4/xsize.m42
-rw-r--r--m4/xstrndup.m415
152 files changed, 1358 insertions, 1564 deletions
diff --git a/m4/00gnulib.m4 b/m4/00gnulib.m4
index bb3512fd..bd24796a 100644
--- a/m4/00gnulib.m4
+++ b/m4/00gnulib.m4
@@ -1,5 +1,5 @@
# 00gnulib.m4 serial 3
-dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2018 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.
diff --git a/m4/absolute-header.m4 b/m4/absolute-header.m4
index c73adc82..4e67e5fa 100644
--- a/m4/absolute-header.m4
+++ b/m4/absolute-header.m4
@@ -1,5 +1,5 @@
# absolute-header.m4 serial 16
-dnl Copyright (C) 2006-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2018 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.
diff --git a/m4/alloca.m4 b/m4/alloca.m4
index 7f0604cb..b9d94e89 100644
--- a/m4/alloca.m4
+++ b/m4/alloca.m4
@@ -1,5 +1,5 @@
# alloca.m4 serial 14
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2017 Free Software Foundation,
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2018 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -44,12 +44,12 @@ AC_DEFUN([gl_FUNC_ALLOCA],
AC_DEFUN([gl_PREREQ_ALLOCA], [:])
# This works around a bug in autoconf <= 2.68.
-# See <http://lists.gnu.org/archive/html/bug-gnulib/2011-06/msg00277.html>.
+# See <https://lists.gnu.org/r/bug-gnulib/2011-06/msg00277.html>.
m4_version_prereq([2.69], [] ,[
# This is taken from the following Autoconf patch:
-# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=6cd9f12520b0d6f76d3230d7565feba1ecf29497
+# https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6cd9f12520b0d6f76d3230d7565feba1ecf29497
# _AC_LIBOBJ_ALLOCA
# -----------------
diff --git a/m4/argp.m4 b/m4/argp.m4
index 2a4592c8..c440e4d7 100644
--- a/m4/argp.m4
+++ b/m4/argp.m4
@@ -1,5 +1,5 @@
# argp.m4 serial 15
-dnl Copyright (C) 2003-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2018 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.
diff --git a/m4/builtin-expect.m4 b/m4/builtin-expect.m4
index aa3364bf..a1eaf965 100644
--- a/m4/builtin-expect.m4
+++ b/m4/builtin-expect.m4
@@ -1,6 +1,6 @@
dnl Check for __builtin_expect.
-dnl Copyright 2016-2017 Free Software Foundation, Inc.
+dnl Copyright 2016-2018 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.
diff --git a/m4/canonicalize.m4 b/m4/canonicalize.m4
index c04ff8dd..0c238946 100644
--- a/m4/canonicalize.m4
+++ b/m4/canonicalize.m4
@@ -1,6 +1,6 @@
-# canonicalize.m4 serial 28
+# canonicalize.m4 serial 29
-dnl Copyright (C) 2003-2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -35,8 +35,8 @@ AC_DEFUN([gl_CANONICALIZE_LGPL],
HAVE_REALPATH=0
else
case "$gl_cv_func_realpath_works" in
- *yes) ;;
- *) REPLACE_REALPATH=1 ;;
+ *yes) ;;
+ *) REPLACE_REALPATH=1 ;;
esac
fi
else
@@ -113,6 +113,8 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu* | gnu*) 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" ;;
esac
diff --git a/m4/chdir-long.m4 b/m4/chdir-long.m4
index c7363c69..46dbbc42 100644
--- a/m4/chdir-long.m4
+++ b/m4/chdir-long.m4
@@ -1,4 +1,4 @@
-#serial 15
+#serial 16
# Use Gnulib's robust chdir function.
# It can handle arbitrarily long directory names, which means
@@ -6,7 +6,7 @@
# never fails with ENAMETOOLONG.
# Arrange to compile chdir-long.c only on systems that define PATH_MAX.
-dnl Copyright (C) 2004-2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2007, 2009-2018 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.
@@ -17,14 +17,14 @@ AC_DEFUN([gl_FUNC_CHDIR_LONG],
[
AC_REQUIRE([gl_PATHMAX_SNIPPET_PREREQ])
AC_CACHE_CHECK([whether this system has an arbitrary file name length limit],
- gl_cv_have_arbitrary_file_name_length_limit,
+ [gl_cv_have_arbitrary_file_name_length_limit],
[AC_EGREP_CPP([have_arbitrary_file_name_length_limit],
gl_PATHMAX_SNIPPET[
#ifdef PATH_MAX
have_arbitrary_file_name_length_limit
#endif],
- gl_cv_have_arbitrary_file_name_length_limit=yes,
- gl_cv_have_arbitrary_file_name_length_limit=no)])
+ [gl_cv_have_arbitrary_file_name_length_limit=yes],
+ [gl_cv_have_arbitrary_file_name_length_limit=no])])
])
AC_DEFUN([gl_PREREQ_CHDIR_LONG], [:])
diff --git a/m4/close.m4 b/m4/close.m4
index 005a43ae..f11b17ec 100644
--- a/m4/close.m4
+++ b/m4/close.m4
@@ -1,5 +1,5 @@
-# close.m4 serial 8
-dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
+# close.m4 serial 9
+dnl Copyright (C) 2008-2018 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.
@@ -7,10 +7,12 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_CLOSE],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- AC_REQUIRE([gl_MSVC_INVAL])
- if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
- REPLACE_CLOSE=1
- fi
+ m4_ifdef([gl_MSVC_INVAL], [
+ AC_REQUIRE([gl_MSVC_INVAL])
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ REPLACE_CLOSE=1
+ fi
+ ])
m4_ifdef([gl_PREREQ_SYS_H_WINSOCK2], [
gl_PREREQ_SYS_H_WINSOCK2
if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
diff --git a/m4/closedir.m4 b/m4/closedir.m4
index 40765b19..338b5a73 100644
--- a/m4/closedir.m4
+++ b/m4/closedir.m4
@@ -1,5 +1,5 @@
-# closedir.m4 serial 5
-dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
+# closedir.m4 serial 6
+dnl Copyright (C) 2011-2018 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.
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_CLOSEDIR],
[
AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_FUNCS([closedir])
if test $ac_cv_func_closedir = no; then
diff --git a/m4/configmake.m4 b/m4/configmake.m4
deleted file mode 100644
index b783296b..00000000
--- a/m4/configmake.m4
+++ /dev/null
@@ -1,55 +0,0 @@
-# configmake.m4 serial 2
-dnl Copyright (C) 2010-2017 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.
-
-# gl_CONFIGMAKE_PREP
-# ------------------
-# Guarantee all of the standard directory variables, even when used with
-# autoconf 2.59 (datarootdir wasn't supported until 2.59c, and runstatedir
-# in 2.70) or automake 1.9.6 (pkglibexecdir wasn't supported until 1.10b,
-# and runstatedir in 1.14.1).
-AC_DEFUN([gl_CONFIGMAKE_PREP],
-[
- dnl Technically, datadir should default to datarootdir. But if
- dnl autoconf is too old to provide datarootdir, then reversing the
- dnl definition is a reasonable compromise. Only AC_SUBST a variable
- dnl if it was not already defined earlier by autoconf.
- if test "x$datarootdir" = x; then
- AC_SUBST([datarootdir], ['${datadir}'])
- fi
- dnl Copy the approach used in autoconf 2.60.
- if test "x$docdir" = x; then
- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
- ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
- ['${datarootdir}/doc/${PACKAGE}'])])
- fi
- dnl The remaining variables missing from autoconf 2.59 are easier.
- if test "x$htmldir" = x; then
- AC_SUBST([htmldir], ['${docdir}'])
- fi
- if test "x$dvidir" = x; then
- AC_SUBST([dvidir], ['${docdir}'])
- fi
- if test "x$pdfdir" = x; then
- AC_SUBST([pdfdir], ['${docdir}'])
- fi
- if test "x$psdir" = x; then
- AC_SUBST([psdir], ['${docdir}'])
- fi
- if test "x$lispdir" = x; then
- AC_SUBST([lispdir], ['${datarootdir}/emacs/site-lisp'])
- fi
- if test "x$localedir" = x; then
- AC_SUBST([localedir], ['${datarootdir}/locale'])
- fi
- dnl Added in autoconf 2.70
- if test "x$runstatedir" = x; then
- AC_SUBST([runstatedir], ['${localstatedir}/run'])
- fi
-
- dnl Automake 1.9.6 only lacks pkglibexecdir; and since 1.11 merely
- dnl provides it without AC_SUBST, this blind use of AC_SUBST is safe.
- AC_SUBST([pkglibexecdir], ['${libexecdir}/${PACKAGE}'])
-])
diff --git a/m4/cycle-check.m4 b/m4/cycle-check.m4
index 6228e0b5..043e8059 100644
--- a/m4/cycle-check.m4
+++ b/m4/cycle-check.m4
@@ -1,5 +1,5 @@
#serial 7
-dnl Copyright (C) 2005-2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2018 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.
diff --git a/m4/d-ino.m4 b/m4/d-ino.m4
index 79731ca7..4f8b1a2e 100644
--- a/m4/d-ino.m4
+++ b/m4/d-ino.m4
@@ -1,11 +1,11 @@
-# serial 15
+# serial 18
dnl From Jim Meyering.
dnl
dnl Check whether struct dirent has a member named d_ino.
dnl
-# Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009-2017 Free Software
+# Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009-2018 Free Software
# Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -15,7 +15,7 @@ dnl
AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO],
[AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([for d_ino member in directory struct],
- gl_cv_struct_dirent_d_ino,
+ [gl_cv_struct_dirent_d_ino],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[#include <sys/types.h>
@@ -29,11 +29,11 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO],
return 1;
e = readdir (dp);
if (! e)
- return 2;
+ { closedir (dp); return 2; }
if (lstat (e->d_name, &st) != 0)
- return 3;
+ { closedir (dp); return 3; }
if (e->d_ino != st.st_ino)
- return 4;
+ { closedir (dp); return 4; }
closedir (dp);
return 0;
]])],
@@ -42,6 +42,8 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO],
[case "$host_os" in
# Guess yes on glibc systems with Linux kernel.
linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_struct_dirent_d_ino="guessing no" ;;
esac
diff --git a/m4/d-type.m4 b/m4/d-type.m4
index 64457c8e..ab6463d7 100644
--- a/m4/d-type.m4
+++ b/m4/d-type.m4
@@ -1,11 +1,11 @@
-# serial 11
+# serial 12
dnl From Jim Meyering.
dnl
dnl Check whether struct dirent has a member named d_type.
dnl
-# Copyright (C) 1997, 1999-2004, 2006, 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999-2004, 2006, 2009-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,7 +13,7 @@ dnl
AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE],
[AC_CACHE_CHECK([for d_type member in directory struct],
- gl_cv_struct_dirent_d_type,
+ [gl_cv_struct_dirent_d_type],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <dirent.h>
diff --git a/m4/dirent-safer.m4 b/m4/dirent-safer.m4
deleted file mode 100644
index 2ee00e4a..00000000
--- a/m4/dirent-safer.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-#serial 2
-dnl Copyright (C) 2009-2017 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.
-
-AC_DEFUN([gl_DIRENT_SAFER],
-[
- AC_CHECK_FUNCS_ONCE([fdopendir])
-])
diff --git a/m4/dirent_h.m4 b/m4/dirent_h.m4
index 1f9c4f31..b054a920 100644
--- a/m4/dirent_h.m4
+++ b/m4/dirent_h.m4
@@ -1,5 +1,5 @@
# dirent_h.m4 serial 16
-dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2018 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.
diff --git a/m4/dirfd.m4 b/m4/dirfd.m4
index b4ec3d19..48589b91 100644
--- a/m4/dirfd.m4
+++ b/m4/dirfd.m4
@@ -1,8 +1,8 @@
-# serial 24 -*- Autoconf -*-
+# serial 26 -*- Autoconf -*-
dnl Find out how to get the file descriptor associated with an open DIR*.
-# Copyright (C) 2001-2006, 2008-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2006, 2008-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -12,6 +12,7 @@ dnl From Jim Meyering
AC_DEFUN([gl_FUNC_DIRFD],
[
AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
dnl Persuade glibc <dirent.h> to declare dirfd().
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
@@ -25,15 +26,15 @@ AC_DEFUN([gl_FUNC_DIRFD],
fi
AC_CACHE_CHECK([whether dirfd is a macro],
- gl_cv_func_dirfd_macro,
+ [gl_cv_func_dirfd_macro],
[AC_EGREP_CPP([dirent_header_defines_dirfd], [
#include <sys/types.h>
#include <dirent.h>
#ifdef dirfd
dirent_header_defines_dirfd
#endif],
- gl_cv_func_dirfd_macro=yes,
- gl_cv_func_dirfd_macro=no)])
+ [gl_cv_func_dirfd_macro=yes],
+ [gl_cv_func_dirfd_macro=no])])
# Use the replacement if we have no function or macro with that name,
# or if OS/2 kLIBC whose dirfd() does not work.
diff --git a/m4/dirname.m4 b/m4/dirname.m4
index 46f5394c..820b0478 100644
--- a/m4/dirname.m4
+++ b/m4/dirname.m4
@@ -1,5 +1,5 @@
#serial 10 -*- autoconf -*-
-dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2018 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.
diff --git a/m4/double-slash-root.m4 b/m4/double-slash-root.m4
index c80f9ead..e99d4a36 100644
--- a/m4/double-slash-root.m4
+++ b/m4/double-slash-root.m4
@@ -1,5 +1,5 @@
# double-slash-root.m4 serial 4 -*- Autoconf -*-
-dnl Copyright (C) 2006, 2008-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2018 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.
diff --git a/m4/dup.m4 b/m4/dup.m4
index 74fa9bd3..ec04d690 100644
--- a/m4/dup.m4
+++ b/m4/dup.m4
@@ -1,5 +1,5 @@
-# dup.m4 serial 4
-dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
+# dup.m4 serial 6
+dnl Copyright (C) 2011-2018 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.
@@ -7,10 +7,13 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_DUP],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- AC_REQUIRE([gl_MSVC_INVAL])
- if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
- REPLACE_DUP=1
- fi
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ m4_ifdef([gl_MSVC_INVAL], [
+ AC_REQUIRE([gl_MSVC_INVAL])
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ REPLACE_DUP=1
+ fi
+ ])
dnl Replace dup() for supporting the gnulib-defined fchdir() function,
dnl to keep fchdir's bookkeeping up-to-date.
m4_ifdef([gl_FUNC_FCHDIR], [
@@ -31,7 +34,12 @@ AC_DEFUN([gl_FUNC_DUP],
],
[gl_cv_func_dup_works=yes],
[gl_cv_func_dup_works=no],
- [gl_cv_func_dup_works='guessing yes'])
+ [case "$host_os" in
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_dup_works="guessing no" ;;
+ *) gl_cv_func_dup_works="guessing yes" ;;
+ esac
+ ])
])
case "$gl_cv_func_dup_works" in
*yes) ;;
diff --git a/m4/dup2.m4 b/m4/dup2.m4
index bdb9ae25..c785d373 100644
--- a/m4/dup2.m4
+++ b/m4/dup2.m4
@@ -1,5 +1,5 @@
#serial 25
-dnl Copyright (C) 2002, 2005, 2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005, 2007, 2009-2018 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.
diff --git a/m4/eealloc.m4 b/m4/eealloc.m4
new file mode 100644
index 00000000..a5a4e267
--- /dev/null
+++ b/m4/eealloc.m4
@@ -0,0 +1,31 @@
+# eealloc.m4 serial 3
+dnl Copyright (C) 2003, 2009-2018 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.
+
+AC_DEFUN([gl_EEALLOC],
+[
+ AC_REQUIRE([gl_EEMALLOC])
+ AC_REQUIRE([gl_EEREALLOC])
+])
+
+AC_DEFUN([gl_EEMALLOC],
+[
+ _AC_FUNC_MALLOC_IF(
+ [gl_cv_func_malloc_0_nonnull=1],
+ [gl_cv_func_malloc_0_nonnull=0])
+ AC_DEFINE_UNQUOTED([MALLOC_0_IS_NONNULL], [$gl_cv_func_malloc_0_nonnull],
+ [If malloc(0) is != NULL, define this to 1. Otherwise define this
+ to 0.])
+])
+
+AC_DEFUN([gl_EEREALLOC],
+[
+ _AC_FUNC_REALLOC_IF(
+ [gl_cv_func_realloc_0_nonnull=1],
+ [gl_cv_func_realloc_0_nonnull=0])
+ AC_DEFINE_UNQUOTED([REALLOC_0_IS_NONNULL], [$gl_cv_func_realloc_0_nonnull],
+ [If realloc(NULL,0) is != NULL, define this to 1. Otherwise define this
+ to 0.])
+])
diff --git a/m4/errno_h.m4 b/m4/errno_h.m4
index 9f0f2f2f..9dbdedd5 100644
--- a/m4/errno_h.m4
+++ b/m4/errno_h.m4
@@ -1,5 +1,5 @@
# errno_h.m4 serial 12
-dnl Copyright (C) 2004, 2006, 2008-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2008-2018 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.
diff --git a/m4/error.m4 b/m4/error.m4
index 57c6f125..280fdcea 100644
--- a/m4/error.m4
+++ b/m4/error.m4
@@ -1,6 +1,6 @@
#serial 14
-# Copyright (C) 1996-1998, 2001-2004, 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 1996-1998, 2001-2004, 2009-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/m4/exponentd.m4 b/m4/exponentd.m4
index cd64b92d..7b02a4c2 100644
--- a/m4/exponentd.m4
+++ b/m4/exponentd.m4
@@ -1,5 +1,5 @@
# exponentd.m4 serial 3
-dnl Copyright (C) 2007-2008, 2010-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2008, 2010-2018 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.
diff --git a/m4/extensions.m4 b/m4/extensions.m4
index c60f537d..71a854f8 100644
--- a/m4/extensions.m4
+++ b/m4/extensions.m4
@@ -1,7 +1,7 @@
-# serial 15 -*- Autoconf -*-
+# serial 18 -*- Autoconf -*-
# Enable extensions on systems that normally disable them.
-# Copyright (C) 2003, 2006-2017 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -68,6 +68,14 @@ dnl configure.ac when using autoheader 2.62.
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
+/* Enable NetBSD extensions on NetBSD. */
+#ifndef _NETBSD_SOURCE
+# undef _NETBSD_SOURCE
+#endif
+/* Enable OpenBSD extensions on NetBSD. */
+#ifndef _OPENBSD_SOURCE
+# undef _OPENBSD_SOURCE
+#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
@@ -110,6 +118,11 @@ dnl configure.ac when using autoheader 2.62.
#ifndef _XOPEN_SOURCE
# undef _XOPEN_SOURCE
#endif
+/* Enable X/Open compliant socket functions that do not require linking
+ with -lxnet on HP-UX 11.11. */
+#ifndef _HPUX_ALT_XOPEN_SOCKET_API
+# undef _HPUX_ALT_XOPEN_SOCKET_API
+#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
@@ -128,6 +141,8 @@ dnl configure.ac when using autoheader 2.62.
AC_DEFINE([_ALL_SOURCE])
AC_DEFINE([_DARWIN_C_SOURCE])
AC_DEFINE([_GNU_SOURCE])
+ AC_DEFINE([_NETBSD_SOURCE])
+ AC_DEFINE([_OPENBSD_SOURCE])
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
AC_DEFINE([__STDC_WANT_IEC_60559_ATTRIBS_EXT__])
AC_DEFINE([__STDC_WANT_IEC_60559_BFP_EXT__])
@@ -153,6 +168,7 @@ dnl configure.ac when using autoheader 2.62.
[ac_cv_should_define__xopen_source=yes])])])
test $ac_cv_should_define__xopen_source = yes &&
AC_DEFINE([_XOPEN_SOURCE], [500])
+ AC_DEFINE([_HPUX_ALT_XOPEN_SOCKET_API])
])# AC_USE_SYSTEM_EXTENSIONS
# gl_USE_SYSTEM_EXTENSIONS
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4
index 00f96096..da8a2cc0 100644
--- a/m4/extern-inline.m4
+++ b/m4/extern-inline.m4
@@ -1,6 +1,6 @@
dnl 'extern inline' a la ISO C99.
-dnl Copyright 2012-2017 Free Software Foundation, Inc.
+dnl Copyright 2012-2018 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.
@@ -11,7 +11,7 @@ AC_DEFUN([gl_EXTERN_INLINE],
[/* Please see the Gnulib manual for how to use these macros.
Suppress extern inline with HP-UX cc, as it appears to be broken; see
- <http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>.
+ <https://lists.gnu.org/r/bug-texinfo/2013-02/msg00030.html>.
Suppress extern inline with Sun C in standards-conformance mode, as it
mishandles inline functions that call each other. E.g., for 'inline void f
@@ -28,16 +28,16 @@ AC_DEFUN([gl_EXTERN_INLINE],
from calling static functions. This bug is known to occur on:
OS X 10.8 and earlier; see:
- http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html
+ 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
FreeBSD; see:
- http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html
+ https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html
OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
- for clang but remains for g++; see <http://trac.macports.org/ticket/41033>.
+ for clang but remains for g++; see <https://trac.macports.org/ticket/41033>.
Assume DragonFly and FreeBSD will be similar. */
#if (((defined __APPLE__ && defined __MACH__) \
|| defined __DragonFly__ || defined __FreeBSD__) \
diff --git a/m4/fchdir.m4 b/m4/fchdir.m4
index b3d1b0b2..470b228f 100644
--- a/m4/fchdir.m4
+++ b/m4/fchdir.m4
@@ -1,5 +1,5 @@
-# fchdir.m4 serial 21
-dnl Copyright (C) 2006-2017 Free Software Foundation, Inc.
+# fchdir.m4 serial 24
+dnl Copyright (C) 2006-2018 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.
@@ -31,10 +31,14 @@ AC_DEFUN([gl_FUNC_FCHDIR],
[gl_cv_func_open_directory_works=yes],
[gl_cv_func_open_directory_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_open_directory_works="guessing no" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_open_directory_works="guessing no" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_open_directory_works="guessing no" ;;
esac
])])
case "$gl_cv_func_open_directory_works" in
diff --git a/m4/fcntl-o.m4 b/m4/fcntl-o.m4
index 3c3b63c5..4dc3daa2 100644
--- a/m4/fcntl-o.m4
+++ b/m4/fcntl-o.m4
@@ -1,5 +1,5 @@
-# fcntl-o.m4 serial 4
-dnl Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc.
+# fcntl-o.m4 serial 5
+dnl Copyright (C) 2006, 2009-2018 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.
@@ -18,6 +18,7 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
[AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
[AC_REQUIRE([AC_GNU_SOURCE])])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_HEADERS_ONCE([unistd.h])
AC_CHECK_FUNCS_ONCE([symlink])
AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
@@ -116,7 +117,13 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
*) gl_cv_header_working_fcntl_h='no';;
esac],
- [gl_cv_header_working_fcntl_h=cross-compiling])])
+ [case "$host_os" in
+ # Guess 'no' on native Windows.
+ mingw*) gl_cv_header_working_fcntl_h='no' ;;
+ *) gl_cv_header_working_fcntl_h=cross-compiling ;;
+ esac
+ ])
+ ])
case $gl_cv_header_working_fcntl_h in #(
*O_NOATIME* | no | cross-compiling) ac_val=0;; #(
diff --git a/m4/fcntl-safer.m4 b/m4/fcntl-safer.m4
index 4b7e1506..f088f01d 100644
--- a/m4/fcntl-safer.m4
+++ b/m4/fcntl-safer.m4
@@ -1,5 +1,5 @@
#serial 9
-dnl Copyright (C) 2005-2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2018 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.
diff --git a/m4/fcntl.m4 b/m4/fcntl.m4
index dda3b5f2..46b24451 100644
--- a/m4/fcntl.m4
+++ b/m4/fcntl.m4
@@ -1,5 +1,5 @@
# fcntl.m4 serial 9
-dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2018 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.
diff --git a/m4/fcntl_h.m4 b/m4/fcntl_h.m4
index 09c21eff..9fd3ab1a 100644
--- a/m4/fcntl_h.m4
+++ b/m4/fcntl_h.m4
@@ -1,6 +1,6 @@
# serial 15
# Configure fcntl.h.
-dnl Copyright (C) 2006-2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2007, 2009-2018 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.
diff --git a/m4/fdopendir.m4 b/m4/fdopendir.m4
index 51c2b64b..df44d5ed 100644
--- a/m4/fdopendir.m4
+++ b/m4/fdopendir.m4
@@ -1,7 +1,7 @@
# serial 10
# See if we need to provide fdopendir.
-dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2018 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.
diff --git a/m4/filenamecat.m4 b/m4/filenamecat.m4
index ce60cb47..1387aeb3 100644
--- a/m4/filenamecat.m4
+++ b/m4/filenamecat.m4
@@ -1,5 +1,5 @@
# filenamecat.m4 serial 11
-dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2018 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.
diff --git a/m4/flexmember.m4 b/m4/flexmember.m4
index 9d3b50d1..db93cf35 100644
--- a/m4/flexmember.m4
+++ b/m4/flexmember.m4
@@ -1,7 +1,7 @@
# serial 5
# Check for flexible array member support.
-# Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/m4/float_h.m4 b/m4/float_h.m4
index e8522ab1..02beb853 100644
--- a/m4/float_h.m4
+++ b/m4/float_h.m4
@@ -1,5 +1,5 @@
-# float_h.m4 serial 9
-dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
+# float_h.m4 serial 12
+dnl Copyright (C) 2007, 2009-2018 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.
@@ -14,7 +14,7 @@ AC_DEFUN([gl_FLOAT_H],
aix* | beos* | openbsd* | mirbsd* | irix*)
FLOAT_H=float.h
;;
- freebsd*)
+ freebsd* | dragonfly*)
case "$host_cpu" in
changequote(,)dnl
i[34567]86 )
@@ -24,10 +24,14 @@ changequote([,])dnl
x86_64 )
# On x86_64 systems, the C compiler may still be generating
# 32-bit code.
- AC_EGREP_CPP([yes],
- [#if defined __LP64__ || defined __x86_64__ || defined __amd64__
- yes
- #endif],
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __LP64__ || defined __x86_64__ || defined __amd64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
[],
[FLOAT_H=float.h])
;;
@@ -42,7 +46,7 @@ changequote([,])dnl
;;
esac
case "$host_os" in
- aix* | freebsd* | linux*)
+ aix* | freebsd* | dragonfly* | linux*)
if test -n "$FLOAT_H"; then
REPLACE_FLOAT_LDBL=1
fi
@@ -69,14 +73,20 @@ int main ()
[gl_cv_func_itold_works=no],
[case "$host" in
sparc*-*-linux*)
- AC_EGREP_CPP([yes],
- [#if defined __LP64__ || defined __arch64__
- yes
- #endif],
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __LP64__ || defined __arch64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
[gl_cv_func_itold_works="guessing no"],
[gl_cv_func_itold_works="guessing yes"])
;;
- *) gl_cv_func_itold_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_itold_works="guessing yes" ;;
+ *) gl_cv_func_itold_works="guessing yes" ;;
esac
])
])
diff --git a/m4/fnmatch.m4 b/m4/fnmatch.m4
index 7292c1aa..d355947e 100644
--- a/m4/fnmatch.m4
+++ b/m4/fnmatch.m4
@@ -1,6 +1,6 @@
# Check for fnmatch - serial 9. -*- coding: utf-8 -*-
-# Copyright (C) 2000-2007, 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2000-2007, 2009-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/m4/fstat.m4 b/m4/fstat.m4
index 14c871a8..f7fc3837 100644
--- a/m4/fstat.m4
+++ b/m4/fstat.m4
@@ -1,22 +1,22 @@
-# fstat.m4 serial 4
-dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
+# fstat.m4 serial 6
+dnl Copyright (C) 2011-2018 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.
AC_DEFUN([gl_FUNC_FSTAT],
[
+ AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
- AC_REQUIRE([gl_MSVC_INVAL])
- if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
- REPLACE_FSTAT=1
- fi
-
- AC_REQUIRE([gl_HEADER_SYS_STAT_H])
- if test $WINDOWS_64_BIT_ST_SIZE = 1; then
- REPLACE_FSTAT=1
- fi
+ case "$host_os" in
+ mingw* | solaris*)
+ dnl On MinGW, the original stat() returns st_atime, st_mtime,
+ dnl st_ctime values that are affected by the time zone.
+ dnl Solaris stat can return a negative tv_nsec.
+ REPLACE_FSTAT=1
+ ;;
+ esac
dnl Replace fstat() for supporting the gnulib-defined open() on directories.
m4_ifdef([gl_FUNC_FCHDIR], [
@@ -32,5 +32,8 @@ AC_DEFUN([gl_FUNC_FSTAT],
])
])
-# Prerequisites of lib/fstat.c.
-AC_DEFUN([gl_PREREQ_FSTAT], [:])
+# Prerequisites of lib/fstat.c and lib/stat-w32.c.
+AC_DEFUN([gl_PREREQ_FSTAT], [
+ AC_REQUIRE([gl_HEADER_SYS_STAT_H])
+ :
+])
diff --git a/m4/fstatat.m4 b/m4/fstatat.m4
index 75cf0110..ac353bf9 100644
--- a/m4/fstatat.m4
+++ b/m4/fstatat.m4
@@ -1,5 +1,5 @@
-# fstatat.m4 serial 3
-dnl Copyright (C) 2004-2017 Free Software Foundation, Inc.
+# fstatat.m4 serial 4
+dnl Copyright (C) 2004-2018 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.
@@ -13,14 +13,14 @@ AC_DEFUN([gl_FUNC_FSTATAT],
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([AC_CANONICAL_HOST])
AC_CHECK_FUNCS_ONCE([fstatat])
if test $ac_cv_func_fstatat = no; then
HAVE_FSTATAT=0
else
dnl Test for an AIX 7.1 bug; see
- dnl <http://lists.gnu.org/archive/html/bug-tar/2011-09/msg00015.html>.
+ dnl <https://lists.gnu.org/r/bug-tar/2011-09/msg00015.html>.
AC_CACHE_CHECK([whether fstatat (..., 0) works],
[gl_cv_func_fstatat_zero_flag],
[AC_RUN_IFELSE(
@@ -46,15 +46,20 @@ AC_DEFUN([gl_FUNC_FSTATAT],
case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
*yes+*yes) ;;
- *) REPLACE_FSTATAT=1
- case $gl_cv_func_fstatat_zero_flag in
- *yes)
+ *) REPLACE_FSTATAT=1 ;;
+ esac
+
+ case $host_os in
+ solaris*)
+ REPLACE_FSTATAT=1 ;;
+ esac
+
+ case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in
+ 1,*yes)
AC_DEFINE([HAVE_WORKING_FSTATAT_ZERO_FLAG], [1],
[Define to 1 if fstatat (..., 0) works.
For example, it does not work in AIX 7.1.])
;;
- esac
- ;;
esac
fi
])
diff --git a/m4/fts.m4 b/m4/fts.m4
index 123fcba0..2fb39c72 100644
--- a/m4/fts.m4
+++ b/m4/fts.m4
@@ -1,5 +1,5 @@
-#serial 20
-dnl Copyright (C) 2005-2017 Free Software Foundation, Inc.
+#serial 21
+dnl Copyright (C) 2005-2018 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.
@@ -16,7 +16,16 @@ AC_DEFUN([gl_FUNC_FTS_CORE],
AC_CHECK_FUNCS_ONCE([fstatfs])
AC_CHECK_HEADERS_ONCE([sys/param.h sys/vfs.h])dnl
- AC_CHECK_MEMBERS([struct statfs.f_type],,,
- [$ac_includes_default
- #include <sys/vfs.h>])
+ if test "$ac_cv_func_fstatfs,$ac_cv_header_sys_vfs_h" = yes,yes; then
+ AC_CHECK_MEMBERS([struct statfs.f_type], [], [],
+ [[$ac_includes_default
+ #include <sys/vfs.h>
+ ]])
+ if test "$ac_cv_member_struct_statfs_f_type" = yes; then
+ AC_CHECK_TYPES([__fsword_t], [], [],
+ [[$ac_includes_default
+ #include <sys/vfs.h>
+ ]])
+ fi
+ fi
])
diff --git a/m4/getcwd-abort-bug.m4 b/m4/getcwd-abort-bug.m4
deleted file mode 100644
index 84ecf859..00000000
--- a/m4/getcwd-abort-bug.m4
+++ /dev/null
@@ -1,140 +0,0 @@
-# serial 7
-# Determine whether getcwd aborts when the length of the working directory
-# name is unusually large. Any length between 4k and 16k trigger the bug
-# when using glibc-2.4.90-9 or older.
-
-# Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# From Jim Meyering
-
-# gl_FUNC_GETCWD_ABORT_BUG([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-AC_DEFUN([gl_FUNC_GETCWD_ABORT_BUG],
-[
- AC_CHECK_DECLS_ONCE([getcwd])
- AC_CHECK_HEADERS_ONCE([unistd.h])
- AC_REQUIRE([gl_PATHMAX_SNIPPET_PREREQ])
- AC_CHECK_FUNCS([getpagesize])
- AC_CACHE_CHECK([whether getcwd aborts when 4k < cwd_length < 16k],
- gl_cv_func_getcwd_abort_bug,
- [# Remove any remnants of a previous test.
- rm -rf confdir-14B---
- # Arrange for deletion of the temporary directory this test creates.
- ac_clean_files="$ac_clean_files confdir-14B---"
- dnl Please keep this in sync with tests/test-getcwd.c.
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE(
- [[
-#include <errno.h>
-#include <stdlib.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#else /* on Windows with MSVC */
-# include <direct.h>
-#endif
-#include <string.h>
-#include <sys/stat.h>
-
-]gl_PATHMAX_SNIPPET[
-
-/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
-#undef mkdir
-
-#ifndef S_IRWXU
-# define S_IRWXU 0700
-#endif
-
-/* FIXME: skip the run-test altogether on systems without getpagesize. */
-#if ! HAVE_GETPAGESIZE
-# define getpagesize() 0
-#endif
-
-/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
- the 16kB pagesize on ia64 linux. Those conditions make the code below
- trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
-#define TARGET_LEN (5 * 1024)
-
-int
-main ()
-{
- char *cwd;
- size_t initial_cwd_len;
- int fail = 0;
-
- /* The bug is triggered when PATH_MAX < getpagesize (), so skip
- this relatively expensive and invasive test if that's not true. */
-#ifdef PATH_MAX
- int bug_possible = PATH_MAX < getpagesize ();
-#else
- int bug_possible = 0;
-#endif
- if (! bug_possible)
- return 0;
-
- cwd = getcwd (NULL, 0);
- if (cwd == NULL)
- return 2;
-
- initial_cwd_len = strlen (cwd);
- free (cwd);
-
- if (1)
- {
- static char const dir_name[] = "confdir-14B---";
- size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
- / sizeof dir_name);
- size_t d;
- for (d = 0; d < desired_depth; d++)
- {
- if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
- {
- if (! (errno == ERANGE || errno == ENAMETOOLONG
- || errno == ENOENT))
- fail = 3; /* Unable to construct deep hierarchy. */
- break;
- }
- }
-
- /* If libc has the bug in question, this invocation of getcwd
- results in a failed assertion. */
- cwd = getcwd (NULL, 0);
- if (cwd == NULL)
- fail = 4; /* getcwd didn't assert, but it failed for a long name
- where the answer could have been learned. */
- free (cwd);
-
- /* Call rmdir first, in case the above chdir failed. */
- rmdir (dir_name);
- while (0 < d--)
- {
- if (chdir ("..") < 0)
- {
- fail = 5;
- break;
- }
- rmdir (dir_name);
- }
- }
-
- return fail;
-}
- ]])],
- [gl_cv_func_getcwd_abort_bug=no],
- [dnl An abort will provoke an exit code of something like 134 (128 + 6).
- dnl An exit code of 4 can also occur (in OpenBSD 4.9, NetBSD 5.1 for
- dnl example): getcwd (NULL, 0) fails rather than returning a string
- dnl longer than PATH_MAX. This may be POSIX compliant (in some
- dnl interpretations of POSIX). But gnulib's getcwd module wants to
- dnl provide a non-NULL value in this case.
- ret=$?
- if test $ret -ge 128 || test $ret = 4; then
- gl_cv_func_getcwd_abort_bug=yes
- else
- gl_cv_func_getcwd_abort_bug=no
- fi],
- [gl_cv_func_getcwd_abort_bug=yes])
- ])
- AS_IF([test $gl_cv_func_getcwd_abort_bug = yes], [$1], [$2])
-])
diff --git a/m4/getcwd-path-max.m4 b/m4/getcwd-path-max.m4
deleted file mode 100644
index 6d58d69d..00000000
--- a/m4/getcwd-path-max.m4
+++ /dev/null
@@ -1,217 +0,0 @@
-# serial 19
-# Check for several getcwd bugs with long file names.
-# If so, arrange to compile the wrapper function.
-
-# This is necessary for at least GNU libc on linux-2.4.19 and 2.4.20.
-# I've heard that this is due to a Linux kernel bug, and that it has
-# been fixed between 2.4.21-pre3 and 2.4.21-pre4.
-
-# Copyright (C) 2003-2007, 2009-2017 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# From Jim Meyering
-
-AC_DEFUN([gl_FUNC_GETCWD_PATH_MAX],
-[
- AC_CHECK_DECLS_ONCE([getcwd])
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
- AC_CHECK_HEADERS_ONCE([unistd.h])
- AC_REQUIRE([gl_PATHMAX_SNIPPET_PREREQ])
- AC_CACHE_CHECK([whether getcwd handles long file names properly],
- gl_cv_func_getcwd_path_max,
- [# Arrange for deletion of the temporary directory this test creates.
- ac_clean_files="$ac_clean_files confdir3"
- dnl Please keep this in sync with tests/test-getcwd.c.
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE(
- [[
-#include <errno.h>
-#include <stdlib.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#else
-# include <direct.h>
-#endif
-#include <string.h>
-#include <limits.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <fcntl.h>
-
-]gl_PATHMAX_SNIPPET[
-
-#ifndef AT_FDCWD
-# define AT_FDCWD 0
-#endif
-#ifdef ENAMETOOLONG
-# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
-#else
-# define is_ENAMETOOLONG(x) 0
-#endif
-
-/* Use the getcwd function, not any macro. */
-#undef getcwd
-
-/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
-#undef mkdir
-
-#ifndef S_IRWXU
-# define S_IRWXU 0700
-#endif
-
-/* The length of this name must be 8. */
-#define DIR_NAME "confdir3"
-#define DIR_NAME_LEN 8
-#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
-
-/* The length of "../". */
-#define DOTDOTSLASH_LEN 3
-
-/* Leftover bytes in the buffer, to work around library or OS bugs. */
-#define BUF_SLOP 20
-
-int
-main ()
-{
-#ifndef PATH_MAX
- /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
- at least not on a local file system. And if we were to start worrying
- about remote file systems, we'd have to enable the wrapper function
- all of the time, just to be safe. That's not worth the cost. */
- exit (0);
-#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
- - DIR_NAME_SIZE - BUF_SLOP) \
- <= PATH_MAX)
- /* FIXME: Assuming there's a system for which this is true,
- this should be done in a compile test. */
- exit (0);
-#else
- char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
- + DIR_NAME_SIZE + BUF_SLOP];
- char *cwd = getcwd (buf, PATH_MAX);
- size_t initial_cwd_len;
- size_t cwd_len;
- int fail = 0;
- size_t n_chdirs = 0;
-
- if (cwd == NULL)
- exit (10);
-
- cwd_len = initial_cwd_len = strlen (cwd);
-
- while (1)
- {
- size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
- char *c = NULL;
-
- cwd_len += DIR_NAME_SIZE;
- /* If mkdir or chdir fails, it could be that this system cannot create
- any file with an absolute name longer than PATH_MAX, such as cygwin.
- If so, leave fail as 0, because the current working directory can't
- be too long for getcwd if it can't even be created. For other
- errors, be pessimistic and consider that as a failure, too. */
- if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
- {
- if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
- fail = 20;
- break;
- }
-
- if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
- {
- struct stat sb;
-
- c = getcwd (buf, PATH_MAX);
- if (!c && errno == ENOENT)
- {
- fail = 11;
- break;
- }
- if (c)
- {
- fail = 31;
- break;
- }
- if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
- {
- fail = 21;
- break;
- }
-
- /* Our replacement needs to be able to stat() long ../../paths,
- so generate a path larger than PATH_MAX to check,
- avoiding the replacement if we can't stat(). */
- c = getcwd (buf, cwd_len + 1);
- if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
- {
- fail = 32;
- break;
- }
- }
-
- if (dotdot_max <= cwd_len - initial_cwd_len)
- {
- if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
- break;
- c = getcwd (buf, cwd_len + 1);
- if (!c)
- {
- if (! (errno == ERANGE || errno == ENOENT
- || is_ENAMETOOLONG (errno)))
- {
- fail = 22;
- break;
- }
- if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
- {
- fail = 12;
- break;
- }
- }
- }
-
- if (c && strlen (c) != cwd_len)
- {
- fail = 23;
- break;
- }
- ++n_chdirs;
- }
-
- /* Leaving behind such a deep directory is not polite.
- So clean up here, right away, even though the driving
- shell script would also clean up. */
- {
- size_t i;
-
- /* Try rmdir first, in case the chdir failed. */
- rmdir (DIR_NAME);
- for (i = 0; i <= n_chdirs; i++)
- {
- if (chdir ("..") < 0)
- break;
- if (rmdir (DIR_NAME) != 0)
- break;
- }
- }
-
- exit (fail);
-#endif
-}
- ]])],
- [gl_cv_func_getcwd_path_max=yes],
- [case $? in
- 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
- 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
- 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
- *) gl_cv_func_getcwd_path_max=no;;
- esac],
- [case "$host_os" in
- aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
- *) gl_cv_func_getcwd_path_max=no;;
- esac])
- ])
-])
diff --git a/m4/getcwd.m4 b/m4/getcwd.m4
index ec6b637c..019934d5 100644
--- a/m4/getcwd.m4
+++ b/m4/getcwd.m4
@@ -1,12 +1,12 @@
# getcwd.m4 - check for working getcwd that is compatible with glibc
-# Copyright (C) 2001, 2003-2007, 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2007, 2009-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# Written by Paul Eggert.
-# serial 13
+# serial 16
AC_DEFUN([gl_FUNC_GETCWD_NULL],
[
@@ -25,7 +25,7 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL],
char *getcwd ();
# endif
]], [[
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* mingw cwd does not start with '/', but getcwd does allocate.
However, mingw fails to honor non-zero size. */
#else
@@ -37,9 +37,9 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL],
if (! f)
return 2;
if (f[0] != '/')
- return 3;
+ { free (f); return 3; }
if (f[1] != '\0')
- return 4;
+ { free (f); return 4; }
free (f);
return 0;
}
@@ -48,12 +48,12 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL],
[gl_cv_func_getcwd_null=yes],
[gl_cv_func_getcwd_null=no],
[[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
- # Guess yes on Cygwin.
- cygwin*) gl_cv_func_getcwd_null="guessing yes";;
- # If we don't know, assume the worst.
- *) gl_cv_func_getcwd_null="guessing no";;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
+ # Guess yes on Cygwin.
+ cygwin*) gl_cv_func_getcwd_null="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_getcwd_null="guessing no";;
esac
]])])
])
diff --git a/m4/getdelim.m4 b/m4/getdelim.m4
index 24adb94f..e50af81e 100644
--- a/m4/getdelim.m4
+++ b/m4/getdelim.m4
@@ -1,6 +1,6 @@
-# getdelim.m4 serial 11
+# getdelim.m4 serial 12
-dnl Copyright (C) 2005-2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2018 Free Software Foundation, Inc.
dnl
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -39,7 +39,7 @@ AC_DEFUN([gl_FUNC_GETDELIM],
size_t siz = 0;
int len = getdelim (&line, &siz, '\n', in);
if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
- return 2;
+ { free (line); fclose (in); return 2; }
}
{
/* Test result for a NULL buffer and a non-zero size.
@@ -47,7 +47,7 @@ AC_DEFUN([gl_FUNC_GETDELIM],
char *line = NULL;
size_t siz = (size_t)(~0) / 4;
if (getdelim (&line, &siz, '\n', in) == -1)
- return 3;
+ { fclose (in); return 3; }
free (line);
}
fclose (in);
diff --git a/m4/getdtablesize.m4 b/m4/getdtablesize.m4
index 1af2a247..4cc1a8ff 100644
--- a/m4/getdtablesize.m4
+++ b/m4/getdtablesize.m4
@@ -1,5 +1,5 @@
-# getdtablesize.m4 serial 6
-dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
+# getdtablesize.m4 serial 7
+dnl Copyright (C) 2008-2018 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.
@@ -12,29 +12,43 @@ AC_DEFUN([gl_FUNC_GETDTABLESIZE],
AC_CHECK_DECLS_ONCE([getdtablesize])
if test $ac_cv_func_getdtablesize = yes &&
test $ac_cv_have_decl_getdtablesize = yes; then
- # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
- # up to an unchangeable hard limit; all other platforms correctly
- # require setrlimit before getdtablesize() can report a larger value.
AC_CACHE_CHECK([whether getdtablesize works],
[gl_cv_func_getdtablesize_works],
- [AC_RUN_IFELSE([
- AC_LANG_PROGRAM([[#include <unistd.h>]],
- [int size = getdtablesize();
- if (dup2 (0, getdtablesize()) != -1)
- return 1;
- if (size != getdtablesize())
- return 2;
- ])],
- [gl_cv_func_getdtablesize_works=yes],
- [gl_cv_func_getdtablesize_works=no],
- [case "$host_os" in
- cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
- gl_cv_func_getdtablesize_works="guessing no" ;;
- *) gl_cv_func_getdtablesize_works="guessing yes" ;;
- esac])
+ [dnl There are two concepts: the "maximum possible file descriptor value + 1"
+ dnl and the "maximum number of open file descriptors in a process".
+ dnl Per SUSv2 and POSIX, getdtablesize() should return the first one.
+ dnl On most platforms, the first and the second concept are the same.
+ dnl On OpenVMS, however, they are different and getdtablesize() returns
+ dnl the second one; thus the test below fails. But we don't care
+ dnl because there's no good way to write a replacement getdtablesize().
+ case "$host_os" in
+ vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
+ *)
+ dnl Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft
+ dnl limit up to an unchangeable hard limit; all other platforms
+ dnl correctly require setrlimit before getdtablesize() can report
+ dnl a larger value.
+ AC_RUN_IFELSE([
+ AC_LANG_PROGRAM([[#include <unistd.h>]],
+ [int size = getdtablesize();
+ if (dup2 (0, getdtablesize()) != -1)
+ return 1;
+ if (size != getdtablesize())
+ return 2;
+ ])],
+ [gl_cv_func_getdtablesize_works=yes],
+ [gl_cv_func_getdtablesize_works=no],
+ [case "$host_os" in
+ cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
+ gl_cv_func_getdtablesize_works="guessing no" ;;
+ *) gl_cv_func_getdtablesize_works="guessing yes" ;;
+ esac
+ ])
+ ;;
+ esac
])
case "$gl_cv_func_getdtablesize_works" in
- *yes) ;;
+ *yes | "no (limitation)") ;;
*) REPLACE_GETDTABLESIZE=1 ;;
esac
else
diff --git a/m4/getline.m4 b/m4/getline.m4
index dcea772e..14b62c9c 100644
--- a/m4/getline.m4
+++ b/m4/getline.m4
@@ -1,6 +1,6 @@
-# getline.m4 serial 27
+# getline.m4 serial 28
-dnl Copyright (C) 1998-2003, 2005-2007, 2009-2017 Free Software Foundation,
+dnl Copyright (C) 1998-2003, 2005-2007, 2009-2018 Free Software Foundation,
dnl Inc.
dnl
dnl This file is free software; the Free Software Foundation
@@ -46,7 +46,7 @@ AC_DEFUN([gl_FUNC_GETLINE],
size_t siz = 0;
int len = getline (&line, &siz, in);
if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
- return 2;
+ { free (line); fclose (in); return 2; }
free (line);
}
{
@@ -55,7 +55,7 @@ AC_DEFUN([gl_FUNC_GETLINE],
char *line = NULL;
size_t siz = (size_t)(~0) / 4;
if (getline (&line, &siz, in) == -1)
- return 3;
+ { fclose (in); return 3; }
free (line);
}
fclose (in);
diff --git a/m4/getopt.m4 b/m4/getopt.m4
index 3ebc7b7e..0496250d 100644
--- a/m4/getopt.m4
+++ b/m4/getopt.m4
@@ -1,5 +1,5 @@
# getopt.m4 serial 46
-dnl Copyright (C) 2002-2006, 2008-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2008-2018 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.
diff --git a/m4/getprogname.m4 b/m4/getprogname.m4
index efc06e78..3a9ba8b6 100644
--- a/m4/getprogname.m4
+++ b/m4/getprogname.m4
@@ -1,6 +1,6 @@
# getprogname.m4 - check for getprogname or replacements for it
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4
deleted file mode 100644
index 4f501e5b..00000000
--- a/m4/gettimeofday.m4
+++ /dev/null
@@ -1,138 +0,0 @@
-# serial 21
-
-# Copyright (C) 2001-2003, 2005, 2007, 2009-2017 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-dnl From Jim Meyering.
-
-AC_DEFUN([gl_FUNC_GETTIMEOFDAY],
-[
- AC_REQUIRE([AC_C_RESTRICT])
- AC_REQUIRE([gl_HEADER_SYS_TIME_H])
- AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
- AC_CHECK_FUNCS_ONCE([gettimeofday])
-
- gl_gettimeofday_timezone=void
- if test $ac_cv_func_gettimeofday != yes; then
- HAVE_GETTIMEOFDAY=0
- else
- gl_FUNC_GETTIMEOFDAY_CLOBBER
- AC_CACHE_CHECK([for gettimeofday with POSIX signature],
- [gl_cv_func_gettimeofday_posix_signature],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <sys/time.h>
- struct timeval c;
- int gettimeofday (struct timeval *restrict, void *restrict);
- ]],
- [[/* glibc uses struct timezone * rather than the POSIX void *
- if _GNU_SOURCE is defined. However, since the only portable
- use of gettimeofday uses NULL as the second parameter, and
- since the glibc definition is actually more typesafe, it is
- not worth wrapping this to get a compliant signature. */
- int (*f) (struct timeval *restrict, void *restrict)
- = gettimeofday;
- int x = f (&c, 0);
- return !(x | c.tv_sec | c.tv_usec);
- ]])],
- [gl_cv_func_gettimeofday_posix_signature=yes],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <sys/time.h>
-int gettimeofday (struct timeval *restrict, struct timezone *restrict);
- ]])],
- [gl_cv_func_gettimeofday_posix_signature=almost],
- [gl_cv_func_gettimeofday_posix_signature=no])])])
- if test $gl_cv_func_gettimeofday_posix_signature = almost; then
- gl_gettimeofday_timezone='struct timezone'
- elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
- REPLACE_GETTIMEOFDAY=1
- fi
- dnl If we override 'struct timeval', we also have to override gettimeofday.
- if test $REPLACE_STRUCT_TIMEVAL = 1; then
- REPLACE_GETTIMEOFDAY=1
- fi
- m4_ifdef([gl_FUNC_TZSET_CLOBBER], [
- gl_FUNC_TZSET_CLOBBER
- case "$gl_cv_func_tzset_clobber" in
- *yes)
- REPLACE_GETTIMEOFDAY=1
- gl_GETTIMEOFDAY_REPLACE_LOCALTIME
- AC_DEFINE([tzset], [rpl_tzset],
- [Define to rpl_tzset if the wrapper function should be used.])
- AC_DEFINE([TZSET_CLOBBERS_LOCALTIME], [1],
- [Define if tzset clobbers localtime's static buffer.])
- ;;
- esac
- ])
- fi
- AC_DEFINE_UNQUOTED([GETTIMEOFDAY_TIMEZONE], [$gl_gettimeofday_timezone],
- [Define this to 'void' or 'struct timezone' to match the system's
- declaration of the second argument to gettimeofday.])
-])
-
-
-dnl See if gettimeofday clobbers the static buffer that localtime uses
-dnl for its return value. The gettimeofday function from Mac OS X 10.0.4
-dnl (i.e., Darwin 1.3.7) has this problem.
-dnl
-dnl If it does, then arrange to use gettimeofday and localtime only via
-dnl the wrapper functions that work around the problem.
-
-AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
-[
- AC_REQUIRE([gl_HEADER_SYS_TIME_H])
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
-
- AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer],
- [gl_cv_func_gettimeofday_clobber],
- [AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <string.h>
- #include <sys/time.h>
- #include <time.h>
- #include <stdlib.h>
- ]],
- [[
- time_t t = 0;
- struct tm *lt;
- struct tm saved_lt;
- struct timeval tv;
- lt = localtime (&t);
- saved_lt = *lt;
- gettimeofday (&tv, NULL);
- return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
- ]])],
- [gl_cv_func_gettimeofday_clobber=no],
- [gl_cv_func_gettimeofday_clobber=yes],
- [# When cross-compiling:
- case "$host_os" in
- # Guess all is fine on glibc systems.
- *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
- esac
- ])])
-
- case "$gl_cv_func_gettimeofday_clobber" in
- *yes)
- REPLACE_GETTIMEOFDAY=1
- gl_GETTIMEOFDAY_REPLACE_LOCALTIME
- AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1],
- [Define if gettimeofday clobbers the localtime buffer.])
- ;;
- esac
-])
-
-AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [
- REPLACE_GMTIME=1
- REPLACE_LOCALTIME=1
-])
-
-# Prerequisites of lib/gettimeofday.c.
-AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [
- AC_CHECK_HEADERS([sys/timeb.h])
- AC_CHECK_FUNCS([_ftime])
-])
diff --git a/m4/glibc21.m4 b/m4/glibc21.m4
deleted file mode 100644
index 2e30ed68..00000000
--- a/m4/glibc21.m4
+++ /dev/null
@@ -1,34 +0,0 @@
-# glibc21.m4 serial 5
-dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2017 Free Software Foundation,
-dnl 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.
-
-# Test for the GNU C Library, version 2.1 or newer, or uClibc.
-# From Bruno Haible.
-
-AC_DEFUN([gl_GLIBC21],
- [
- AC_CACHE_CHECK([whether we are using the GNU C Library >= 2.1 or uClibc],
- [ac_cv_gnu_library_2_1],
- [AC_EGREP_CPP([Lucky],
- [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
- Lucky GNU user
- #endif
-#endif
-#ifdef __UCLIBC__
- Lucky user
-#endif
- ],
- [ac_cv_gnu_library_2_1=yes],
- [ac_cv_gnu_library_2_1=no])
- ]
- )
- AC_SUBST([GLIBC21])
- GLIBC21="$ac_cv_gnu_library_2_1"
- ]
-)
diff --git a/m4/gnulib-cache.m4 b/m4/gnulib-cache.m4
index 7c0339eb..d22427c6 100644
--- a/m4/gnulib-cache.m4
+++ b/m4/gnulib-cache.m4
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 Free Software Foundation, Inc.
+# Copyright (C) 2002-2018 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -11,7 +11,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this file. If not, see <http://www.gnu.org/licenses/>.
+# along with this file. If not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License,
# this file may be distributed as part of a program that
@@ -27,17 +27,18 @@
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --lib=libgnu --source-base=libgnu --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=config --makefile-name=gnulib.am --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files argp canonicalize error fcntl ffs fnmatch-gnu fts getline langinfo link mempcpy memrchr obstack obstack-printf pread pwrite qsort_r rawmemchr stpcpy stpncpy strsep sys_utsname sys_wait
+# gnulib-tool --import --lib=libgnu --source-base=libgnu --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=config --makefile-name=gnulib.am --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files argp canonicalize-lgpl error fcntl ffs fnmatch-gnu fstatat fts getline langinfo link mempcpy memrchr obstack obstack-printf pread pwrite qsort_r rawmemchr stpcpy stpncpy strsep sys_utsname sys_wait
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([])
gl_MODULES([
argp
- canonicalize
+ canonicalize-lgpl
error
fcntl
ffs
fnmatch-gnu
+ fstatat
fts
getline
langinfo
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index 36f2acc5..5f07855a 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,5 +1,5 @@
-# gnulib-common.m4 serial 38
-dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
+# gnulib-common.m4 serial 39
+dnl Copyright (C) 2007-2018 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.
@@ -72,6 +72,13 @@ AC_DEFUN([gl_COMMON_BODY], [
#else
# define _GL_ATTRIBUTE_CONST /* empty */
#endif
+
+/* The __malloc__ attribute was added in gcc 3. */
+#if 3 <= __GNUC__
+# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
+#else
+# define _GL_ATTRIBUTE_MALLOC /* empty */
+#endif
])
dnl Preparation for running test programs:
dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not
@@ -228,13 +235,13 @@ m4_ifndef([AS_VAR_IF],
# This is like AC_PROG_CC_C99, except that
# - AC_PROG_CC_C99 did not exist in Autoconf versions < 2.60,
# - AC_PROG_CC_C99 does not mix well with AC_PROG_CC_STDC
-# <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00367.html>,
+# <https://lists.gnu.org/r/bug-gnulib/2011-09/msg00367.html>,
# but many more packages use AC_PROG_CC_STDC than AC_PROG_CC_C99
-# <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00441.html>.
+# <https://lists.gnu.org/r/bug-gnulib/2011-09/msg00441.html>.
# Remaining problems:
# - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options
# to CC twice
-# <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00431.html>.
+# <https://lists.gnu.org/r/bug-gnulib/2011-09/msg00431.html>.
# - AC_PROG_CC_STDC is likely to change now that C11 is an ISO standard.
AC_DEFUN([gl_PROG_CC_C99],
[
@@ -347,16 +354,16 @@ AC_DEFUN([AC_C_RESTRICT],
for ac_kw in __restrict __restrict__ _Restrict restrict; do
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
- [[typedef int *int_ptr;
- int foo (int_ptr $ac_kw ip) { return ip[0]; }
- int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
- int bar (int ip[$ac_kw]) { return ip[0]; }
- ]],
- [[int s[1];
- int *$ac_kw t = s;
- t[0] = 0;
- return foo (t) + bar (t);
- ]])],
+ [[typedef int *int_ptr;
+ int foo (int_ptr $ac_kw ip) { return ip[0]; }
+ int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
+ int bar (int ip[$ac_kw]) { return ip[0]; }
+ ]],
+ [[int s[1];
+ int *$ac_kw t = s;
+ t[0] = 0;
+ return foo (t) + bar (t);
+ ]])],
[ac_cv_c_restrict=$ac_kw])
test "$ac_cv_c_restrict" != no && break
done
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index 0beef673..2e7143f4 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -1,5 +1,5 @@
# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2017 Free Software Foundation, Inc.
+# Copyright (C) 2002-2018 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -12,7 +12,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this file. If not, see <http://www.gnu.org/licenses/>.
+# along with this file. If not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License,
# this file may be distributed as part of a program that
@@ -46,27 +46,23 @@ AC_DEFUN([gl_EARLY],
# Code from module alignof:
# Code from module alloca:
# Code from module alloca-opt:
- # Code from module areadlink-with-size:
# Code from module argp:
# Code from module assure:
# Code from module at-internal:
# Code from module bitrotate:
# Code from module builtin-expect:
- # Code from module canonicalize:
+ # Code from module canonicalize-lgpl:
# Code from module chdir:
# Code from module chdir-long:
# Code from module cloexec:
# Code from module close:
# Code from module closedir:
- # Code from module configmake:
# Code from module cycle-check:
# Code from module d-ino:
# Code from module d-type:
# Code from module dev-ino:
# Code from module dirent:
- # Code from module dirent-safer:
# Code from module dirfd:
- # Code from module dirname:
# Code from module dirname-lgpl:
# Code from module dosname:
# Code from module double-slash-root:
@@ -82,9 +78,9 @@ AC_DEFUN([gl_EARLY],
# Code from module fcntl-h:
# Code from module fcntl-safer:
# Code from module fd-hook:
+ # Code from module fd-safer-flag:
# Code from module fdopendir:
# Code from module ffs:
- # Code from module file-set:
# Code from module filename:
# Code from module filenamecat-lgpl:
# Code from module flexmember:
@@ -94,7 +90,6 @@ AC_DEFUN([gl_EARLY],
# Code from module fstat:
# Code from module fstatat:
# Code from module fts:
- # Code from module getcwd:
# Code from module getcwd-lgpl:
# Code from module getdelim:
# Code from module getdtablesize:
@@ -103,11 +98,8 @@ AC_DEFUN([gl_EARLY],
# Code from module getopt-posix:
# Code from module getprogname:
# Code from module gettext-h:
- # Code from module gettimeofday:
# Code from module hard-locale:
# Code from module hash:
- # Code from module hash-pjw:
- # Code from module hash-triple:
# Code from module i-ring:
# Code from module include_next:
# Code from module intprops:
@@ -121,6 +113,7 @@ AC_DEFUN([gl_EARLY],
# Code from module lstat:
# Code from module malloc-gnu:
# Code from module malloc-posix:
+ # Code from module malloca:
# Code from module mbrtowc:
# Code from module mbsinit:
# Code from module mbsrtowcs:
@@ -149,8 +142,6 @@ AC_DEFUN([gl_EARLY],
# Code from module readdir:
# Code from module readlink:
# Code from module realloc-posix:
- # Code from module rewinddir:
- # Code from module same:
# Code from module same-inode:
# Code from module save-cwd:
# Code from module signal-h:
@@ -162,6 +153,7 @@ AC_DEFUN([gl_EARLY],
# Code from module snippet/warn-on-use:
# Code from module ssize_t:
# Code from module stat:
+ # Code from module stat-time:
# Code from module stdalign:
# Code from module stdbool:
# Code from module stddef:
@@ -183,7 +175,6 @@ AC_DEFUN([gl_EARLY],
# Code from module strnlen1:
# Code from module strsep:
# Code from module sys_stat:
- # Code from module sys_time:
# Code from module sys_types:
# Code from module sys_utsname:
# Code from module sys_wait:
@@ -197,12 +188,8 @@ AC_DEFUN([gl_EARLY],
# Code from module wchar:
# Code from module wctype-h:
# Code from module write:
- # Code from module xalloc:
- # Code from module xalloc-die:
# Code from module xalloc-oversized:
- # Code from module xgetcwd:
# Code from module xsize:
- # Code from module xstrndup:
])
# This macro should be invoked from ./configure.ac, in the section
@@ -226,11 +213,13 @@ AC_DEFUN([gl_INIT],
m4_ifdef([AM_XGETTEXT_OPTION],
[AM_][XGETTEXT_OPTION([--flag=argp_error:2:c-format])
AM_][XGETTEXT_OPTION([--flag=argp_failure:4:c-format])])
- gl_FUNC_CANONICALIZE_FILENAME_MODE
- gl_MODULE_INDICATOR([canonicalize])
- gl_MODULE_INDICATOR_FOR_TESTS([canonicalize])
+ gl_CANONICALIZE_LGPL
+ if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
+ AC_LIBOBJ([canonicalize-lgpl])
+ fi
+ gl_MODULE_INDICATOR([canonicalize-lgpl])
gl_STDLIB_MODULE_INDICATOR([canonicalize_file_name])
- gl_MODULE_INDICATOR_FOR_TESTS([cloexec])
+ gl_STDLIB_MODULE_INDICATOR([realpath])
gl_FUNC_CLOSEDIR
if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
AC_LIBOBJ([closedir])
@@ -240,31 +229,8 @@ AC_DEFUN([gl_INIT],
gl_CHECK_TYPE_STRUCT_DIRENT_D_INO
gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE
gl_DIRENT_H
- gl_DIRENT_SAFER
- gl_MODULE_INDICATOR([dirent-safer])
- gl_FUNC_DIRFD
- if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
- || test $REPLACE_DIRFD = 1; then
- AC_LIBOBJ([dirfd])
- gl_PREREQ_DIRFD
- fi
- gl_DIRENT_MODULE_INDICATOR([dirfd])
- gl_DIRNAME
- gl_MODULE_INDICATOR([dirname])
gl_DIRNAME_LGPL
gl_DOUBLE_SLASH_ROOT
- gl_FUNC_DUP
- if test $REPLACE_DUP = 1; then
- AC_LIBOBJ([dup])
- gl_PREREQ_DUP
- fi
- gl_UNISTD_MODULE_INDICATOR([dup])
- gl_FUNC_DUP2
- if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
- AC_LIBOBJ([dup2])
- gl_PREREQ_DUP2
- fi
- gl_UNISTD_MODULE_INDICATOR([dup2])
gl_HEADER_ERRNO_H
gl_ERROR
if test $ac_cv_lib_error_at_line = no; then
@@ -317,20 +283,23 @@ AC_DEFUN([gl_INIT],
gl_FUNC_FSTAT
if test $REPLACE_FSTAT = 1; then
AC_LIBOBJ([fstat])
+ case "$host_os" in
+ mingw*)
+ AC_LIBOBJ([stat-w32])
+ ;;
+ esac
gl_PREREQ_FSTAT
fi
gl_SYS_STAT_MODULE_INDICATOR([fstat])
+ gl_FUNC_FSTATAT
+ if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
+ AC_LIBOBJ([fstatat])
+ fi
+ gl_SYS_STAT_MODULE_INDICATOR([fstatat])
gl_FUNC_FTS
dnl Use this version of fts unconditionally, since the GNU libc and
dnl NetBSD versions have bugs and/or unnecessary limitations.
AC_LIBOBJ([fts])
- gl_FUNC_GETCWD
- if test $REPLACE_GETCWD = 1; then
- AC_LIBOBJ([getcwd])
- gl_PREREQ_GETCWD
- fi
- gl_MODULE_INDICATOR([getcwd])
- gl_UNISTD_MODULE_INDICATOR([getcwd])
gl_FUNC_GETLINE
if test $REPLACE_GETLINE = 1; then
AC_LIBOBJ([getline])
@@ -352,12 +321,6 @@ AC_DEFUN([gl_INIT],
gl_FUNC_GETPROGNAME
AC_SUBST([LIBINTL])
AC_SUBST([LTLIBINTL])
- gl_FUNC_GETTIMEOFDAY
- if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
- AC_LIBOBJ([gettimeofday])
- gl_PREREQ_GETTIMEOFDAY
- fi
- gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
gl_I_RING
gl_LANGINFO_H
AC_REQUIRE([gl_LARGEFILE])
@@ -429,7 +392,6 @@ AC_DEFUN([gl_INIT],
AC_LIBOBJ([opendir])
fi
gl_DIRENT_MODULE_INDICATOR([opendir])
- gl_PATHMAX
gl_FUNC_PREAD
if test $HAVE_PREAD = 0 || test $REPLACE_PREAD = 1; then
AC_LIBOBJ([pread])
@@ -460,13 +422,6 @@ AC_DEFUN([gl_INIT],
AC_LIBOBJ([readdir])
fi
gl_DIRENT_MODULE_INDICATOR([readdir])
- gl_FUNC_READLINK
- if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
- AC_LIBOBJ([readlink])
- gl_PREREQ_READLINK
- fi
- gl_UNISTD_MODULE_INDICATOR([readlink])
- gl_SAME
gl_SIZE_MAX
gl_FUNC_SLEEP
if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
@@ -474,12 +429,6 @@ AC_DEFUN([gl_INIT],
fi
gl_UNISTD_MODULE_INDICATOR([sleep])
gt_TYPE_SSIZE_T
- gl_FUNC_STAT
- if test $REPLACE_STAT = 1; then
- AC_LIBOBJ([stat])
- gl_PREREQ_STAT
- fi
- gl_SYS_STAT_MODULE_INDICATOR([stat])
gl_STDALIGN_H
AM_STDBOOL_H
gl_STDDEF_H
@@ -534,8 +483,6 @@ AC_DEFUN([gl_INIT],
gl_STRING_MODULE_INDICATOR([strsep])
gl_HEADER_SYS_STAT_H
AC_PROG_MKDIR_P
- gl_HEADER_SYS_TIME_H
- AC_PROG_MKDIR_P
gl_SYS_TYPES_H
AC_PROG_MKDIR_P
gl_SYS_UTSNAME_H
@@ -550,20 +497,20 @@ AC_DEFUN([gl_INIT],
gl_FUNC_VSNPRINTF
gl_STDIO_MODULE_INDICATOR([vsnprintf])
gl_WCHAR_H
- gl_XALLOC
- gl_XGETCWD
gl_XSIZE
- gl_XSTRNDUP
gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false
gl_gnulib_enabled_37f71b604aa9c54446783d80f42fe547=false
gl_gnulib_enabled_chdir=false
gl_gnulib_enabled_8198daae261b932d64a998f8586f5005=false
+ gl_gnulib_enabled_cloexec=false
gl_gnulib_enabled_close=false
- gl_gnulib_enabled_configmake=false
+ gl_gnulib_enabled_dirfd=false
+ gl_gnulib_enabled_dup=false
+ gl_gnulib_enabled_dup2=false
gl_gnulib_enabled_43fe87a341d9b4b93c47c3ad819a5239=false
+ gl_gnulib_enabled_64142d6558df0059920a9be1d634dadf=false
gl_gnulib_enabled_filename=false
gl_gnulib_enabled_fca9852db2a43bb33f02f0fbdbc174f6=false
- gl_gnulib_enabled_fstatat=false
gl_gnulib_enabled_3d094ef542bfdd238a5194e172bfe5f6=false
gl_gnulib_enabled_getdelim=false
gl_gnulib_enabled_getdtablesize=false
@@ -571,18 +518,22 @@ AC_DEFUN([gl_INIT],
gl_gnulib_enabled_intprops=false
gl_gnulib_enabled_localcharset=false
gl_gnulib_enabled_lseek=false
+ gl_gnulib_enabled_malloca=false
gl_gnulib_enabled_mbrtowc=false
gl_gnulib_enabled_mbsinit=false
gl_gnulib_enabled_mbsrtowcs=false
gl_gnulib_enabled_f691f076f650964c9f5598c3ee487616=false
gl_gnulib_enabled_676220fa4366efa9bdbfccf11a857c07=false
gl_gnulib_enabled_1840129d490f3a00c8a098316d0fa345=false
+ gl_gnulib_enabled_pathmax=false
gl_gnulib_enabled_raise=false
gl_gnulib_enabled_read=false
+ gl_gnulib_enabled_readlink=false
gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4=false
- gl_gnulib_enabled_rewinddir=false
gl_gnulib_enabled_d4850532688ba16d685f036076611f21=false
gl_gnulib_enabled_af7e3f0204832604ea56703236d065c9=false
+ gl_gnulib_enabled_stat=false
+ gl_gnulib_enabled_0137e3d3638b33e5819d132d0b23165c=false
gl_gnulib_enabled_f9850631dca91859e9cddac9359921c0=false
gl_gnulib_enabled_streq=false
gl_gnulib_enabled_dbb57f49352be8fb86869629a254fb72=false
@@ -622,6 +573,15 @@ AC_DEFUN([gl_INIT],
fi
gl_gnulib_enabled_8198daae261b932d64a998f8586f5005=true
func_gl_gnulib_m4code_chdir
+ func_gl_gnulib_m4code_pathmax
+ fi
+ }
+ func_gl_gnulib_m4code_cloexec ()
+ {
+ if ! $gl_gnulib_enabled_cloexec; then
+ gl_MODULE_INDICATOR_FOR_TESTS([cloexec])
+ gl_gnulib_enabled_cloexec=true
+ func_gl_gnulib_m4code_dup2
fi
}
func_gl_gnulib_m4code_close ()
@@ -641,11 +601,50 @@ AC_DEFUN([gl_INIT],
fi
fi
}
- func_gl_gnulib_m4code_configmake ()
+ func_gl_gnulib_m4code_dirfd ()
+ {
+ if ! $gl_gnulib_enabled_dirfd; then
+ gl_FUNC_DIRFD
+ if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
+ || test $REPLACE_DIRFD = 1; then
+ AC_LIBOBJ([dirfd])
+ gl_PREREQ_DIRFD
+ fi
+ gl_DIRENT_MODULE_INDICATOR([dirfd])
+ gl_gnulib_enabled_dirfd=true
+ fi
+ }
+ func_gl_gnulib_m4code_dup ()
+ {
+ if ! $gl_gnulib_enabled_dup; then
+ gl_FUNC_DUP
+ if test $REPLACE_DUP = 1; then
+ AC_LIBOBJ([dup])
+ gl_PREREQ_DUP
+ fi
+ gl_UNISTD_MODULE_INDICATOR([dup])
+ gl_gnulib_enabled_dup=true
+ if test $REPLACE_DUP = 1; then
+ func_gl_gnulib_m4code_f691f076f650964c9f5598c3ee487616
+ fi
+ fi
+ }
+ func_gl_gnulib_m4code_dup2 ()
{
- if ! $gl_gnulib_enabled_configmake; then
- gl_CONFIGMAKE_PREP
- gl_gnulib_enabled_configmake=true
+ if ! $gl_gnulib_enabled_dup2; then
+ gl_FUNC_DUP2
+ if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
+ AC_LIBOBJ([dup2])
+ gl_PREREQ_DUP2
+ fi
+ gl_UNISTD_MODULE_INDICATOR([dup2])
+ gl_gnulib_enabled_dup2=true
+ if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
+ func_gl_gnulib_m4code_f691f076f650964c9f5598c3ee487616
+ fi
+ if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
+ func_gl_gnulib_m4code_676220fa4366efa9bdbfccf11a857c07
+ fi
fi
}
func_gl_gnulib_m4code_43fe87a341d9b4b93c47c3ad819a5239 ()
@@ -654,6 +653,14 @@ AC_DEFUN([gl_INIT],
gl_gnulib_enabled_43fe87a341d9b4b93c47c3ad819a5239=true
fi
}
+ func_gl_gnulib_m4code_64142d6558df0059920a9be1d634dadf ()
+ {
+ if ! $gl_gnulib_enabled_64142d6558df0059920a9be1d634dadf; then
+ gl_MODULE_INDICATOR([fd-safer-flag])
+ gl_gnulib_enabled_64142d6558df0059920a9be1d634dadf=true
+ func_gl_gnulib_m4code_cloexec
+ fi
+ }
func_gl_gnulib_m4code_filename ()
{
if ! $gl_gnulib_enabled_filename; then
@@ -667,26 +674,6 @@ AC_DEFUN([gl_INIT],
gl_gnulib_enabled_fca9852db2a43bb33f02f0fbdbc174f6=true
fi
}
- func_gl_gnulib_m4code_fstatat ()
- {
- if ! $gl_gnulib_enabled_fstatat; then
- gl_FUNC_FSTATAT
- if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
- AC_LIBOBJ([fstatat])
- fi
- gl_SYS_STAT_MODULE_INDICATOR([fstatat])
- gl_gnulib_enabled_fstatat=true
- if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
- func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
- fi
- if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
- func_gl_gnulib_m4code_1840129d490f3a00c8a098316d0fa345
- fi
- if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
- func_gl_gnulib_m4code_d4850532688ba16d685f036076611f21
- fi
- fi
- }
func_gl_gnulib_m4code_3d094ef542bfdd238a5194e172bfe5f6 ()
{
if ! $gl_gnulib_enabled_3d094ef542bfdd238a5194e172bfe5f6; then
@@ -742,10 +729,10 @@ AC_DEFUN([gl_INIT],
{
if ! $gl_gnulib_enabled_localcharset; then
gl_LOCALCHARSET
- LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
+ dnl For backward compatibility. Some packages still use this.
+ LOCALCHARSET_TESTS_ENVIRONMENT=
AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
gl_gnulib_enabled_localcharset=true
- func_gl_gnulib_m4code_configmake
fi
}
func_gl_gnulib_m4code_lseek ()
@@ -762,6 +749,13 @@ AC_DEFUN([gl_INIT],
fi
fi
}
+ func_gl_gnulib_m4code_malloca ()
+ {
+ if ! $gl_gnulib_enabled_malloca; then
+ gl_MALLOCA
+ gl_gnulib_enabled_malloca=true
+ fi
+ }
func_gl_gnulib_m4code_mbrtowc ()
{
if ! $gl_gnulib_enabled_mbrtowc; then
@@ -837,6 +831,7 @@ AC_DEFUN([gl_INIT],
if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
AC_LIBOBJ([msvc-nothrow])
fi
+ gl_MODULE_INDICATOR([msvc-nothrow])
gl_gnulib_enabled_676220fa4366efa9bdbfccf11a857c07=true
func_gl_gnulib_m4code_f691f076f650964c9f5598c3ee487616
fi
@@ -847,6 +842,13 @@ AC_DEFUN([gl_INIT],
gl_gnulib_enabled_1840129d490f3a00c8a098316d0fa345=true
fi
}
+ func_gl_gnulib_m4code_pathmax ()
+ {
+ if ! $gl_gnulib_enabled_pathmax; then
+ gl_PATHMAX
+ gl_gnulib_enabled_pathmax=true
+ fi
+ }
func_gl_gnulib_m4code_raise ()
{
if ! $gl_gnulib_enabled_raise; then
@@ -881,6 +883,21 @@ AC_DEFUN([gl_INIT],
fi
fi
}
+ func_gl_gnulib_m4code_readlink ()
+ {
+ if ! $gl_gnulib_enabled_readlink; then
+ gl_FUNC_READLINK
+ if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
+ AC_LIBOBJ([readlink])
+ gl_PREREQ_READLINK
+ fi
+ gl_UNISTD_MODULE_INDICATOR([readlink])
+ gl_gnulib_enabled_readlink=true
+ if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
+ func_gl_gnulib_m4code_stat
+ fi
+ fi
+ }
func_gl_gnulib_m4code_61bcaca76b3e6f9ae55d57a1c3193bc4 ()
{
if ! $gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4; then
@@ -892,23 +909,13 @@ AC_DEFUN([gl_INIT],
gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4=true
fi
}
- func_gl_gnulib_m4code_rewinddir ()
- {
- if ! $gl_gnulib_enabled_rewinddir; then
- gl_FUNC_REWINDDIR
- if test $HAVE_REWINDDIR = 0; then
- AC_LIBOBJ([rewinddir])
- fi
- gl_DIRENT_MODULE_INDICATOR([rewinddir])
- gl_gnulib_enabled_rewinddir=true
- fi
- }
func_gl_gnulib_m4code_d4850532688ba16d685f036076611f21 ()
{
if ! $gl_gnulib_enabled_d4850532688ba16d685f036076611f21; then
gl_SAVE_CWD
gl_gnulib_enabled_d4850532688ba16d685f036076611f21=true
func_gl_gnulib_m4code_8198daae261b932d64a998f8586f5005
+ func_gl_gnulib_m4code_64142d6558df0059920a9be1d634dadf
func_gl_gnulib_m4code_3d094ef542bfdd238a5194e172bfe5f6
fi
}
@@ -919,6 +926,44 @@ AC_DEFUN([gl_INIT],
gl_gnulib_enabled_af7e3f0204832604ea56703236d065c9=true
fi
}
+ func_gl_gnulib_m4code_stat ()
+ {
+ if ! $gl_gnulib_enabled_stat; then
+ gl_FUNC_STAT
+ if test $REPLACE_STAT = 1; then
+ AC_LIBOBJ([stat])
+ case "$host_os" in
+ mingw*)
+ AC_LIBOBJ([stat-w32])
+ ;;
+ esac
+ gl_PREREQ_STAT
+ fi
+ gl_SYS_STAT_MODULE_INDICATOR([stat])
+ gl_gnulib_enabled_stat=true
+ if test $REPLACE_STAT = 1; then
+ func_gl_gnulib_m4code_filename
+ fi
+ if test $REPLACE_STAT = 1; then
+ func_gl_gnulib_m4code_malloca
+ fi
+ if test $REPLACE_STAT = 1; then
+ func_gl_gnulib_m4code_pathmax
+ fi
+ if test $REPLACE_STAT = 1; then
+ func_gl_gnulib_m4code_0137e3d3638b33e5819d132d0b23165c
+ fi
+ fi
+ }
+ func_gl_gnulib_m4code_0137e3d3638b33e5819d132d0b23165c ()
+ {
+ if ! $gl_gnulib_enabled_0137e3d3638b33e5819d132d0b23165c; then
+ gl_STAT_TIME
+ gl_STAT_BIRTHTIME
+ gl_gnulib_enabled_0137e3d3638b33e5819d132d0b23165c=true
+ func_gl_gnulib_m4code_intprops
+ fi
+ }
func_gl_gnulib_m4code_f9850631dca91859e9cddac9359921c0 ()
{
if ! $gl_gnulib_enabled_f9850631dca91859e9cddac9359921c0; then
@@ -995,14 +1040,17 @@ AC_DEFUN([gl_INIT],
fi
fi
}
- if test $REPLACE_DUP = 1; then
- func_gl_gnulib_m4code_f691f076f650964c9f5598c3ee487616
+ if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
+ func_gl_gnulib_m4code_malloca
fi
- if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
- func_gl_gnulib_m4code_f691f076f650964c9f5598c3ee487616
+ if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
+ func_gl_gnulib_m4code_pathmax
fi
- if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
- func_gl_gnulib_m4code_676220fa4366efa9bdbfccf11a857c07
+ if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
+ func_gl_gnulib_m4code_readlink
+ fi
+ if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
+ func_gl_gnulib_m4code_dirfd
fi
if test $ac_cv_lib_error_at_line = no; then
func_gl_gnulib_m4code_676220fa4366efa9bdbfccf11a857c07
@@ -1014,6 +1062,12 @@ AC_DEFUN([gl_INIT],
func_gl_gnulib_m4code_close
fi
if test $HAVE_FCHDIR = 0; then
+ func_gl_gnulib_m4code_dirfd
+ fi
+ if test $HAVE_FCHDIR = 0; then
+ func_gl_gnulib_m4code_dup2
+ fi
+ if test $HAVE_FCHDIR = 0; then
func_gl_gnulib_m4code_fca9852db2a43bb33f02f0fbdbc174f6
fi
if test $HAVE_FCHDIR = 0; then
@@ -1023,12 +1077,18 @@ AC_DEFUN([gl_INIT],
func_gl_gnulib_m4code_61bcaca76b3e6f9ae55d57a1c3193bc4
fi
if test $HAVE_FCHDIR = 0; then
+ func_gl_gnulib_m4code_stat
+ fi
+ if test $HAVE_FCHDIR = 0; then
func_gl_gnulib_m4code_f9850631dca91859e9cddac9359921c0
fi
if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
func_gl_gnulib_m4code_close
fi
if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
+ func_gl_gnulib_m4code_dup2
+ fi
+ if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
func_gl_gnulib_m4code_getdtablesize
fi
if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
@@ -1038,6 +1098,12 @@ AC_DEFUN([gl_INIT],
func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
fi
if test $HAVE_FDOPENDIR = 0; then
+ func_gl_gnulib_m4code_dirfd
+ fi
+ if test $HAVE_FDOPENDIR = 0; then
+ func_gl_gnulib_m4code_dup
+ fi
+ if test $HAVE_FDOPENDIR = 0; then
func_gl_gnulib_m4code_1840129d490f3a00c8a098316d0fa345
fi
if test $HAVE_FDOPENDIR = 0; then
@@ -1055,27 +1121,54 @@ AC_DEFUN([gl_INIT],
if test -n "$FNMATCH_H"; then
func_gl_gnulib_m4code_3dcce957eadc896e63ab5f137947b410
fi
- if test $REPLACE_STAT = 1; then
- func_gl_gnulib_m4code_f691f076f650964c9f5598c3ee487616
+ if test $REPLACE_FSTAT = 1; then
+ func_gl_gnulib_m4code_676220fa4366efa9bdbfccf11a857c07
fi
- if test $REPLACE_GETCWD = 1; then
- func_gl_gnulib_m4code_fstatat
+ if test $REPLACE_FSTAT = 1; then
+ func_gl_gnulib_m4code_pathmax
fi
- if test $REPLACE_GETCWD = 1; then
- func_gl_gnulib_m4code_rewinddir
+ if test $REPLACE_FSTAT = 1; then
+ func_gl_gnulib_m4code_0137e3d3638b33e5819d132d0b23165c
fi
- if test $REPLACE_GETCWD = 1; then
- func_gl_gnulib_m4code_f9850631dca91859e9cddac9359921c0
+ if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
+ func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
+ fi
+ if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
+ func_gl_gnulib_m4code_1840129d490f3a00c8a098316d0fa345
+ fi
+ if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
+ func_gl_gnulib_m4code_d4850532688ba16d685f036076611f21
+ fi
+ if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
+ func_gl_gnulib_m4code_0137e3d3638b33e5819d132d0b23165c
fi
if test $REPLACE_GETLINE = 1; then
func_gl_gnulib_m4code_getdelim
fi
if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
+ func_gl_gnulib_m4code_stat
+ fi
+ if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
func_gl_gnulib_m4code_f9850631dca91859e9cddac9359921c0
fi
+ if test $REPLACE_LSTAT = 1; then
+ func_gl_gnulib_m4code_stat
+ fi
+ if test $REPLACE_LSTAT = 1; then
+ func_gl_gnulib_m4code_0137e3d3638b33e5819d132d0b23165c
+ fi
+ if test $REPLACE_OPEN = 1; then
+ func_gl_gnulib_m4code_cloexec
+ fi
+ if test $REPLACE_OPEN = 1; then
+ func_gl_gnulib_m4code_stat
+ fi
if test $HAVE_OPENAT = 0; then
func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
fi
+ if test $REPLACE_OPENAT = 1; then
+ func_gl_gnulib_m4code_cloexec
+ fi
if test $HAVE_OPENAT = 0; then
func_gl_gnulib_m4code_1840129d490f3a00c8a098316d0fa345
fi
@@ -1083,6 +1176,9 @@ AC_DEFUN([gl_INIT],
func_gl_gnulib_m4code_d4850532688ba16d685f036076611f21
fi
if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
+ func_gl_gnulib_m4code_dirfd
+ fi
+ if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
func_gl_gnulib_m4code_filename
fi
if test $HAVE_PREAD = 0 || test $REPLACE_PREAD = 1; then
@@ -1111,12 +1207,15 @@ AC_DEFUN([gl_INIT],
AM_CONDITIONAL([gl_GNULIB_ENABLED_37f71b604aa9c54446783d80f42fe547], [$gl_gnulib_enabled_37f71b604aa9c54446783d80f42fe547])
AM_CONDITIONAL([gl_GNULIB_ENABLED_chdir], [$gl_gnulib_enabled_chdir])
AM_CONDITIONAL([gl_GNULIB_ENABLED_8198daae261b932d64a998f8586f5005], [$gl_gnulib_enabled_8198daae261b932d64a998f8586f5005])
+ AM_CONDITIONAL([gl_GNULIB_ENABLED_cloexec], [$gl_gnulib_enabled_cloexec])
AM_CONDITIONAL([gl_GNULIB_ENABLED_close], [$gl_gnulib_enabled_close])
- AM_CONDITIONAL([gl_GNULIB_ENABLED_configmake], [$gl_gnulib_enabled_configmake])
+ AM_CONDITIONAL([gl_GNULIB_ENABLED_dirfd], [$gl_gnulib_enabled_dirfd])
+ AM_CONDITIONAL([gl_GNULIB_ENABLED_dup], [$gl_gnulib_enabled_dup])
+ AM_CONDITIONAL([gl_GNULIB_ENABLED_dup2], [$gl_gnulib_enabled_dup2])
AM_CONDITIONAL([gl_GNULIB_ENABLED_43fe87a341d9b4b93c47c3ad819a5239], [$gl_gnulib_enabled_43fe87a341d9b4b93c47c3ad819a5239])
+ AM_CONDITIONAL([gl_GNULIB_ENABLED_64142d6558df0059920a9be1d634dadf], [$gl_gnulib_enabled_64142d6558df0059920a9be1d634dadf])
AM_CONDITIONAL([gl_GNULIB_ENABLED_filename], [$gl_gnulib_enabled_filename])
AM_CONDITIONAL([gl_GNULIB_ENABLED_fca9852db2a43bb33f02f0fbdbc174f6], [$gl_gnulib_enabled_fca9852db2a43bb33f02f0fbdbc174f6])
- AM_CONDITIONAL([gl_GNULIB_ENABLED_fstatat], [$gl_gnulib_enabled_fstatat])
AM_CONDITIONAL([gl_GNULIB_ENABLED_3d094ef542bfdd238a5194e172bfe5f6], [$gl_gnulib_enabled_3d094ef542bfdd238a5194e172bfe5f6])
AM_CONDITIONAL([gl_GNULIB_ENABLED_getdelim], [$gl_gnulib_enabled_getdelim])
AM_CONDITIONAL([gl_GNULIB_ENABLED_getdtablesize], [$gl_gnulib_enabled_getdtablesize])
@@ -1124,18 +1223,22 @@ AC_DEFUN([gl_INIT],
AM_CONDITIONAL([gl_GNULIB_ENABLED_intprops], [$gl_gnulib_enabled_intprops])
AM_CONDITIONAL([gl_GNULIB_ENABLED_localcharset], [$gl_gnulib_enabled_localcharset])
AM_CONDITIONAL([gl_GNULIB_ENABLED_lseek], [$gl_gnulib_enabled_lseek])
+ AM_CONDITIONAL([gl_GNULIB_ENABLED_malloca], [$gl_gnulib_enabled_malloca])
AM_CONDITIONAL([gl_GNULIB_ENABLED_mbrtowc], [$gl_gnulib_enabled_mbrtowc])
AM_CONDITIONAL([gl_GNULIB_ENABLED_mbsinit], [$gl_gnulib_enabled_mbsinit])
AM_CONDITIONAL([gl_GNULIB_ENABLED_mbsrtowcs], [$gl_gnulib_enabled_mbsrtowcs])
AM_CONDITIONAL([gl_GNULIB_ENABLED_f691f076f650964c9f5598c3ee487616], [$gl_gnulib_enabled_f691f076f650964c9f5598c3ee487616])
AM_CONDITIONAL([gl_GNULIB_ENABLED_676220fa4366efa9bdbfccf11a857c07], [$gl_gnulib_enabled_676220fa4366efa9bdbfccf11a857c07])
AM_CONDITIONAL([gl_GNULIB_ENABLED_1840129d490f3a00c8a098316d0fa345], [$gl_gnulib_enabled_1840129d490f3a00c8a098316d0fa345])
+ AM_CONDITIONAL([gl_GNULIB_ENABLED_pathmax], [$gl_gnulib_enabled_pathmax])
AM_CONDITIONAL([gl_GNULIB_ENABLED_raise], [$gl_gnulib_enabled_raise])
AM_CONDITIONAL([gl_GNULIB_ENABLED_read], [$gl_gnulib_enabled_read])
+ AM_CONDITIONAL([gl_GNULIB_ENABLED_readlink], [$gl_gnulib_enabled_readlink])
AM_CONDITIONAL([gl_GNULIB_ENABLED_61bcaca76b3e6f9ae55d57a1c3193bc4], [$gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4])
- AM_CONDITIONAL([gl_GNULIB_ENABLED_rewinddir], [$gl_gnulib_enabled_rewinddir])
AM_CONDITIONAL([gl_GNULIB_ENABLED_d4850532688ba16d685f036076611f21], [$gl_gnulib_enabled_d4850532688ba16d685f036076611f21])
AM_CONDITIONAL([gl_GNULIB_ENABLED_af7e3f0204832604ea56703236d065c9], [$gl_gnulib_enabled_af7e3f0204832604ea56703236d065c9])
+ AM_CONDITIONAL([gl_GNULIB_ENABLED_stat], [$gl_gnulib_enabled_stat])
+ AM_CONDITIONAL([gl_GNULIB_ENABLED_0137e3d3638b33e5819d132d0b23165c], [$gl_gnulib_enabled_0137e3d3638b33e5819d132d0b23165c])
AM_CONDITIONAL([gl_GNULIB_ENABLED_f9850631dca91859e9cddac9359921c0], [$gl_gnulib_enabled_f9850631dca91859e9cddac9359921c0])
AM_CONDITIONAL([gl_GNULIB_ENABLED_streq], [$gl_gnulib_enabled_streq])
AM_CONDITIONAL([gl_GNULIB_ENABLED_dbb57f49352be8fb86869629a254fb72], [$gl_gnulib_enabled_dbb57f49352be8fb86869629a254fb72])
@@ -1288,8 +1391,6 @@ AC_DEFUN([gl_FILE_LIST], [
lib/alignof.h
lib/alloca.c
lib/alloca.in.h
- lib/areadlink-with-size.c
- lib/areadlink.h
lib/arg-nonnull.h
lib/argp-ba.c
lib/argp-eexst.c
@@ -1308,32 +1409,27 @@ AC_DEFUN([gl_FILE_LIST], [
lib/assure.h
lib/at-func.c
lib/basename-lgpl.c
- lib/basename.c
lib/bitrotate.c
lib/bitrotate.h
lib/c++defs.h
- lib/canonicalize.c
- lib/canonicalize.h
+ lib/canonicalize-lgpl.c
lib/chdir-long.c
lib/chdir-long.h
lib/cloexec.c
lib/cloexec.h
lib/close.c
lib/closedir.c
- lib/config.charset
lib/creat-safer.c
lib/cycle-check.c
lib/cycle-check.h
lib/dev-ino.h
- lib/dirent--.h
lib/dirent-private.h
- lib/dirent-safer.h
lib/dirent.in.h
lib/dirfd.c
lib/dirname-lgpl.c
- lib/dirname.c
lib/dirname.h
lib/dosname.h
+ lib/dup-safer-flag.c
lib/dup-safer.c
lib/dup.c
lib/dup2.c
@@ -1349,11 +1445,10 @@ AC_DEFUN([gl_FILE_LIST], [
lib/fcntl.in.h
lib/fd-hook.c
lib/fd-hook.h
+ lib/fd-safer-flag.c
lib/fd-safer.c
lib/fdopendir.c
lib/ffs.c
- lib/file-set.c
- lib/file-set.h
lib/filename.h
lib/filenamecat-lgpl.c
lib/filenamecat.h
@@ -1370,7 +1465,6 @@ AC_DEFUN([gl_FILE_LIST], [
lib/fts.c
lib/fts_.h
lib/getcwd-lgpl.c
- lib/getcwd.c
lib/getdelim.c
lib/getdtablesize.c
lib/getline.c
@@ -1386,13 +1480,8 @@ AC_DEFUN([gl_FILE_LIST], [
lib/getprogname.c
lib/getprogname.h
lib/gettext.h
- lib/gettimeofday.c
lib/hard-locale.c
lib/hard-locale.h
- lib/hash-pjw.c
- lib/hash-pjw.h
- lib/hash-triple.c
- lib/hash-triple.h
lib/hash.c
lib/hash.h
lib/i-ring.c
@@ -1407,6 +1496,8 @@ AC_DEFUN([gl_FILE_LIST], [
lib/lseek.c
lib/lstat.c
lib/malloc.c
+ lib/malloca.c
+ lib/malloca.h
lib/mbrtowc.c
lib/mbsinit.c
lib/mbsrtowcs-impl.h
@@ -1431,7 +1522,6 @@ AC_DEFUN([gl_FILE_LIST], [
lib/openat-safer.c
lib/openat.c
lib/openat.h
- lib/opendir-safer.c
lib/opendir.c
lib/pathmax.h
lib/pipe-safer.c
@@ -1450,17 +1540,16 @@ AC_DEFUN([gl_FILE_LIST], [
lib/readdir.c
lib/readlink.c
lib/realloc.c
- lib/ref-add.sin
- lib/ref-del.sin
- lib/rewinddir.c
lib/same-inode.h
- lib/same.c
- lib/same.h
lib/save-cwd.c
lib/save-cwd.h
lib/signal.in.h
lib/size_max.h
lib/sleep.c
+ lib/stat-time.c
+ lib/stat-time.h
+ lib/stat-w32.c
+ lib/stat-w32.h
lib/stat.c
lib/stdalign.in.h
lib/stdbool.in.h
@@ -1488,7 +1577,6 @@ AC_DEFUN([gl_FILE_LIST], [
lib/strnlen1.h
lib/strsep.c
lib/sys_stat.in.h
- lib/sys_time.in.h
lib/sys_types.in.h
lib/sys_utsname.in.h
lib/sys_wait.in.h
@@ -1507,16 +1595,9 @@ AC_DEFUN([gl_FILE_LIST], [
lib/wctype-h.c
lib/wctype.in.h
lib/write.c
- lib/xalloc-die.c
lib/xalloc-oversized.h
- lib/xalloc.h
- lib/xgetcwd.c
- lib/xgetcwd.h
- lib/xmalloc.c
lib/xsize.c
lib/xsize.h
- lib/xstrndup.c
- lib/xstrndup.h
m4/00gnulib.m4
m4/absolute-header.m4
m4/alloca.m4
@@ -1527,17 +1608,16 @@ AC_DEFUN([gl_FILE_LIST], [
m4/close.m4
m4/closedir.m4
m4/codeset.m4
- m4/configmake.m4
m4/cycle-check.m4
m4/d-ino.m4
m4/d-type.m4
- m4/dirent-safer.m4
m4/dirent_h.m4
m4/dirfd.m4
m4/dirname.m4
m4/double-slash-root.m4
m4/dup.m4
m4/dup2.m4
+ m4/eealloc.m4
m4/errno_h.m4
m4/error.m4
m4/exponentd.m4
@@ -1557,16 +1637,12 @@ AC_DEFUN([gl_FILE_LIST], [
m4/fstat.m4
m4/fstatat.m4
m4/fts.m4
- m4/getcwd-abort-bug.m4
- m4/getcwd-path-max.m4
m4/getcwd.m4
m4/getdelim.m4
m4/getdtablesize.m4
m4/getline.m4
m4/getopt.m4
m4/getprogname.m4
- m4/gettimeofday.m4
- m4/glibc21.m4
m4/gnulib-common.m4
m4/hard-locale.m4
m4/i-ring.m4
@@ -1585,6 +1661,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/lseek.m4
m4/lstat.m4
m4/malloc.m4
+ m4/malloca.m4
m4/math_h.m4
m4/mbrtowc.m4
m4/mbsinit.m4
@@ -1602,6 +1679,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/obstack-printf.m4
m4/obstack.m4
m4/off_t.m4
+ m4/open-cloexec.m4
m4/open.m4
m4/openat.m4
m4/opendir.m4
@@ -1616,13 +1694,12 @@ AC_DEFUN([gl_FILE_LIST], [
m4/readdir.m4
m4/readlink.m4
m4/realloc.m4
- m4/rewinddir.m4
- m4/same.m4
m4/save-cwd.m4
m4/signal_h.m4
m4/size_max.m4
m4/sleep.m4
m4/ssize_t.m4
+ m4/stat-time.m4
m4/stat.m4
m4/stdalign.m4
m4/stdbool.m4
@@ -1644,7 +1721,6 @@ AC_DEFUN([gl_FILE_LIST], [
m4/strsep.m4
m4/sys_socket_h.m4
m4/sys_stat_h.m4
- m4/sys_time_h.m4
m4/sys_types_h.m4
m4/sys_utsname_h.m4
m4/sys_wait_h.m4
@@ -1660,8 +1736,5 @@ AC_DEFUN([gl_FILE_LIST], [
m4/wctype_h.m4
m4/wint_t.m4
m4/write.m4
- m4/xalloc.m4
- m4/xgetcwd.m4
m4/xsize.m4
- m4/xstrndup.m4
])
diff --git a/m4/gnulib-tool.m4 b/m4/gnulib-tool.m4
index 2e2d8f6d..3088e0ba 100644
--- a/m4/gnulib-tool.m4
+++ b/m4/gnulib-tool.m4
@@ -1,5 +1,5 @@
# gnulib-tool.m4 serial 2
-dnl Copyright (C) 2004-2005, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2005, 2009-2018 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.
diff --git a/m4/hard-locale.m4 b/m4/hard-locale.m4
index d79acd65..19222236 100644
--- a/m4/hard-locale.m4
+++ b/m4/hard-locale.m4
@@ -1,5 +1,5 @@
# hard-locale.m4 serial 8
-dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2018 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.
diff --git a/m4/i-ring.m4 b/m4/i-ring.m4
index 667c4d80..16471c33 100644
--- a/m4/i-ring.m4
+++ b/m4/i-ring.m4
@@ -1,5 +1,5 @@
# serial 2
-dnl Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2018 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.
diff --git a/m4/include_next.m4 b/m4/include_next.m4
index e687e232..a363cb01 100644
--- a/m4/include_next.m4
+++ b/m4/include_next.m4
@@ -1,12 +1,13 @@
-# include_next.m4 serial 23
-dnl Copyright (C) 2006-2017 Free Software Foundation, Inc.
+# include_next.m4 serial 24
+dnl Copyright (C) 2006-2018 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 From Paul Eggert and Derek Price.
-dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER.
+dnl Sets INCLUDE_NEXT, INCLUDE_NEXT_AS_FIRST_DIRECTIVE, PRAGMA_SYSTEM_HEADER,
+dnl and PRAGMA_COLUMNS.
dnl
dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to
dnl 'include' otherwise.
diff --git a/m4/intmax_t.m4 b/m4/intmax_t.m4
index ff143e9d..7ab676e6 100644
--- a/m4/intmax_t.m4
+++ b/m4/intmax_t.m4
@@ -1,5 +1,5 @@
# intmax_t.m4 serial 8
-dnl Copyright (C) 1997-2004, 2006-2007, 2009-2017 Free Software Foundation,
+dnl Copyright (C) 1997-2004, 2006-2007, 2009-2018 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/inttypes_h.m4 b/m4/inttypes_h.m4
index 92403050..954848bd 100644
--- a/m4/inttypes_h.m4
+++ b/m4/inttypes_h.m4
@@ -1,5 +1,5 @@
# inttypes_h.m4 serial 10
-dnl Copyright (C) 1997-2004, 2006, 2008-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2018 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.
diff --git a/m4/langinfo_h.m4 b/m4/langinfo_h.m4
index ea94b4ed..de077c37 100644
--- a/m4/langinfo_h.m4
+++ b/m4/langinfo_h.m4
@@ -1,5 +1,5 @@
-# langinfo_h.m4 serial 7
-dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
+# langinfo_h.m4 serial 8
+dnl Copyright (C) 2009-2018 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.
@@ -17,6 +17,7 @@ AC_DEFUN([gl_LANGINFO_H],
dnl Determine whether <langinfo.h> exists. It is missing on mingw and BeOS.
HAVE_LANGINFO_CODESET=0
HAVE_LANGINFO_T_FMT_AMPM=0
+ HAVE_LANGINFO_ALTMON=0
HAVE_LANGINFO_ERA=0
HAVE_LANGINFO_YESEXPR=0
AC_CHECK_HEADERS_ONCE([langinfo.h])
@@ -24,6 +25,7 @@ AC_DEFUN([gl_LANGINFO_H],
HAVE_LANGINFO_H=1
dnl Determine what <langinfo.h> defines. CODESET and ERA etc. are missing
dnl on OpenBSD 3.8. T_FMT_AMPM and YESEXPR, NOEXPR are missing on IRIX 5.3.
+ dnl ALTMON_* are missing on glibc 2.26 and many other systems.
AC_CACHE_CHECK([whether langinfo.h defines CODESET],
[gl_cv_header_langinfo_codeset],
[AC_COMPILE_IFELSE(
@@ -48,6 +50,18 @@ int a = T_FMT_AMPM;
if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
HAVE_LANGINFO_T_FMT_AMPM=1
fi
+ AC_CACHE_CHECK([whether langinfo.h defines ALTMON_1],
+ [gl_cv_header_langinfo_altmon],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <langinfo.h>
+int a = ALTMON_1;
+]])],
+ [gl_cv_header_langinfo_altmon=yes],
+ [gl_cv_header_langinfo_altmon=no])
+ ])
+ if test $gl_cv_header_langinfo_altmon = yes; then
+ HAVE_LANGINFO_ALTMON=1
+ fi
AC_CACHE_CHECK([whether langinfo.h defines ERA],
[gl_cv_header_langinfo_era],
[AC_COMPILE_IFELSE(
@@ -78,6 +92,7 @@ int a = YESEXPR;
AC_SUBST([HAVE_LANGINFO_H])
AC_SUBST([HAVE_LANGINFO_CODESET])
AC_SUBST([HAVE_LANGINFO_T_FMT_AMPM])
+ AC_SUBST([HAVE_LANGINFO_ALTMON])
AC_SUBST([HAVE_LANGINFO_ERA])
AC_SUBST([HAVE_LANGINFO_YESEXPR])
diff --git a/m4/largefile.m4 b/m4/largefile.m4
index 790f7c0a..bec7cd13 100644
--- a/m4/largefile.m4
+++ b/m4/largefile.m4
@@ -1,6 +1,6 @@
# Enable large files on systems where this is not the default.
-# Copyright 1992-1996, 1998-2017 Free Software Foundation, Inc.
+# Copyright 1992-1996, 1998-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -126,9 +126,24 @@ AC_DEFUN([gl_LARGEFILE],
else
WINDOWS_64_BIT_OFF_T=0
fi
- dnl But all native Windows platforms (including mingw64) have a 32-bit
- dnl st_size member in 'struct stat'.
- WINDOWS_64_BIT_ST_SIZE=1
+ dnl Some mingw versions define, if _FILE_OFFSET_BITS=64, 'struct stat'
+ dnl to 'struct _stat32i64' or 'struct _stat64' (depending on
+ dnl _USE_32BIT_TIME_T), which has a 32-bit st_size member.
+ AC_CACHE_CHECK([for 64-bit st_size], [gl_cv_member_st_size_64],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/types.h>
+ struct stat buf;
+ int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
+ ]],
+ [[]])],
+ [gl_cv_member_st_size_64=yes], [gl_cv_member_st_size_64=no])
+ ])
+ if test $gl_cv_member_st_size_64 = no; then
+ WINDOWS_64_BIT_ST_SIZE=1
+ else
+ WINDOWS_64_BIT_ST_SIZE=0
+ fi
;;
*)
dnl Nothing to do on gnulib's side.
diff --git a/m4/limits-h.m4 b/m4/limits-h.m4
index 443f91b4..511dcef5 100644
--- a/m4/limits-h.m4
+++ b/m4/limits-h.m4
@@ -1,6 +1,6 @@
dnl Check whether limits.h has needed features.
-dnl Copyright 2016-2017 Free Software Foundation, Inc.
+dnl Copyright 2016-2018 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.
diff --git a/m4/link.m4 b/m4/link.m4
index 021c3014..d06b4f29 100644
--- a/m4/link.m4
+++ b/m4/link.m4
@@ -1,5 +1,5 @@
-# link.m4 serial 8
-dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
+# link.m4 serial 10
+dnl Copyright (C) 2009-2018 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.
@@ -39,10 +39,12 @@ AC_DEFUN([gl_FUNC_LINK],
]])],
[gl_cv_func_link_works=yes], [gl_cv_func_link_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_link_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_link_works="guessing no" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_link_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_link_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_link_works="guessing no" ;;
esac
])
rm -f conftest.a conftest.b conftest.lnk])
diff --git a/m4/localcharset.m4 b/m4/localcharset.m4
index 0c1ff386..d38a2c9e 100644
--- a/m4/localcharset.m4
+++ b/m4/localcharset.m4
@@ -1,5 +1,5 @@
-# localcharset.m4 serial 7
-dnl Copyright (C) 2002, 2004, 2006, 2009-2017 Free Software Foundation, Inc.
+# localcharset.m4 serial 8
+dnl Copyright (C) 2002, 2004, 2006, 2009-2018 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.
@@ -8,10 +8,4 @@ AC_DEFUN([gl_LOCALCHARSET],
[
dnl Prerequisites of lib/localcharset.c.
AC_REQUIRE([AM_LANGINFO_CODESET])
- AC_REQUIRE([gl_FCNTL_O_FLAGS])
- AC_CHECK_DECLS_ONCE([getc_unlocked])
-
- dnl Prerequisites of the lib/Makefile.am snippet.
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([gl_GLIBC21])
])
diff --git a/m4/locale-fr.m4 b/m4/locale-fr.m4
index 93d3da7d..a37a0d20 100644
--- a/m4/locale-fr.m4
+++ b/m4/locale-fr.m4
@@ -1,5 +1,5 @@
-# locale-fr.m4 serial 17
-dnl Copyright (C) 2003, 2005-2017 Free Software Foundation, Inc.
+# locale-fr.m4 serial 19
+dnl Copyright (C) 2003, 2005-2018 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.
@@ -24,8 +24,14 @@ changequote(,)dnl
struct tm t;
char buf[16];
int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
/* Check whether the given locale name is recognized by the system. */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if defined _WIN32 && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
@@ -33,9 +39,9 @@ int main () {
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
return 1;
-#else
+# else
if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
+# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
@@ -44,32 +50,33 @@ int main () {
some unit tests fail.
On MirBSD 10, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "UTF-8". */
-#if HAVE_LANGINFO_CODESET
+# if HAVE_LANGINFO_CODESET
{
const char *cs = nl_langinfo (CODESET);
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
|| strcmp (cs, "UTF-8") == 0)
return 1;
}
-#endif
-#ifdef __CYGWIN__
+# endif
+# ifdef __CYGWIN__
/* On Cygwin, avoid locale names without encoding suffix, because the
locale_charset() function relies on the encoding suffix. Note that
LC_ALL is set on the command line. */
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
+# endif
/* Check whether in the abbreviation of the second month, the second
character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
one byte long. This excludes the UTF-8 encoding. */
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
-#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
+# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
-#endif
+# endif
return 0;
+#endif
}
changequote([,])dnl
])])
@@ -153,7 +160,7 @@ int main () {
variables, and all locales use the UTF-8 encoding. */
#if !(defined __BEOS__ || defined __HAIKU__)
/* Check whether the given locale name is recognized by the system. */
-# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if defined _WIN32 && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
diff --git a/m4/locale-ja.m4 b/m4/locale-ja.m4
index c1d1154b..9f162319 100644
--- a/m4/locale-ja.m4
+++ b/m4/locale-ja.m4
@@ -1,5 +1,5 @@
-# locale-ja.m4 serial 12
-dnl Copyright (C) 2003, 2005-2017 Free Software Foundation, Inc.
+# locale-ja.m4 serial 14
+dnl Copyright (C) 2003, 2005-2018 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.
@@ -25,9 +25,14 @@ struct tm t;
char buf[16];
int main ()
{
- const char *p;
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
/* Check whether the given locale name is recognized by the system. */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if defined _WIN32 && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
@@ -35,9 +40,9 @@ int main ()
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
return 1;
-#else
+# else
if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
+# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
@@ -46,32 +51,36 @@ int main ()
some unit tests fail.
On MirBSD 10, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "UTF-8". */
-#if HAVE_LANGINFO_CODESET
+# if HAVE_LANGINFO_CODESET
{
const char *cs = nl_langinfo (CODESET);
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
|| strcmp (cs, "UTF-8") == 0)
return 1;
}
-#endif
-#ifdef __CYGWIN__
+# endif
+# ifdef __CYGWIN__
/* On Cygwin, avoid locale names without encoding suffix, because the
locale_charset() function relies on the encoding suffix. Note that
LC_ALL is set on the command line. */
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
+# endif
/* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
on Cygwin 1.5.x. */
if (MB_CUR_MAX == 1)
return 1;
/* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
This excludes the UTF-8 encoding (except on MirBSD). */
- t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
- if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
- for (p = buf; *p != '\0'; p++)
- if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
- return 1;
+ {
+ const char *p;
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ }
return 0;
+#endif
}
changequote([,])dnl
])])
diff --git a/m4/locale-zh.m4 b/m4/locale-zh.m4
index 14594182..cfb447f0 100644
--- a/m4/locale-zh.m4
+++ b/m4/locale-zh.m4
@@ -1,5 +1,5 @@
-# locale-zh.m4 serial 12
-dnl Copyright (C) 2003, 2005-2017 Free Software Foundation, Inc.
+# locale-zh.m4 serial 14
+dnl Copyright (C) 2003, 2005-2018 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.
@@ -26,9 +26,14 @@ struct tm t;
char buf[16];
int main ()
{
- const char *p;
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
/* Check whether the given locale name is recognized by the system. */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if defined _WIN32 && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
@@ -36,9 +41,9 @@ int main ()
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
return 1;
-#else
+# else
if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
+# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
@@ -47,32 +52,36 @@ int main ()
some unit tests fail.
On MirBSD 10, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "UTF-8". */
-#if HAVE_LANGINFO_CODESET
+# if HAVE_LANGINFO_CODESET
{
const char *cs = nl_langinfo (CODESET);
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
|| strcmp (cs, "UTF-8") == 0)
return 1;
}
-#endif
-#ifdef __CYGWIN__
+# endif
+# ifdef __CYGWIN__
/* On Cygwin, avoid locale names without encoding suffix, because the
locale_charset() function relies on the encoding suffix. Note that
LC_ALL is set on the command line. */
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
+# endif
/* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
This excludes the UTF-8 encoding (except on MirBSD). */
- t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
- if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
- for (p = buf; *p != '\0'; p++)
- if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
- return 1;
+ {
+ const char *p;
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ }
/* Check whether a typical GB18030 multibyte sequence is recognized as a
single wide character. This excludes the GB2312 and GBK encodings. */
if (mblen ("\203\062\332\066", 5) != 4)
return 1;
return 0;
+#endif
}
changequote([,])dnl
])])
diff --git a/m4/longlong.m4 b/m4/longlong.m4
index 9a3294bc..27e63265 100644
--- a/m4/longlong.m4
+++ b/m4/longlong.m4
@@ -1,5 +1,5 @@
# longlong.m4 serial 17
-dnl Copyright (C) 1999-2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 1999-2007, 2009-2018 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.
diff --git a/m4/lseek.m4 b/m4/lseek.m4
index 627e772e..423b9fb6 100644
--- a/m4/lseek.m4
+++ b/m4/lseek.m4
@@ -1,5 +1,5 @@
# lseek.m4 serial 10
-dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2018 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.
diff --git a/m4/lstat.m4 b/m4/lstat.m4
index 953c117d..3694e4ce 100644
--- a/m4/lstat.m4
+++ b/m4/lstat.m4
@@ -1,6 +1,6 @@
-# serial 27
+# serial 32
-# Copyright (C) 1997-2001, 2003-2017 Free Software Foundation, Inc.
+# Copyright (C) 1997-2001, 2003-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -10,14 +10,15 @@ dnl From Jim Meyering.
AC_DEFUN([gl_FUNC_LSTAT],
[
+ AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
dnl If lstat does not exist, the replacement <sys/stat.h> does
dnl "#define lstat stat", and lstat.c is a no-op.
AC_CHECK_FUNCS_ONCE([lstat])
if test $ac_cv_func_lstat = yes; then
AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
- case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
- *no)
+ case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
+ solaris* | *no)
REPLACE_LSTAT=1
;;
esac
@@ -33,6 +34,7 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
[
dnl We don't use AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK any more, because it
dnl is no longer maintained in Autoconf and because it invokes AC_LIBOBJ.
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether lstat correctly handles trailing slash],
[gl_cv_func_lstat_dereferences_slashed_symlink],
[rm -f conftest.sym conftest.file
@@ -51,9 +53,15 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
[gl_cv_func_lstat_dereferences_slashed_symlink=yes],
[gl_cv_func_lstat_dereferences_slashed_symlink=no],
[case "$host_os" in
- *-gnu*)
+ linux-* | linux)
+ # Guess yes on Linux systems.
+ gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
+ *-gnu* | gnu*)
# Guess yes on glibc systems.
gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
+ mingw*)
+ # 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" ;;
diff --git a/m4/malloc.m4 b/m4/malloc.m4
index e1d2ec68..4c182b41 100644
--- a/m4/malloc.m4
+++ b/m4/malloc.m4
@@ -1,5 +1,5 @@
-# malloc.m4 serial 15
-dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
+# malloc.m4 serial 17
+dnl Copyright (C) 2007, 2009-2018 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.
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
m4_version_prereq([2.70], [] ,[
# This is adapted with modifications from upstream Autoconf here:
-# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
+# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
AC_DEFUN([_AC_FUNC_MALLOC_IF],
[
AC_REQUIRE([AC_HEADER_STDC])dnl
@@ -32,7 +32,7 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF],
[ac_cv_func_malloc_0_nonnull=no],
[case "$host_os" in
# Guess yes on platforms where we know the result.
- *-gnu* | freebsd* | netbsd* | openbsd* \
+ *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
| hpux* | solaris* | cygwin* | mingw*)
ac_cv_func_malloc_0_nonnull=yes ;;
# If we don't know, assume the worst.
@@ -91,7 +91,7 @@ AC_DEFUN([gl_CHECK_MALLOC_POSIX],
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[]],
- [[#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ [[#if defined _WIN32 && ! defined __CYGWIN__
choke me
#endif
]])],
diff --git a/m4/malloca.m4 b/m4/malloca.m4
new file mode 100644
index 00000000..2251e613
--- /dev/null
+++ b/m4/malloca.m4
@@ -0,0 +1,15 @@
+# malloca.m4 serial 1
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2018 Free Software Foundation,
+dnl 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.
+
+AC_DEFUN([gl_MALLOCA],
+[
+ dnl Use the autoconf tests for alloca(), but not the AC_SUBSTed variables
+ dnl @ALLOCA@ and @LTALLOCA@.
+ dnl gl_FUNC_ALLOCA dnl Already brought in by the module dependencies.
+ AC_REQUIRE([gl_EEMALLOC])
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+])
diff --git a/m4/math_h.m4 b/m4/math_h.m4
index 6db72ca6..d0c7ed11 100644
--- a/m4/math_h.m4
+++ b/m4/math_h.m4
@@ -1,5 +1,5 @@
-# math_h.m4 serial 115
-dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
+# math_h.m4 serial 116
+dnl Copyright (C) 2007-2018 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.
@@ -291,6 +291,7 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
REPLACE_HYPOTL=0; AC_SUBST([REPLACE_HYPOTL])
REPLACE_ILOGB=0; AC_SUBST([REPLACE_ILOGB])
REPLACE_ILOGBF=0; AC_SUBST([REPLACE_ILOGBF])
+ REPLACE_ILOGBL=0; AC_SUBST([REPLACE_ILOGBL])
REPLACE_ISFINITE=0; AC_SUBST([REPLACE_ISFINITE])
REPLACE_ISINF=0; AC_SUBST([REPLACE_ISINF])
REPLACE_ISNAN=0; AC_SUBST([REPLACE_ISNAN])
diff --git a/m4/mbrtowc.m4 b/m4/mbrtowc.m4
index 536183f4..c706d04b 100644
--- a/m4/mbrtowc.m4
+++ b/m4/mbrtowc.m4
@@ -1,5 +1,5 @@
-# mbrtowc.m4 serial 27 -*- coding: utf-8 -*-
-dnl Copyright (C) 2001-2002, 2004-2005, 2008-2017 Free Software Foundation,
+# mbrtowc.m4 serial 31 -*- coding: utf-8 -*-
+dnl Copyright (C) 2001-2002, 2004-2005, 2008-2018 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -563,10 +563,11 @@ AC_DEFUN([gl_MBRTOWC_EMPTY_INPUT],
dnl is present.
changequote(,)dnl
case "$host_os" in
- # Guess no on AIX and glibc systems.
- aix* | *-gnu*)
- gl_cv_func_mbrtowc_empty_input="guessing no" ;;
- *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
+ # Guess no on AIX and glibc systems.
+ aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
+ *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
esac
changequote([,])dnl
AC_RUN_IFELSE(
@@ -592,6 +593,7 @@ dnl https://sourceware.org/bugzilla/show_bug.cgi?id=19932
AC_DEFUN([gl_MBRTOWC_C_LOCALE],
[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether the C locale is free of encoding errors],
[gl_cv_C_locale_sans_EILSEQ],
[
@@ -622,11 +624,17 @@ AC_DEFUN([gl_MBRTOWC_C_LOCALE],
]])],
[gl_cv_C_locale_sans_EILSEQ=yes],
[gl_cv_C_locale_sans_EILSEQ=no],
- [:])])
+ [case "$host_os" in
+ # Guess yes on native Windows.
+ mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;;
+ esac
+ ])
+ ])
])
# Prerequisites of lib/mbrtowc.c.
AC_DEFUN([gl_PREREQ_MBRTOWC], [
+ AC_REQUIRE([AC_C_INLINE])
:
])
@@ -639,7 +647,7 @@ AC_DEFUN([AC_FUNC_MBRTOWC],
[
dnl Same as AC_FUNC_MBRTOWC in autoconf-2.60.
AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
- gl_cv_func_mbrtowc,
+ [gl_cv_func_mbrtowc],
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
@@ -655,8 +663,8 @@ AC_DEFUN([AC_FUNC_MBRTOWC],
size_t n = 1;
mbstate_t state;
return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])],
- gl_cv_func_mbrtowc=yes,
- gl_cv_func_mbrtowc=no)])
+ [gl_cv_func_mbrtowc=yes],
+ [gl_cv_func_mbrtowc=no])])
if test $gl_cv_func_mbrtowc = yes; then
AC_DEFINE([HAVE_MBRTOWC], [1],
[Define to 1 if mbrtowc and mbstate_t are properly declared.])
diff --git a/m4/mbsinit.m4 b/m4/mbsinit.m4
index 5904a510..5cba3df0 100644
--- a/m4/mbsinit.m4
+++ b/m4/mbsinit.m4
@@ -1,5 +1,5 @@
# mbsinit.m4 serial 8
-dnl Copyright (C) 2008, 2010-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2010-2018 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.
diff --git a/m4/mbsrtowcs.m4 b/m4/mbsrtowcs.m4
index 79b8d767..871dd965 100644
--- a/m4/mbsrtowcs.m4
+++ b/m4/mbsrtowcs.m4
@@ -1,5 +1,5 @@
# mbsrtowcs.m4 serial 13
-dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2018 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.
diff --git a/m4/mbstate_t.m4 b/m4/mbstate_t.m4
index 6325cf3a..004aa0d1 100644
--- a/m4/mbstate_t.m4
+++ b/m4/mbstate_t.m4
@@ -1,5 +1,5 @@
# mbstate_t.m4 serial 13
-dnl Copyright (C) 2000-2002, 2008-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2008-2018 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.
diff --git a/m4/memchr.m4 b/m4/memchr.m4
index b6ec8140..83c65c11 100644
--- a/m4/memchr.m4
+++ b/m4/memchr.m4
@@ -1,11 +1,13 @@
-# memchr.m4 serial 12
-dnl Copyright (C) 2002-2004, 2009-2017 Free Software Foundation, Inc.
+# memchr.m4 serial 13
+dnl Copyright (C) 2002-2004, 2009-2018 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.
AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
dnl Check for prerequisites for memory fence checks.
gl_FUNC_MMAP_ANON
AC_CHECK_HEADERS_ONCE([sys/mman.h])
@@ -23,10 +25,10 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
if test $HAVE_MEMCHR = 1; then
# Detect platform-specific bugs in some versions of glibc:
# memchr should not dereference anything with length 0
- # http://bugzilla.redhat.com/499689
+ # https://bugzilla.redhat.com/show_bug.cgi?id=499689
# memchr should not dereference overestimated length after a match
- # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
- # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
+ # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
+ # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
# Assume that memchr works on platforms that lack mprotect.
AC_CACHE_CHECK([whether memchr works], [gl_cv_func_memchr_works],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([[
@@ -73,12 +75,21 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
result |= 4;
}
return result;
-]])], [gl_cv_func_memchr_works=yes], [gl_cv_func_memchr_works=no],
- [dnl Be pessimistic for now.
- gl_cv_func_memchr_works="guessing no"])])
- if test "$gl_cv_func_memchr_works" != yes; then
- REPLACE_MEMCHR=1
- fi
+]])],
+ [gl_cv_func_memchr_works=yes],
+ [gl_cv_func_memchr_works=no],
+ [case "$host_os" in
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_memchr_works="guessing yes" ;;
+ # Be pessimistic for now.
+ *) gl_cv_func_memchr_works="guessing no" ;;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_memchr_works" in
+ *yes) ;;
+ *) REPLACE_MEMCHR=1 ;;
+ esac
fi
])
diff --git a/m4/mempcpy.m4 b/m4/mempcpy.m4
index 3faec3c8..eedf9312 100644
--- a/m4/mempcpy.m4
+++ b/m4/mempcpy.m4
@@ -1,5 +1,5 @@
# mempcpy.m4 serial 11
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2017 Free Software Foundation,
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2018 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/memrchr.m4 b/m4/memrchr.m4
index e180f610..a036b391 100644
--- a/m4/memrchr.m4
+++ b/m4/memrchr.m4
@@ -1,5 +1,5 @@
# memrchr.m4 serial 10
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2017 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2018 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/mmap-anon.m4 b/m4/mmap-anon.m4
index 263687d1..55fea82b 100644
--- a/m4/mmap-anon.m4
+++ b/m4/mmap-anon.m4
@@ -1,5 +1,5 @@
# mmap-anon.m4 serial 10
-dnl Copyright (C) 2005, 2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009-2018 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.
diff --git a/m4/mode_t.m4 b/m4/mode_t.m4
index 75d372a4..83e276c5 100644
--- a/m4/mode_t.m4
+++ b/m4/mode_t.m4
@@ -1,5 +1,5 @@
# mode_t.m4 serial 2
-dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2018 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.
diff --git a/m4/msvc-inval.m4 b/m4/msvc-inval.m4
index 33243751..55baeecc 100644
--- a/m4/msvc-inval.m4
+++ b/m4/msvc-inval.m4
@@ -1,5 +1,5 @@
# msvc-inval.m4 serial 1
-dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2018 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.
diff --git a/m4/msvc-nothrow.m4 b/m4/msvc-nothrow.m4
index 3014661f..74ae4277 100644
--- a/m4/msvc-nothrow.m4
+++ b/m4/msvc-nothrow.m4
@@ -1,5 +1,5 @@
# msvc-nothrow.m4 serial 1
-dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2018 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.
diff --git a/m4/multiarch.m4 b/m4/multiarch.m4
index 30006cb3..38a11cc1 100644
--- a/m4/multiarch.m4
+++ b/m4/multiarch.m4
@@ -1,5 +1,5 @@
# multiarch.m4 serial 7
-dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2018 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.
diff --git a/m4/nocrash.m4 b/m4/nocrash.m4
index 2c2c5fb4..49140074 100644
--- a/m4/nocrash.m4
+++ b/m4/nocrash.m4
@@ -1,5 +1,5 @@
-# nocrash.m4 serial 4
-dnl Copyright (C) 2005, 2009-2017 Free Software Foundation, Inc.
+# nocrash.m4 serial 5
+dnl Copyright (C) 2005, 2009-2018 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.
@@ -79,7 +79,7 @@ nocrash_init (void)
}
}
}
-#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#elif defined _WIN32 && ! defined __CYGWIN__
/* Avoid a crash on native Windows. */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
diff --git a/m4/obstack-printf.m4 b/m4/obstack-printf.m4
index 3aef52f5..262c492c 100644
--- a/m4/obstack-printf.m4
+++ b/m4/obstack-printf.m4
@@ -1,5 +1,5 @@
# obstack-printf.m4 serial 4
-dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2018 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.
diff --git a/m4/obstack.m4 b/m4/obstack.m4
index 61237620..80e5b3c4 100644
--- a/m4/obstack.m4
+++ b/m4/obstack.m4
@@ -1,6 +1,6 @@
# See if we need to provide obstacks.
-dnl Copyright 1996-2017 Free Software Foundation, Inc.
+dnl Copyright 1996-2018 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.
diff --git a/m4/off_t.m4 b/m4/off_t.m4
index 92c45ef7..f4d57875 100644
--- a/m4/off_t.m4
+++ b/m4/off_t.m4
@@ -1,5 +1,5 @@
# off_t.m4 serial 1
-dnl Copyright (C) 2012-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2018 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.
diff --git a/m4/open-cloexec.m4 b/m4/open-cloexec.m4
new file mode 100644
index 00000000..a272784e
--- /dev/null
+++ b/m4/open-cloexec.m4
@@ -0,0 +1,21 @@
+# Test whether O_CLOEXEC is defined.
+
+dnl Copyright 2017-2018 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.
+
+AC_DEFUN([gl_PREPROC_O_CLOEXEC],
+[
+ AC_CACHE_CHECK([for O_CLOEXEC],
+ [gl_cv_macro_O_CLOEXEC],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <fcntl.h>
+ #ifndef O_CLOEXEC
+ choke me;
+ #endif
+ ]],
+ [[return O_CLOEXEC;]])],
+ [gl_cv_macro_O_CLOEXEC=yes],
+ [gl_cv_macro_O_CLOEXEC=no])])
+])
diff --git a/m4/open.m4 b/m4/open.m4
index 2a869dc6..8b3d4024 100644
--- a/m4/open.m4
+++ b/m4/open.m4
@@ -1,5 +1,5 @@
-# open.m4 serial 14
-dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
+# open.m4 serial 15
+dnl Copyright (C) 2007-2018 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.
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_OPEN],
[
AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_PREPROC_O_CLOEXEC])
case "$host_os" in
mingw* | pw*)
REPLACE_OPEN=1
@@ -15,6 +16,9 @@ AC_DEFUN([gl_FUNC_OPEN],
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])
+ 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.
diff --git a/m4/openat.m4 b/m4/openat.m4
index 55b946f9..e8377201 100644
--- a/m4/openat.m4
+++ b/m4/openat.m4
@@ -1,7 +1,7 @@
-# serial 45
+# serial 46
# See if we need to use our replacement for Solaris' openat et al functions.
-dnl Copyright (C) 2004-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2018 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.
@@ -14,10 +14,12 @@ AC_DEFUN([gl_FUNC_OPENAT],
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_CHECK_FUNCS_ONCE([openat])
AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
- case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
- yes+*yes)
+ AC_REQUIRE([gl_PREPROC_O_CLOEXEC])
+ case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
+ yes+*yes+yes)
;;
yes+*)
+ # Solaris 10 lacks O_CLOEXEC.
# Solaris 9 has *at functions, but uniformly mishandles trailing
# slash in all of them.
REPLACE_OPENAT=1
diff --git a/m4/opendir.m4 b/m4/opendir.m4
index b970e655..5609536a 100644
--- a/m4/opendir.m4
+++ b/m4/opendir.m4
@@ -1,5 +1,5 @@
-# opendir.m4 serial 4
-dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
+# opendir.m4 serial 5
+dnl Copyright (C) 2011-2018 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.
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_OPENDIR],
[
AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_FUNCS([opendir])
if test $ac_cv_func_opendir = no; then
diff --git a/m4/pathmax.m4 b/m4/pathmax.m4
index c6c9f24d..292a2569 100644
--- a/m4/pathmax.m4
+++ b/m4/pathmax.m4
@@ -1,5 +1,5 @@
-# pathmax.m4 serial 10
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2017 Free Software Foundation,
+# pathmax.m4 serial 11
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2018 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -29,7 +29,7 @@ AC_DEFUN([gl_PATHMAX_SNIPPET], [[
# undef PATH_MAX
# define PATH_MAX 1024
#endif
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# undef PATH_MAX
# define PATH_MAX 260
#endif
diff --git a/m4/pread.m4 b/m4/pread.m4
index 18ffe9d2..783f4eec 100644
--- a/m4/pread.m4
+++ b/m4/pread.m4
@@ -1,5 +1,5 @@
# pread.m4 serial 5
-dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2018 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.
diff --git a/m4/printf.m4 b/m4/printf.m4
index a44ac66b..82f48bfd 100644
--- a/m4/printf.m4
+++ b/m4/printf.m4
@@ -1,5 +1,5 @@
-# printf.m4 serial 52
-dnl Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc.
+# printf.m4 serial 58
+dnl Copyright (C) 2003, 2007-2018 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.
@@ -58,10 +58,10 @@ int main ()
[gl_cv_func_printf_sizes_c99=yes],
[gl_cv_func_printf_sizes_c99=no],
[
-changequote(,)dnl
case "$host_os" in
+changequote(,)dnl
# Guess yes on glibc systems.
- *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ *-gnu* | gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
# Guess yes on FreeBSD >= 5.
freebsd[1-4].*) gl_cv_func_printf_sizes_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
@@ -79,10 +79,19 @@ changequote(,)dnl
netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
gl_cv_func_printf_sizes_c99="guessing no";;
netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
+changequote([,])dnl
+ # Guess yes on MSVC, no on mingw.
+ mingw*) AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ],
+ [gl_cv_func_printf_sizes_c99="guessing yes"],
+ [gl_cv_func_printf_sizes_c99="guessing no"])
+ ;;
# If we don't know, assume the worst.
*) gl_cv_func_printf_sizes_c99="guessing no";;
esac
-changequote([,])dnl
])
])
])
@@ -122,14 +131,19 @@ int main ()
}]])],
[gl_cv_func_printf_long_double=yes],
[gl_cv_func_printf_long_double=no],
- [
-changequote(,)dnl
- case "$host_os" in
- beos*) gl_cv_func_printf_long_double="guessing no";;
- mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
- *) gl_cv_func_printf_long_double="guessing yes";;
+ [case "$host_os" in
+ beos*) gl_cv_func_printf_long_double="guessing no";;
+ # Guess yes on MSVC, no on mingw.
+ mingw*) AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ],
+ [gl_cv_func_printf_long_double="guessing yes"],
+ [gl_cv_func_printf_long_double="guessing no"])
+ ;;
+ *) gl_cv_func_printf_long_double="guessing yes";;
esac
-changequote([,])dnl
])
])
])
@@ -217,10 +231,10 @@ int main ()
[gl_cv_func_printf_infinite=yes],
[gl_cv_func_printf_infinite=no],
[
-changequote(,)dnl
case "$host_os" in
+changequote(,)dnl
# Guess yes on glibc systems.
- *-gnu*) gl_cv_func_printf_infinite="guessing yes";;
+ *-gnu* | gnu*) gl_cv_func_printf_infinite="guessing yes";;
# Guess yes on FreeBSD >= 6.
freebsd[1-5].*) gl_cv_func_printf_infinite="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
@@ -236,10 +250,19 @@ changequote(,)dnl
netbsd*) gl_cv_func_printf_infinite="guessing yes";;
# Guess yes on BeOS.
beos*) gl_cv_func_printf_infinite="guessing yes";;
+changequote([,])dnl
+ # Guess yes on MSVC, no on mingw.
+ mingw*) AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ],
+ [gl_cv_func_printf_infinite="guessing yes"],
+ [gl_cv_func_printf_infinite="guessing no"])
+ ;;
# If we don't know, assume the worst.
*) gl_cv_func_printf_infinite="guessing no";;
esac
-changequote([,])dnl
])
])
])
@@ -419,27 +442,35 @@ int main ()
}]])],
[gl_cv_func_printf_infinite_long_double=yes],
[gl_cv_func_printf_infinite_long_double=no],
- [
-changequote(,)dnl
- case "$host_cpu" in
+ [case "$host_cpu" in
# Guess no on ia64, x86_64, i386.
ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
*)
case "$host_os" in
+changequote(,)dnl
# Guess yes on glibc systems.
- *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ *-gnu* | gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";;
# Guess yes on FreeBSD >= 6.
freebsd[1-5].*) gl_cv_func_printf_infinite_long_double="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
# Guess yes on HP-UX >= 11.
hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+changequote([,])dnl
+ # Guess yes on MSVC, no on mingw.
+ mingw*) AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ],
+ [gl_cv_func_printf_infinite_long_double="guessing yes"],
+ [gl_cv_func_printf_infinite_long_double="guessing no"])
+ ;;
# If we don't know, assume the worst.
*) gl_cv_func_printf_infinite_long_double="guessing no";;
esac
;;
esac
-changequote([,])dnl
])
])
;;
@@ -489,8 +520,15 @@ int main ()
&& strcmp (buf, "0x6.0ap-2 33") != 0
&& strcmp (buf, "0xc.14p-3 33") != 0))
result |= 4;
+ /* This catches a Mac OS X 10.12.4 (Darwin 16.5) bug: it doesn't round. */
+ if (sprintf (buf, "%.0a %d", 1.51, 33, 44, 55) < 0
+ || (strcmp (buf, "0x2p+0 33") != 0
+ && strcmp (buf, "0x3p-1 33") != 0
+ && strcmp (buf, "0x6p-2 33") != 0
+ && strcmp (buf, "0xcp-3 33") != 0))
+ result |= 4;
/* This catches a FreeBSD 6.1 bug. See
- <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ <https://lists.gnu.org/r/bug-gnulib/2007-04/msg00107.html> */
if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
|| buf[0] == '0')
result |= 8;
@@ -502,7 +540,7 @@ int main ()
&& strcmp (buf, "0x8.0p-2") != 0))
result |= 16;
/* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a
- glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
+ glibc 2.4 bug <https://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
if (sprintf (buf, "%.1La", 1.999L) < 0
|| (strcmp (buf, "0x1.0p+1") != 0
&& strcmp (buf, "0x2.0p+0") != 0
@@ -516,7 +554,7 @@ int main ()
[
case "$host_os" in
# Guess yes on glibc >= 2.5 systems.
- *-gnu*)
+ *-gnu* | gnu*)
AC_EGREP_CPP([BZ2908], [
#include <features.h>
#ifdef __GNU_LIBRARY__
@@ -528,6 +566,8 @@ int main ()
[gl_cv_func_printf_directive_a="guessing yes"],
[gl_cv_func_printf_directive_a="guessing no"])
;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_printf_directive_a="guessing no";;
# If we don't know, assume the worst.
*) gl_cv_func_printf_directive_a="guessing no";;
esac
@@ -570,10 +610,10 @@ int main ()
[gl_cv_func_printf_directive_f=yes],
[gl_cv_func_printf_directive_f=no],
[
-changequote(,)dnl
case "$host_os" in
+changequote(,)dnl
# Guess yes on glibc systems.
- *-gnu*) gl_cv_func_printf_directive_f="guessing yes";;
+ *-gnu* | gnu*) gl_cv_func_printf_directive_f="guessing yes";;
# Guess yes on FreeBSD >= 6.
freebsd[1-5].*) gl_cv_func_printf_directive_f="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
@@ -581,12 +621,21 @@ changequote(,)dnl
darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
darwin*) gl_cv_func_printf_directive_f="guessing yes";;
# Guess yes on Solaris >= 2.10.
- solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
- solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
+ solaris2.[1-9][0-9]*) gl_cv_func_printf_directive_f="guessing yes";;
+ solaris*) gl_cv_func_printf_directive_f="guessing no";;
+changequote([,])dnl
+ # Guess yes on MSVC, no on mingw.
+ mingw*) AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ],
+ [gl_cv_func_printf_directive_f="guessing yes"],
+ [gl_cv_func_printf_directive_f="guessing no"])
+ ;;
# If we don't know, assume the worst.
*) gl_cv_func_printf_directive_f="guessing no";;
esac
-changequote([,])dnl
])
])
])
@@ -638,13 +687,11 @@ int main ()
}]])],
[gl_cv_func_printf_directive_n=yes],
[gl_cv_func_printf_directive_n=no],
- [
-changequote(,)dnl
- case "$host_os" in
+ [case "$host_os" in
+ # Guess no on native Windows.
mingw*) gl_cv_func_printf_directive_n="guessing no";;
*) gl_cv_func_printf_directive_n="guessing yes";;
esac
-changequote([,])dnl
])
])
])
@@ -719,12 +766,14 @@ int main ()
[
changequote(,)dnl
case "$host_os" in
- openbsd*) gl_cv_func_printf_directive_ls="guessing no";;
- irix*) gl_cv_func_printf_directive_ls="guessing no";;
- solaris*) gl_cv_func_printf_directive_ls="guessing no";;
- cygwin*) gl_cv_func_printf_directive_ls="guessing no";;
- beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
- *) gl_cv_func_printf_directive_ls="guessing yes";;
+ openbsd*) gl_cv_func_printf_directive_ls="guessing no";;
+ irix*) gl_cv_func_printf_directive_ls="guessing no";;
+ solaris*) gl_cv_func_printf_directive_ls="guessing no";;
+ cygwin*) gl_cv_func_printf_directive_ls="guessing no";;
+ beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_printf_directive_ls="guessing yes";;
+ *) gl_cv_func_printf_directive_ls="guessing yes";;
esac
changequote([,])dnl
])
@@ -763,6 +812,7 @@ changequote(,)dnl
netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
gl_cv_func_printf_positions="guessing no";;
beos*) gl_cv_func_printf_positions="guessing no";;
+ # Guess no on native Windows.
mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
*) gl_cv_func_printf_positions="guessing yes";;
esac
@@ -801,6 +851,7 @@ changequote(,)dnl
case "$host_os" in
cygwin*) gl_cv_func_printf_flag_grouping="guessing no";;
netbsd*) gl_cv_func_printf_flag_grouping="guessing no";;
+ # Guess no on native Windows.
mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
*) gl_cv_func_printf_flag_grouping="guessing yes";;
esac
@@ -811,7 +862,7 @@ changequote([,])dnl
dnl Test whether the *printf family of functions supports the - flag correctly.
dnl (ISO C99.) See
-dnl <http://lists.gnu.org/archive/html/bug-coreutils/2008-02/msg00035.html>
+dnl <https://lists.gnu.org/r/bug-coreutils/2008-02/msg00035.html>
dnl Result is gl_cv_func_printf_flag_leftadjust.
AC_DEFUN([gl_PRINTF_FLAG_LEFTADJUST],
@@ -843,6 +894,8 @@ changequote(,)dnl
hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
# Guess no on HP-UX 10 and older.
hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
# Guess yes otherwise.
*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
esac
@@ -853,7 +906,7 @@ changequote([,])dnl
dnl Test whether the *printf family of functions supports padding of non-finite
dnl values with the 0 flag correctly. (ISO C99 + TC1 + TC2.) See
-dnl <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html>
+dnl <https://lists.gnu.org/r/bug-gnulib/2007-04/msg00107.html>
dnl Result is gl_cv_func_printf_flag_zero.
AC_DEFUN([gl_PRINTF_FLAG_ZERO],
@@ -882,12 +935,14 @@ int main ()
[
changequote(,)dnl
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
- # Guess yes on BeOS.
- beos*) gl_cv_func_printf_flag_zero="guessing yes";;
- # If we don't know, assume the worst.
- *) gl_cv_func_printf_flag_zero="guessing no";;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_printf_flag_zero="guessing yes";;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_printf_flag_zero="guessing no";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_flag_zero="guessing no";;
esac
changequote([,])dnl
])
@@ -1040,28 +1095,28 @@ changequote([,])dnl
if test "$gl_cv_func_printf_enomem" = "guessing no"; then
changequote(,)dnl
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_printf_enomem="guessing yes";;
- # Guess yes on Solaris.
- solaris*) gl_cv_func_printf_enomem="guessing yes";;
- # Guess yes on AIX.
- aix*) gl_cv_func_printf_enomem="guessing yes";;
- # Guess yes on HP-UX/hppa.
- hpux*) case "$host_cpu" in
- hppa*) gl_cv_func_printf_enomem="guessing yes";;
- *) gl_cv_func_printf_enomem="guessing no";;
- esac
- ;;
- # Guess yes on IRIX.
- irix*) gl_cv_func_printf_enomem="guessing yes";;
- # Guess yes on OSF/1.
- osf*) gl_cv_func_printf_enomem="guessing yes";;
- # Guess yes on BeOS.
- beos*) gl_cv_func_printf_enomem="guessing yes";;
- # Guess yes on Haiku.
- haiku*) gl_cv_func_printf_enomem="guessing yes";;
- # If we don't know, assume the worst.
- *) gl_cv_func_printf_enomem="guessing no";;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on Solaris.
+ solaris*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on AIX.
+ aix*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on HP-UX/hppa.
+ hpux*) case "$host_cpu" in
+ hppa*) gl_cv_func_printf_enomem="guessing yes";;
+ *) gl_cv_func_printf_enomem="guessing no";;
+ esac
+ ;;
+ # Guess yes on IRIX.
+ irix*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on OSF/1.
+ osf*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on Haiku.
+ haiku*) gl_cv_func_printf_enomem="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_enomem="guessing no";;
esac
changequote([,])dnl
fi
@@ -1121,7 +1176,7 @@ int main ()
changequote(,)dnl
case "$host_os" in
# Guess yes on glibc systems.
- *-gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ *-gnu* | gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
# Guess yes on FreeBSD >= 5.
freebsd[1-4].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
@@ -1153,6 +1208,8 @@ changequote(,)dnl
netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
# Guess yes on BeOS.
beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_snprintf_truncation_c99="guessing no";;
# If we don't know, assume the worst.
*) gl_cv_func_snprintf_truncation_c99="guessing no";;
esac
@@ -1216,11 +1273,10 @@ int main ()
}]])],
[gl_cv_func_snprintf_retval_c99=yes],
[gl_cv_func_snprintf_retval_c99=no],
- [
+ [case "$host_os" in
changequote(,)dnl
- case "$host_os" in
# Guess yes on glibc systems.
- *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ *-gnu* | gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
# Guess yes on FreeBSD >= 5.
freebsd[1-4].*) gl_cv_func_snprintf_retval_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
@@ -1243,10 +1299,19 @@ changequote(,)dnl
netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
# Guess yes on BeOS.
beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+changequote([,])dnl
+ # Guess yes on MSVC, no on mingw.
+ mingw*) AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ],
+ [gl_cv_func_snprintf_retval_c99="guessing yes"],
+ [gl_cv_func_snprintf_retval_c99="guessing no"])
+ ;;
# If we don't know, assume the worst.
*) gl_cv_func_snprintf_retval_c99="guessing no";;
esac
-changequote([,])dnl
])
])
])
@@ -1301,7 +1366,7 @@ int main ()
changequote(,)dnl
case "$host_os" in
# Guess yes on glibc systems.
- *-gnu*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ *-gnu* | gnu*) gl_cv_func_snprintf_directive_n="guessing yes";;
# Guess yes on FreeBSD >= 5.
freebsd[1-4].*) gl_cv_func_snprintf_directive_n="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
@@ -1326,6 +1391,8 @@ changequote(,)dnl
netbsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
# Guess yes on BeOS.
beos*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_snprintf_directive_n="guessing no";;
# If we don't know, assume the worst.
*) gl_cv_func_snprintf_directive_n="guessing no";;
esac
@@ -1342,6 +1409,7 @@ dnl Result is gl_cv_func_snprintf_size1.
AC_DEFUN([gl_SNPRINTF_SIZE1],
[
AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_REQUIRE([gl_SNPRINTF_PRESENCE])
AC_CACHE_CHECK([whether snprintf respects a size of 1],
[gl_cv_func_snprintf_size1],
@@ -1371,7 +1439,12 @@ int main()
}]])],
[gl_cv_func_snprintf_size1=yes],
[gl_cv_func_snprintf_size1=no],
- [gl_cv_func_snprintf_size1="guessing yes"])
+ [case "$host_os" in
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_snprintf_size1="guessing yes" ;;
+ *) gl_cv_func_snprintf_size1="guessing yes" ;;
+ esac
+ ])
])
])
@@ -1443,7 +1516,7 @@ int main()
changequote(,)dnl
case "$host_os" in
# Guess yes on glibc systems.
- *-gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ *-gnu* | gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
# Guess yes on FreeBSD >= 5.
freebsd[1-4].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
@@ -1467,7 +1540,7 @@ changequote(,)dnl
netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
# Guess yes on BeOS.
beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
- # Guess yes on mingw.
+ # Guess yes on native Windows.
mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
# If we don't know, assume the worst.
*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
@@ -1533,7 +1606,8 @@ dnl OpenBSD 3.9, 4.0 . . # # # # . # . # . # . # .
dnl Cygwin 1.7.0 (2009) . . . # . . . ? . . . . . ? . . . . . .
dnl Cygwin 1.5.25 (2008) . . . # # . . # . . . . . # . . . . . .
dnl Cygwin 1.5.19 (2006) # . . # # # . # . # . # # # . . . . . .
-dnl Solaris 11 2011-11 . . # # # . . # . . . # . . . . . . . .
+dnl Solaris 11.3 . . . . # . . # . . . . . . . . . . . .
+dnl Solaris 11.0 . . # # # . . # . . . # . . . . . . . .
dnl Solaris 10 . . # # # . . # . . . # # . . . . . . .
dnl Solaris 2.6 ... 9 # . # # # # . # . . . # # . . . # . . .
dnl Solaris 2.5.1 # . # # # # . # . . . # . . # # # # # #
diff --git a/m4/pwrite.m4 b/m4/pwrite.m4
index 54aa7c44..320744b1 100644
--- a/m4/pwrite.m4
+++ b/m4/pwrite.m4
@@ -1,5 +1,5 @@
# pwrite.m4 serial 5
-dnl Copyright (C) 2010-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2018 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.
diff --git a/m4/qsort_r.m4 b/m4/qsort_r.m4
index 4e642621..48011e3a 100644
--- a/m4/qsort_r.m4
+++ b/m4/qsort_r.m4
@@ -1,6 +1,6 @@
dnl Reentrant sort function.
-dnl Copyright 2014-2017 Free Software Foundation, Inc.
+dnl Copyright 2014-2018 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.
diff --git a/m4/raise.m4 b/m4/raise.m4
index 28c2e0b5..761e4b9f 100644
--- a/m4/raise.m4
+++ b/m4/raise.m4
@@ -1,5 +1,5 @@
-# raise.m4 serial 3
-dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
+# raise.m4 serial 4
+dnl Copyright (C) 2011-2018 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.
@@ -8,14 +8,16 @@ AC_DEFUN([gl_FUNC_RAISE],
[
AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([gl_MSVC_INVAL])
AC_CHECK_FUNCS([raise])
if test $ac_cv_func_raise = no; then
HAVE_RAISE=0
else
- if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
- REPLACE_RAISE=1
- fi
+ m4_ifdef([gl_MSVC_INVAL], [
+ AC_REQUIRE([gl_MSVC_INVAL])
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ REPLACE_RAISE=1
+ fi
+ ])
m4_ifdef([gl_SIGNALBLOCKING], [
gl_SIGNALBLOCKING
if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
diff --git a/m4/rawmemchr.m4 b/m4/rawmemchr.m4
index f800ed4d..b7497b84 100644
--- a/m4/rawmemchr.m4
+++ b/m4/rawmemchr.m4
@@ -1,5 +1,5 @@
# rawmemchr.m4 serial 2
-dnl Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007-2018 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.
diff --git a/m4/read.m4 b/m4/read.m4
index 36249abd..1cb278fb 100644
--- a/m4/read.m4
+++ b/m4/read.m4
@@ -1,5 +1,5 @@
-# read.m4 serial 4
-dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
+# read.m4 serial 5
+dnl Copyright (C) 2011-2018 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.
@@ -7,10 +7,12 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_READ],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- AC_REQUIRE([gl_MSVC_INVAL])
- if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
- REPLACE_READ=1
- fi
+ m4_ifdef([gl_MSVC_INVAL], [
+ AC_REQUIRE([gl_MSVC_INVAL])
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ REPLACE_READ=1
+ fi
+ ])
dnl This ifdef is just an optimization, to avoid performing a configure
dnl check whose result is not used. It does not make the test of
dnl GNULIB_UNISTD_H_NONBLOCKING or GNULIB_NONBLOCKING redundant.
diff --git a/m4/readdir.m4 b/m4/readdir.m4
index cb7f2ea4..f45a45f1 100644
--- a/m4/readdir.m4
+++ b/m4/readdir.m4
@@ -1,5 +1,5 @@
# readdir.m4 serial 1
-dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2018 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.
diff --git a/m4/readlink.m4 b/m4/readlink.m4
index d3ba0ad4..4d0ab483 100644
--- a/m4/readlink.m4
+++ b/m4/readlink.m4
@@ -1,5 +1,5 @@
-# readlink.m4 serial 12
-dnl Copyright (C) 2003, 2007, 2009-2017 Free Software Foundation, Inc.
+# readlink.m4 serial 14
+dnl Copyright (C) 2003, 2007, 2009-2018 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.
@@ -34,10 +34,12 @@ AC_DEFUN([gl_FUNC_READLINK],
return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;]])],
[gl_cv_func_readlink_works=yes], [gl_cv_func_readlink_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_readlink_works="guessing no" ;;
+ # Guess yes on Linux systems.
+ 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" ;;
esac
])
rm -f conftest.link conftest.lnk2])
diff --git a/m4/realloc.m4 b/m4/realloc.m4
index 3d05b44a..23c0d5d1 100644
--- a/m4/realloc.m4
+++ b/m4/realloc.m4
@@ -1,5 +1,5 @@
-# realloc.m4 serial 14
-dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
+# realloc.m4 serial 15
+dnl Copyright (C) 2007, 2009-2018 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.
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
m4_version_prereq([2.70], [] ,[
# This is adapted with modifications from upstream Autoconf here:
-# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
+# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
AC_DEFUN([_AC_FUNC_REALLOC_IF],
[
AC_REQUIRE([AC_HEADER_STDC])dnl
@@ -32,7 +32,7 @@ AC_DEFUN([_AC_FUNC_REALLOC_IF],
[ac_cv_func_realloc_0_nonnull=no],
[case "$host_os" in
# Guess yes on platforms where we know the result.
- *-gnu* | freebsd* | netbsd* | openbsd* \
+ *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
| hpux* | solaris* | cygwin* | mingw*)
ac_cv_func_realloc_0_nonnull=yes ;;
# If we don't know, assume the worst.
diff --git a/m4/rewinddir.m4 b/m4/rewinddir.m4
deleted file mode 100644
index a73c886f..00000000
--- a/m4/rewinddir.m4
+++ /dev/null
@@ -1,15 +0,0 @@
-# rewinddir.m4 serial 1
-dnl Copyright (C) 2011-2017 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.
-
-AC_DEFUN([gl_FUNC_REWINDDIR],
-[
- AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
-
- AC_CHECK_FUNCS([rewinddir])
- if test $ac_cv_func_rewinddir = no; then
- HAVE_REWINDDIR=0
- fi
-])
diff --git a/m4/same.m4 b/m4/same.m4
deleted file mode 100644
index ce30282b..00000000
--- a/m4/same.m4
+++ /dev/null
@@ -1,13 +0,0 @@
-#serial 9
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2017 Free Software Foundation,
-dnl 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 Prerequisites of lib/same.c.
-AC_DEFUN([gl_SAME],
-[
- AC_REQUIRE([AC_SYS_LONG_FILE_NAMES])
- AC_CHECK_FUNCS_ONCE([pathconf])
-])
diff --git a/m4/save-cwd.m4 b/m4/save-cwd.m4
index 4b00f9b4..d0270ea6 100644
--- a/m4/save-cwd.m4
+++ b/m4/save-cwd.m4
@@ -1,5 +1,5 @@
# serial 10
-dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2018 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.
diff --git a/m4/signal_h.m4 b/m4/signal_h.m4
index eaf5ce98..394b91d3 100644
--- a/m4/signal_h.m4
+++ b/m4/signal_h.m4
@@ -1,5 +1,5 @@
# signal_h.m4 serial 18
-dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2018 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.
diff --git a/m4/size_max.m4 b/m4/size_max.m4
index 05ad1b60..2b770e6c 100644
--- a/m4/size_max.m4
+++ b/m4/size_max.m4
@@ -1,5 +1,5 @@
# size_max.m4 serial 10
-dnl Copyright (C) 2003, 2005-2006, 2008-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2006, 2008-2018 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.
diff --git a/m4/sleep.m4 b/m4/sleep.m4
index 2d92ea8e..7ddaffae 100644
--- a/m4/sleep.m4
+++ b/m4/sleep.m4
@@ -1,5 +1,5 @@
-# sleep.m4 serial 7
-dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
+# sleep.m4 serial 9
+dnl Copyright (C) 2007-2018 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.
@@ -46,10 +46,12 @@ handle_alarm (int sig)
]])],
[gl_cv_func_sleep_works=yes], [gl_cv_func_sleep_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_sleep_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_sleep_works="guessing no" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_sleep_works="guessing no" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_sleep_works="guessing no" ;;
esac
])])
case "$gl_cv_func_sleep_works" in
diff --git a/m4/ssize_t.m4 b/m4/ssize_t.m4
index 66ba9d4e..0977f205 100644
--- a/m4/ssize_t.m4
+++ b/m4/ssize_t.m4
@@ -1,5 +1,5 @@
# ssize_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2001-2003, 2006, 2010-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2003, 2006, 2010-2018 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.
diff --git a/m4/stat-time.m4 b/m4/stat-time.m4
new file mode 100644
index 00000000..d0d17ed4
--- /dev/null
+++ b/m4/stat-time.m4
@@ -0,0 +1,83 @@
+# Checks for stat-related time functions.
+
+# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2018 Free Software
+# Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# st_atim.tv_nsec - Linux, Solaris, Cygwin
+# st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE
+# st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE
+# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1)
+
+# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway)
+# st_birthtim - Cygwin 1.7.0+
+
+AC_DEFUN([gl_STAT_TIME],
+[
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_HEADERS_ONCE([sys/time.h])
+
+ AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec],
+ [AC_CACHE_CHECK([whether struct stat.st_atim is of type struct timespec],
+ [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #if HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ #endif
+ #include <time.h>
+ struct timespec ts;
+ struct stat st;
+ ]],
+ [[
+ st.st_atim = ts;
+ ]])],
+ [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes],
+ [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no])])
+ if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
+ AC_DEFINE([TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC], [1],
+ [Define to 1 if the type of the st_atim member of a struct stat is
+ struct timespec.])
+ fi],
+ [AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec], [],
+ [AC_CHECK_MEMBERS([struct stat.st_atimensec], [],
+ [AC_CHECK_MEMBERS([struct stat.st_atim.st__tim.tv_nsec], [], [],
+ [#include <sys/types.h>
+ #include <sys/stat.h>])],
+ [#include <sys/types.h>
+ #include <sys/stat.h>])],
+ [#include <sys/types.h>
+ #include <sys/stat.h>])],
+ [#include <sys/types.h>
+ #include <sys/stat.h>])
+])
+
+# Check for st_birthtime, a feature from UFS2 (FreeBSD, NetBSD, OpenBSD, etc.)
+# and NTFS (Cygwin).
+# There was a time when this field was named st_createtime (21 June
+# 2002 to 16 July 2002) But that window is very small and applied only
+# to development code, so systems still using that configuration are
+# not supported. See revisions 1.10 and 1.11 of FreeBSD's
+# src/sys/ufs/ufs/dinode.h.
+#
+AC_DEFUN([gl_STAT_BIRTHTIME],
+[
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_HEADERS_ONCE([sys/time.h])
+ AC_CHECK_MEMBERS([struct stat.st_birthtimespec.tv_nsec], [],
+ [AC_CHECK_MEMBERS([struct stat.st_birthtimensec], [],
+ [AC_CHECK_MEMBERS([struct stat.st_birthtim.tv_nsec], [], [],
+ [#include <sys/types.h>
+ #include <sys/stat.h>])],
+ [#include <sys/types.h>
+ #include <sys/stat.h>])],
+ [#include <sys/types.h>
+ #include <sys/stat.h>])
+])
diff --git a/m4/stat.m4 b/m4/stat.m4
index 9ff77df9..e8ec3b2b 100644
--- a/m4/stat.m4
+++ b/m4/stat.m4
@@ -1,6 +1,6 @@
-# serial 11
+# serial 15
-# Copyright (C) 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2009-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -8,64 +8,67 @@
AC_DEFUN([gl_FUNC_STAT],
[
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
AC_CHECK_FUNCS_ONCE([lstat])
- dnl mingw is the only known platform where stat(".") and stat("./") differ
- AC_CACHE_CHECK([whether stat handles trailing slashes on directories],
- [gl_cv_func_stat_dir_slash],
- [AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <sys/stat.h>
-]], [[struct stat st; return stat (".", &st) != stat ("./", &st);]])],
- [gl_cv_func_stat_dir_slash=yes], [gl_cv_func_stat_dir_slash=no],
- [case $host_os in
- mingw*) gl_cv_func_stat_dir_slash="guessing no";;
- *) gl_cv_func_stat_dir_slash="guessing yes";;
- esac])])
- dnl AIX 7.1, Solaris 9, mingw64 mistakenly succeed on stat("file/").
- dnl (For mingw, this is due to a broken stat() override in libmingwex.a.)
- dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/").
- AC_CACHE_CHECK([whether stat handles trailing slashes on files],
- [gl_cv_func_stat_file_slash],
- [touch conftest.tmp
- # Assume that if we have lstat, we can also check symlinks.
- if test $ac_cv_func_lstat = yes; then
- ln -s conftest.tmp conftest.lnk
- fi
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <sys/stat.h>
+ case "$host_os" in
+ mingw*)
+ dnl On this platform, the original stat() returns st_atime, st_mtime,
+ dnl st_ctime values that are affected by the time zone.
+ REPLACE_STAT=1
+ ;;
+ *)
+ dnl AIX 7.1, Solaris 9, mingw64 mistakenly succeed on stat("file/").
+ dnl (For mingw, this is due to a broken stat() override in libmingwex.a.)
+ dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/").
+ AC_CACHE_CHECK([whether stat handles trailing slashes on files],
+ [gl_cv_func_stat_file_slash],
+ [touch conftest.tmp
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.tmp conftest.lnk
+ fi
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/stat.h>
]], [[int result = 0;
- struct stat st;
- if (!stat ("conftest.tmp/", &st))
- result |= 1;
+ struct stat st;
+ if (!stat ("conftest.tmp/", &st))
+ result |= 1;
#if HAVE_LSTAT
- if (!stat ("conftest.lnk/", &st))
- result |= 2;
+ if (!stat ("conftest.lnk/", &st))
+ result |= 2;
#endif
- return result;
- ]])],
- [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no],
- [case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_stat_file_slash="guessing no" ;;
- esac
- ])
- rm -f conftest.tmp conftest.lnk])
- case $gl_cv_func_stat_dir_slash in
- *no) REPLACE_STAT=1
- AC_DEFINE([REPLACE_FUNC_STAT_DIR], [1], [Define to 1 if stat needs
- help when passed a directory name with a trailing slash]);;
- esac
- case $gl_cv_func_stat_file_slash in
- *no) REPLACE_STAT=1
- AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs
- help when passed a file name with a trailing slash]);;
+ return result;
+ ]])],
+ [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no],
+ [case "$host_os" in
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_stat_file_slash="guessing no" ;;
+ esac
+ ])
+ rm -f conftest.tmp conftest.lnk])
+ case $gl_cv_func_stat_file_slash in
+ *no)
+ REPLACE_STAT=1
+ AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs
+ help when passed a file name with a trailing slash]);;
+ esac
+ case $host_os in
+ dnl Solaris stat can return a negative tv_nsec.
+ solaris*)
+ REPLACE_FSTAT=1 ;;
+ esac
+ ;;
esac
])
-# Prerequisites of lib/stat.c.
-AC_DEFUN([gl_PREREQ_STAT], [:])
+# Prerequisites of lib/stat.c and lib/stat-w32.c.
+AC_DEFUN([gl_PREREQ_STAT], [
+ AC_REQUIRE([gl_HEADER_SYS_STAT_H])
+ :
+])
diff --git a/m4/stdalign.m4 b/m4/stdalign.m4
index 0652a1e4..c74fe9b7 100644
--- a/m4/stdalign.m4
+++ b/m4/stdalign.m4
@@ -1,6 +1,6 @@
# Check for stdalign.h that conforms to C11.
-dnl Copyright 2011-2017 Free Software Foundation, Inc.
+dnl Copyright 2011-2018 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.
@@ -18,7 +18,7 @@ AC_DEFUN([gl_STDALIGN_H],
/* Test that alignof yields a result consistent with offsetof.
This catches GCC bug 52023
- <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
#ifdef __cplusplus
template <class t> struct alignof_helper { char a; t b; };
# define ao(type) offsetof (alignof_helper<type>, b)
diff --git a/m4/stdbool.m4 b/m4/stdbool.m4
index d3681233..f8c05776 100644
--- a/m4/stdbool.m4
+++ b/m4/stdbool.m4
@@ -1,6 +1,6 @@
# Check for stdbool.h that conforms to C99.
-dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2018 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.
@@ -87,8 +87,8 @@ AC_DEFUN([AC_CHECK_HEADER_STDBOOL],
char o[sizeof n == m * sizeof n[0] ? 1 : -1];
char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
/* Catch a bug in an HP-UX C compiler. See
- http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
- http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
*/
Bool q = true;
Bool *pq = &q;
diff --git a/m4/stddef_h.m4 b/m4/stddef_h.m4
index f45def10..ba3d201c 100644
--- a/m4/stddef_h.m4
+++ b/m4/stddef_h.m4
@@ -1,6 +1,6 @@
dnl A placeholder for <stddef.h>, for platforms that have issues.
# stddef_h.m4 serial 5
-dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2018 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.
diff --git a/m4/stdint.m4 b/m4/stdint.m4
index 4ac854d5..b86184c2 100644
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -1,5 +1,5 @@
-# stdint.m4 serial 50
-dnl Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# stdint.m4 serial 51
+dnl Copyright (C) 2001-2018 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.
@@ -10,6 +10,7 @@ dnl Test whether <stdint.h> is supported or must be substituted.
AC_DEFUN_ONCE([gl_STDINT_H],
[
AC_PREREQ([2.59])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_REQUIRE([gl_LIMITS_H])
AC_REQUIRE([gt_TYPE_WINT_T])
@@ -288,8 +289,12 @@ static const char *macro_values[] =
]])],
[gl_cv_header_working_stdint_h=yes],
[],
- [dnl When cross-compiling, assume it works.
- gl_cv_header_working_stdint_h=yes
+ [case "$host_os" in
+ # Guess yes on native Windows.
+ mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
+ # In general, assume it works.
+ *) gl_cv_header_working_stdint_h="guessing yes" ;;
+ esac
])
])
])
@@ -299,15 +304,16 @@ static const char *macro_values[] =
HAVE_SYS_BITYPES_H=0
HAVE_SYS_INTTYPES_H=0
STDINT_H=stdint.h
- if test "$gl_cv_header_working_stdint_h" = yes; then
- HAVE_C99_STDINT_H=1
- dnl Now see whether the system <stdint.h> works without
- dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined.
- AC_CACHE_CHECK([whether stdint.h predates C++11],
- [gl_cv_header_stdint_predates_cxx11_h],
- [gl_cv_header_stdint_predates_cxx11_h=yes
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
+ case "$gl_cv_header_working_stdint_h" in
+ *yes)
+ HAVE_C99_STDINT_H=1
+ dnl Now see whether the system <stdint.h> works without
+ dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined.
+ AC_CACHE_CHECK([whether stdint.h predates C++11],
+ [gl_cv_header_stdint_predates_cxx11_h],
+ [gl_cv_header_stdint_predates_cxx11_h=yes
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
#include <stdint.h>
]
@@ -315,45 +321,47 @@ gl_STDINT_INCLUDES
[
intmax_t im = INTMAX_MAX;
int32_t i32 = INT32_C (0x7fffffff);
- ]])],
- [gl_cv_header_stdint_predates_cxx11_h=no])])
+ ]])],
+ [gl_cv_header_stdint_predates_cxx11_h=no])])
- if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
- AC_DEFINE([__STDC_CONSTANT_MACROS], [1],
- [Define to 1 if the system <stdint.h> predates C++11.])
- AC_DEFINE([__STDC_LIMIT_MACROS], [1],
- [Define to 1 if the system <stdint.h> predates C++11.])
- fi
- AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.],
- [gl_cv_header_stdint_width],
- [gl_cv_header_stdint_width=no
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[
- /* Work if build is not clean. */
- #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
- #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
- #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
- #endif
- #include <stdint.h>
- ]gl_STDINT_INCLUDES[
- int iw = UINTMAX_WIDTH;
- ]])],
- [gl_cv_header_stdint_width=yes])])
- if test "$gl_cv_header_stdint_width" = yes; then
- STDINT_H=
- fi
- else
- dnl Check for <sys/inttypes.h>, and for
- dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5).
- AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h])
- if test $ac_cv_header_sys_inttypes_h = yes; then
- HAVE_SYS_INTTYPES_H=1
- fi
- if test $ac_cv_header_sys_bitypes_h = yes; then
- HAVE_SYS_BITYPES_H=1
- fi
- gl_STDINT_TYPE_PROPERTIES
- fi
+ if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
+ AC_DEFINE([__STDC_CONSTANT_MACROS], [1],
+ [Define to 1 if the system <stdint.h> predates C++11.])
+ AC_DEFINE([__STDC_LIMIT_MACROS], [1],
+ [Define to 1 if the system <stdint.h> predates C++11.])
+ fi
+ AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.],
+ [gl_cv_header_stdint_width],
+ [gl_cv_header_stdint_width=no
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
+ #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+ #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+ #endif
+ #include <stdint.h>
+ ]gl_STDINT_INCLUDES[
+ int iw = UINTMAX_WIDTH;
+ ]])],
+ [gl_cv_header_stdint_width=yes])])
+ if test "$gl_cv_header_stdint_width" = yes; then
+ STDINT_H=
+ fi
+ ;;
+ *)
+ dnl Check for <sys/inttypes.h>, and for
+ dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5).
+ AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h])
+ if test $ac_cv_header_sys_inttypes_h = yes; then
+ HAVE_SYS_INTTYPES_H=1
+ fi
+ if test $ac_cv_header_sys_bitypes_h = yes; then
+ HAVE_SYS_BITYPES_H=1
+ fi
+ gl_STDINT_TYPE_PROPERTIES
+ ;;
+ esac
dnl The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
LIMITS_H=limits.h
diff --git a/m4/stdint_h.m4 b/m4/stdint_h.m4
index 786eaa3c..2d2a33c4 100644
--- a/m4/stdint_h.m4
+++ b/m4/stdint_h.m4
@@ -1,5 +1,5 @@
# stdint_h.m4 serial 9
-dnl Copyright (C) 1997-2004, 2006, 2008-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2018 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.
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4
index 9ffbb852..0debe69e 100644
--- a/m4/stdio_h.m4
+++ b/m4/stdio_h.m4
@@ -1,5 +1,5 @@
-# stdio_h.m4 serial 48
-dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
+# stdio_h.m4 serial 49
+dnl Copyright (C) 2007-2018 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.
@@ -28,7 +28,7 @@ AC_DEFUN([gl_STDIO_H],
/* For non-mingw systems, compilation will trivially succeed.
For mingw, compilation will succeed for older mingw (system
printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
- #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
+ #if (defined _WIN32 && ! defined __CYGWIN__) && \
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
#endif
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4
index 110fe2d1..49dc5d59 100644
--- a/m4/stdlib_h.m4
+++ b/m4/stdlib_h.m4
@@ -1,5 +1,5 @@
-# stdlib_h.m4 serial 43
-dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
+# stdlib_h.m4 serial 45
+dnl Copyright (C) 2007-2018 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.
@@ -14,6 +14,9 @@ AC_DEFUN([gl_STDLIB_H],
dnl guaranteed by C89.
gl_WARN_ON_USE_PREPARE([[#include <stdlib.h>
#if HAVE_SYS_LOADAVG_H
+/* OpenIndiana has a bug: <sys/time.h> must be included before
+ <sys/loadavg.h>. */
+# include <sys/time.h>
# include <sys/loadavg.h>
#endif
#if HAVE_RANDOM_H
@@ -21,9 +24,9 @@ AC_DEFUN([gl_STDLIB_H],
#endif
]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt
initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps
- posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch
- secure_getenv setenv setstate setstate_r srandom srandom_r
- strtod strtoll strtoull unlockpt unsetenv])
+ posix_openpt ptsname ptsname_r qsort_r random random_r reallocarray
+ realpath rpmatch secure_getenv setenv setstate setstate_r srandom
+ srandom_r strtod strtoll strtoull unlockpt unsetenv])
])
AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
@@ -58,6 +61,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
GNULIB_QSORT_R=0; AC_SUBST([GNULIB_QSORT_R])
GNULIB_RANDOM=0; AC_SUBST([GNULIB_RANDOM])
GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R])
+ GNULIB_REALLOCARRAY=0; AC_SUBST([GNULIB_REALLOCARRAY])
GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH])
GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH])
@@ -77,6 +81,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG])
HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT])
HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT])
+ HAVE_DECL_INITSTATE=1; AC_SUBST([HAVE_DECL_INITSTATE])
HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP])
HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP])
HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS])
@@ -89,11 +94,13 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_RANDOM=1; AC_SUBST([HAVE_RANDOM])
HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H])
HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R])
+ HAVE_REALLOCARRAY=1; AC_SUBST([HAVE_REALLOCARRAY])
HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH])
HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH])
HAVE_SECURE_GETENV=1; AC_SUBST([HAVE_SECURE_GETENV])
HAVE_SETENV=1; AC_SUBST([HAVE_SETENV])
HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV])
+ HAVE_DECL_SETSTATE=1; AC_SUBST([HAVE_DECL_SETSTATE])
HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD])
HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL])
HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL])
diff --git a/m4/stpcpy.m4 b/m4/stpcpy.m4
index 36865672..e431fd86 100644
--- a/m4/stpcpy.m4
+++ b/m4/stpcpy.m4
@@ -1,5 +1,5 @@
# stpcpy.m4 serial 8
-dnl Copyright (C) 2002, 2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2007, 2009-2018 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.
diff --git a/m4/stpncpy.m4 b/m4/stpncpy.m4
index 52bfa545..d12456ed 100644
--- a/m4/stpncpy.m4
+++ b/m4/stpncpy.m4
@@ -1,5 +1,5 @@
# stpncpy.m4 serial 16
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2017 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2018 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/strcase.m4 b/m4/strcase.m4
index de20eb61..3444fdac 100644
--- a/m4/strcase.m4
+++ b/m4/strcase.m4
@@ -1,5 +1,5 @@
# strcase.m4 serial 11
-dnl Copyright (C) 2002, 2005-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2018 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.
diff --git a/m4/strchrnul.m4 b/m4/strchrnul.m4
index 320d5fb6..689f128b 100644
--- a/m4/strchrnul.m4
+++ b/m4/strchrnul.m4
@@ -1,5 +1,5 @@
# strchrnul.m4 serial 9
-dnl Copyright (C) 2003, 2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007, 2009-2018 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.
diff --git a/m4/strdup.m4 b/m4/strdup.m4
index a92dbd63..dddaa01e 100644
--- a/m4/strdup.m4
+++ b/m4/strdup.m4
@@ -1,6 +1,6 @@
# strdup.m4 serial 13
-dnl Copyright (C) 2002-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/strerror.m4 b/m4/strerror.m4
index 460ddc95..b886b8d6 100644
--- a/m4/strerror.m4
+++ b/m4/strerror.m4
@@ -1,5 +1,5 @@
-# strerror.m4 serial 17
-dnl Copyright (C) 2002, 2007-2017 Free Software Foundation, Inc.
+# strerror.m4 serial 19
+dnl Copyright (C) 2002, 2007-2018 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.
@@ -24,10 +24,10 @@ AC_DEFUN([gl_FUNC_STRERROR],
[gl_cv_func_working_strerror=yes],
[gl_cv_func_working_strerror=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_working_strerror="guessing no" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_working_strerror="guessing no" ;;
esac
])
])
@@ -78,10 +78,12 @@ AC_DEFUN([gl_FUNC_STRERROR_0],
[gl_cv_func_strerror_0_works=yes],
[gl_cv_func_strerror_0_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_strerror_0_works="guessing no" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_strerror_0_works="guessing no" ;;
esac
])
])
diff --git a/m4/string_h.m4 b/m4/string_h.m4
index 3d2ad221..97c80dcc 100644
--- a/m4/string_h.m4
+++ b/m4/string_h.m4
@@ -1,11 +1,11 @@
# Configure a GNU-like replacement for <string.h>.
-# Copyright (C) 2007-2017 Free Software Foundation, Inc.
+# Copyright (C) 2007-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 21
+# serial 22
# Written by Paul Eggert.
@@ -43,6 +43,7 @@ AC_DEFUN([gl_STRING_MODULE_INDICATOR],
AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
[
+ GNULIB_EXPLICIT_BZERO=0; AC_SUBST([GNULIB_EXPLICIT_BZERO])
GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL])
GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL])
GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR])
@@ -82,6 +83,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP])
HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN])
dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_EXPLICIT_BZERO=1; AC_SUBST([HAVE_EXPLICIT_BZERO])
HAVE_FFSL=1; AC_SUBST([HAVE_FFSL])
HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL])
HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR])
@@ -105,16 +107,16 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR])
REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM])
REPLACE_STPNCPY=0; AC_SUBST([REPLACE_STPNCPY])
+ REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL])
REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP])
+ REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT])
+ REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP])
+ REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN])
REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR])
REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR])
- REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL])
+ REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R])
REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR])
REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R])
- REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT])
- REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP])
- REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN])
REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL])
- REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R])
UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R])
])
diff --git a/m4/strings_h.m4 b/m4/strings_h.m4
index 1163a632..9dcb8303 100644
--- a/m4/strings_h.m4
+++ b/m4/strings_h.m4
@@ -1,7 +1,7 @@
# Configure a replacement for <strings.h>.
# serial 6
-# Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/m4/strndup.m4 b/m4/strndup.m4
index 7a28f21c..07ac8862 100644
--- a/m4/strndup.m4
+++ b/m4/strndup.m4
@@ -1,5 +1,5 @@
# strndup.m4 serial 22
-dnl Copyright (C) 2002-2003, 2005-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2018 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.
diff --git a/m4/strnlen.m4 b/m4/strnlen.m4
index bf050271..856747c9 100644
--- a/m4/strnlen.m4
+++ b/m4/strnlen.m4
@@ -1,5 +1,5 @@
# strnlen.m4 serial 13
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2017 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2018 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/strsep.m4 b/m4/strsep.m4
index dc7f31b7..71f9e4c1 100644
--- a/m4/strsep.m4
+++ b/m4/strsep.m4
@@ -1,5 +1,5 @@
# strsep.m4 serial 10
-dnl Copyright (C) 2002-2004, 2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2007, 2009-2018 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.
diff --git a/m4/sys_socket_h.m4 b/m4/sys_socket_h.m4
index 3ecbe7c0..f2103787 100644
--- a/m4/sys_socket_h.m4
+++ b/m4/sys_socket_h.m4
@@ -1,5 +1,5 @@
# sys_socket_h.m4 serial 23
-dnl Copyright (C) 2005-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2018 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.
diff --git a/m4/sys_stat_h.m4 b/m4/sys_stat_h.m4
index 1e34ac40..52f06aa8 100644
--- a/m4/sys_stat_h.m4
+++ b/m4/sys_stat_h.m4
@@ -1,5 +1,5 @@
-# sys_stat_h.m4 serial 28 -*- Autoconf -*-
-dnl Copyright (C) 2006-2017 Free Software Foundation, Inc.
+# sys_stat_h.m4 serial 31 -*- Autoconf -*-
+dnl Copyright (C) 2006-2018 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.
@@ -19,18 +19,21 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H],
dnl Ensure the type mode_t gets defined.
AC_REQUIRE([AC_TYPE_MODE_T])
- dnl Whether to override 'struct stat'.
+ dnl Whether to enable precise timestamps in 'struct stat'.
+ m4_ifdef([gl_WINDOWS_STAT_TIMESPEC], [
+ AC_REQUIRE([gl_WINDOWS_STAT_TIMESPEC])
+ ], [
+ WINDOWS_STAT_TIMESPEC=0
+ ])
+ AC_SUBST([WINDOWS_STAT_TIMESPEC])
+
+ dnl Whether to ensure that struct stat.st_size is 64-bit wide.
m4_ifdef([gl_LARGEFILE], [
AC_REQUIRE([gl_LARGEFILE])
], [
WINDOWS_64_BIT_ST_SIZE=0
])
AC_SUBST([WINDOWS_64_BIT_ST_SIZE])
- if test $WINDOWS_64_BIT_ST_SIZE = 1; then
- AC_DEFINE([_GL_WINDOWS_64_BIT_ST_SIZE], [1],
- [Define to 1 if Gnulib overrides 'struct stat' on Windows so that
- struct stat.st_size becomes 64-bit.])
- fi
dnl Define types that are supposed to be defined in <sys/types.h> or
dnl <sys/stat.h>.
@@ -72,6 +75,7 @@ AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
GNULIB_MKNODAT=0; AC_SUBST([GNULIB_MKNODAT])
GNULIB_STAT=0; AC_SUBST([GNULIB_STAT])
GNULIB_UTIMENSAT=0; AC_SUBST([GNULIB_UTIMENSAT])
+ GNULIB_OVERRIDES_STRUCT_STAT=0; AC_SUBST([GNULIB_OVERRIDES_STRUCT_STAT])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_FCHMODAT=1; AC_SUBST([HAVE_FCHMODAT])
HAVE_FSTATAT=1; AC_SUBST([HAVE_FSTATAT])
diff --git a/m4/sys_time_h.m4 b/m4/sys_time_h.m4
deleted file mode 100644
index e622dbe9..00000000
--- a/m4/sys_time_h.m4
+++ /dev/null
@@ -1,111 +0,0 @@
-# Configure a replacement for <sys/time.h>.
-# serial 8
-
-# Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# Written by Paul Eggert and Martin Lambers.
-
-AC_DEFUN([gl_HEADER_SYS_TIME_H],
-[
- dnl Use AC_REQUIRE here, so that the REPLACE_GETTIMEOFDAY=0 statement
- dnl below is expanded once only, before all REPLACE_GETTIMEOFDAY=1
- dnl statements that occur in other macros.
- AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY])
-])
-
-AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
-[
- AC_REQUIRE([AC_C_RESTRICT])
- AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
- AC_CHECK_HEADERS_ONCE([sys/time.h])
- gl_CHECK_NEXT_HEADERS([sys/time.h])
-
- if test $ac_cv_header_sys_time_h != yes; then
- HAVE_SYS_TIME_H=0
- fi
-
- dnl On native Windows with MSVC, 'struct timeval' is defined in <winsock2.h>
- dnl only. So include that header in the list.
- gl_PREREQ_SYS_H_WINSOCK2
- AC_CACHE_CHECK([for struct timeval], [gl_cv_sys_struct_timeval],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#if HAVE_SYS_TIME_H
- #include <sys/time.h>
- #endif
- #include <time.h>
- #if HAVE_WINSOCK2_H
- # include <winsock2.h>
- #endif
- ]],
- [[static struct timeval x; x.tv_sec = x.tv_usec;]])],
- [gl_cv_sys_struct_timeval=yes],
- [gl_cv_sys_struct_timeval=no])
- ])
- if test $gl_cv_sys_struct_timeval != yes; then
- HAVE_STRUCT_TIMEVAL=0
- else
- dnl On native Windows with a 64-bit 'time_t', 'struct timeval' is defined
- dnl (in <sys/time.h> and <winsock2.h> for mingw64, in <winsock2.h> only
- dnl for MSVC) with a tv_sec field of type 'long' (32-bit!), which is
- dnl smaller than the 'time_t' type mandated by POSIX.
- dnl On OpenBSD 5.1 amd64, tv_sec is 64 bits and time_t 32 bits, but
- dnl that is good enough.
- AC_CACHE_CHECK([for wide-enough struct timeval.tv_sec member],
- [gl_cv_sys_struct_timeval_tv_sec],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#if HAVE_SYS_TIME_H
- #include <sys/time.h>
- #endif
- #include <time.h>
- #if HAVE_WINSOCK2_H
- # include <winsock2.h>
- #endif
- ]],
- [[static struct timeval x;
- typedef int verify_tv_sec_type[
- sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
- ];
- ]])],
- [gl_cv_sys_struct_timeval_tv_sec=yes],
- [gl_cv_sys_struct_timeval_tv_sec=no])
- ])
- if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
- REPLACE_STRUCT_TIMEVAL=1
- fi
- fi
-
- dnl Check for declarations of anything we want to poison if the
- dnl corresponding gnulib module is not in use.
- gl_WARN_ON_USE_PREPARE([[
-#if HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
-#include <time.h>
- ]], [gettimeofday])
-])
-
-AC_DEFUN([gl_SYS_TIME_MODULE_INDICATOR],
-[
- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
- AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
- gl_MODULE_INDICATOR_SET_VARIABLE([$1])
- dnl Define it also as a C macro, for the benefit of the unit tests.
- gl_MODULE_INDICATOR_FOR_TESTS([$1])
-])
-
-AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS],
-[
- GNULIB_GETTIMEOFDAY=0; AC_SUBST([GNULIB_GETTIMEOFDAY])
- dnl Assume POSIX behavior unless another module says otherwise.
- HAVE_GETTIMEOFDAY=1; AC_SUBST([HAVE_GETTIMEOFDAY])
- HAVE_STRUCT_TIMEVAL=1; AC_SUBST([HAVE_STRUCT_TIMEVAL])
- HAVE_SYS_TIME_H=1; AC_SUBST([HAVE_SYS_TIME_H])
- HAVE_TIMEZONE_T=0; AC_SUBST([HAVE_TIMEZONE_T])
- REPLACE_GETTIMEOFDAY=0; AC_SUBST([REPLACE_GETTIMEOFDAY])
- REPLACE_STRUCT_TIMEVAL=0; AC_SUBST([REPLACE_STRUCT_TIMEVAL])
-])
diff --git a/m4/sys_types_h.m4 b/m4/sys_types_h.m4
index 2eb4e9e4..2debfb0d 100644
--- a/m4/sys_types_h.m4
+++ b/m4/sys_types_h.m4
@@ -1,11 +1,14 @@
-# sys_types_h.m4 serial 6
-dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
+# sys_types_h.m4 serial 9
+dnl Copyright (C) 2011-2018 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.
AC_DEFUN_ONCE([gl_SYS_TYPES_H],
[
+ dnl Use sane struct stat types in OpenVMS 8.2 and later.
+ AC_DEFINE([_USE_STD_STAT], 1, [For standard stat data types on VMS.])
+
AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS])
gl_NEXT_HEADERS([sys/types.h])
@@ -17,6 +20,14 @@ AC_DEFUN_ONCE([gl_SYS_TYPES_H],
dnl Whether to override the 'off_t' type.
AC_REQUIRE([gl_TYPE_OFF_T])
+
+ dnl Whether to override the 'dev_t' and 'ino_t' types.
+ m4_ifdef([gl_WINDOWS_STAT_INODES], [
+ AC_REQUIRE([gl_WINDOWS_STAT_INODES])
+ ], [
+ WINDOWS_STAT_INODES=0
+ ])
+ AC_SUBST([WINDOWS_STAT_INODES])
])
AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
@@ -24,12 +35,12 @@ AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
])
# This works around a buggy version in autoconf <= 2.69.
-# See <https://lists.gnu.org/archive/html/autoconf/2016-08/msg00014.html>
+# See <https://lists.gnu.org/r/autoconf/2016-08/msg00014.html>
m4_version_prereq([2.70], [], [
# This is taken from the following Autoconf patch:
-# http://git.sv.gnu.org/cgit/autoconf.git/commit/?id=e17a30e98
+# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=e17a30e987d7ee695fb4294a82d987ec3dc9b974
m4_undefine([AC_HEADER_MAJOR])
AC_DEFUN([AC_HEADER_MAJOR],
diff --git a/m4/sys_utsname_h.m4 b/m4/sys_utsname_h.m4
index d56145ed..cc7c8a97 100644
--- a/m4/sys_utsname_h.m4
+++ b/m4/sys_utsname_h.m4
@@ -1,5 +1,5 @@
# sys_utsname_h.m4 serial 8
-dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2018 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.
diff --git a/m4/sys_wait_h.m4 b/m4/sys_wait_h.m4
index ed0fe7f1..25b3815b 100644
--- a/m4/sys_wait_h.m4
+++ b/m4/sys_wait_h.m4
@@ -1,5 +1,5 @@
# sys_wait_h.m4 serial 6
-dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2018 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.
diff --git a/m4/sysexits.m4 b/m4/sysexits.m4
index 64deb70e..42bbae41 100644
--- a/m4/sysexits.m4
+++ b/m4/sysexits.m4
@@ -1,5 +1,5 @@
# sysexits.m4 serial 6
-dnl Copyright (C) 2003, 2005, 2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005, 2007, 2009-2018 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.
diff --git a/m4/time_h.m4 b/m4/time_h.m4
index b9256787..ad6f2f59 100644
--- a/m4/time_h.m4
+++ b/m4/time_h.m4
@@ -1,8 +1,8 @@
# Configure a more-standard replacement for <time.h>.
-# Copyright (C) 2000-2001, 2003-2007, 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2018 Free Software Foundation, Inc.
-# serial 9
+# serial 11
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -104,24 +104,34 @@ AC_DEFUN([gl_TIME_MODULE_INDICATOR],
AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
[
+ GNULIB_CTIME=0; AC_SUBST([GNULIB_CTIME])
GNULIB_MKTIME=0; AC_SUBST([GNULIB_MKTIME])
+ GNULIB_LOCALTIME=0; AC_SUBST([GNULIB_LOCALTIME])
GNULIB_NANOSLEEP=0; AC_SUBST([GNULIB_NANOSLEEP])
+ GNULIB_STRFTIME=0; AC_SUBST([GNULIB_STRFTIME])
GNULIB_STRPTIME=0; AC_SUBST([GNULIB_STRPTIME])
GNULIB_TIMEGM=0; AC_SUBST([GNULIB_TIMEGM])
GNULIB_TIME_R=0; AC_SUBST([GNULIB_TIME_R])
GNULIB_TIME_RZ=0; AC_SUBST([GNULIB_TIME_RZ])
+ GNULIB_TZSET=0; AC_SUBST([GNULIB_TZSET])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_DECL_LOCALTIME_R=1; AC_SUBST([HAVE_DECL_LOCALTIME_R])
HAVE_NANOSLEEP=1; AC_SUBST([HAVE_NANOSLEEP])
HAVE_STRPTIME=1; AC_SUBST([HAVE_STRPTIME])
HAVE_TIMEGM=1; AC_SUBST([HAVE_TIMEGM])
+ HAVE_TZSET=1; AC_SUBST([HAVE_TZSET])
+ dnl Even GNU libc does not have timezone_t yet.
+ HAVE_TIMEZONE_T=0; AC_SUBST([HAVE_TIMEZONE_T])
dnl If another module says to replace or to not replace, do that.
dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK;
dnl this lets maintainers check for portability.
+ REPLACE_CTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_CTIME])
REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R])
REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME])
REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP])
+ REPLACE_STRFTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_STRFTIME])
REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM])
+ REPLACE_TZSET=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TZSET])
dnl Hack so that the time module doesn't depend on the sys_time module.
dnl First, default GNULIB_GETTIMEOFDAY to 0 if sys_time is absent.
diff --git a/m4/unistd-safer.m4 b/m4/unistd-safer.m4
index 7a3e4c52..2027f771 100644
--- a/m4/unistd-safer.m4
+++ b/m4/unistd-safer.m4
@@ -1,5 +1,5 @@
#serial 9
-dnl Copyright (C) 2002, 2005-2006, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2006, 2009-2018 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.
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4
index 25aef19e..159c48ae 100644
--- a/m4/unistd_h.m4
+++ b/m4/unistd_h.m4
@@ -1,5 +1,5 @@
-# unistd_h.m4 serial 69
-dnl Copyright (C) 2006-2017 Free Software Foundation, Inc.
+# unistd_h.m4 serial 73
+dnl Copyright (C) 2006-2018 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.
@@ -37,7 +37,7 @@ AC_DEFUN([gl_UNISTD_H],
# include <fcntl.h>
# include <stdio.h>
# include <stdlib.h>
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if defined _WIN32 && ! defined __CYGWIN__
# include <io.h>
# endif
#endif
@@ -46,8 +46,8 @@ AC_DEFUN([gl_UNISTD_H],
gethostname getlogin getlogin_r getpagesize
getusershell setusershell endusershell
group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite
- readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r
- unlink unlinkat usleep])
+ readlink readlinkat rmdir sethostname sleep symlink symlinkat
+ truncate ttyname_r unlink unlinkat usleep])
])
AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
@@ -102,6 +102,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP])
GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK])
GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT])
+ GNULIB_TRUNCATE=0; AC_SUBST([GNULIB_TRUNCATE])
GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R])
GNULIB_UNISTD_H_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING])
GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE])
@@ -150,6 +151,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE])
HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL])
HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME])
+ HAVE_DECL_TRUNCATE=1; AC_SUBST([HAVE_DECL_TRUNCATE])
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])
@@ -157,6 +159,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE])
REPLACE_DUP=0; AC_SUBST([REPLACE_DUP])
REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2])
+ REPLACE_FACCESSAT=0; AC_SUBST([REPLACE_FACCESSAT])
REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT])
REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE])
REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
@@ -179,6 +182,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP])
REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK])
REPLACE_SYMLINKAT=0; AC_SUBST([REPLACE_SYMLINKAT])
+ REPLACE_TRUNCATE=0; AC_SUBST([REPLACE_TRUNCATE])
REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R])
REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK])
REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT])
diff --git a/m4/vasnprintf.m4 b/m4/vasnprintf.m4
index 47c5951c..b3fda27e 100644
--- a/m4/vasnprintf.m4
+++ b/m4/vasnprintf.m4
@@ -1,5 +1,5 @@
# vasnprintf.m4 serial 36
-dnl Copyright (C) 2002-2004, 2006-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2006-2018 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.
diff --git a/m4/vsnprintf.m4 b/m4/vsnprintf.m4
index 9c37bca9..1ebaddae 100644
--- a/m4/vsnprintf.m4
+++ b/m4/vsnprintf.m4
@@ -1,5 +1,5 @@
# vsnprintf.m4 serial 7
-dnl Copyright (C) 2002-2004, 2007-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2007-2018 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.
diff --git a/m4/warn-on-use.m4 b/m4/warn-on-use.m4
index 25ce7378..e9c48bb5 100644
--- a/m4/warn-on-use.m4
+++ b/m4/warn-on-use.m4
@@ -1,5 +1,5 @@
# warn-on-use.m4 serial 5
-dnl Copyright (C) 2010-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2018 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.
diff --git a/m4/wchar_h.m4 b/m4/wchar_h.m4
index d0e11a04..a062ca98 100644
--- a/m4/wchar_h.m4
+++ b/m4/wchar_h.m4
@@ -1,13 +1,13 @@
dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
-dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2018 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 Written by Eric Blake.
-# wchar_h.m4 serial 40
+# wchar_h.m4 serial 43
AC_DEFUN([gl_WCHAR_H],
[
@@ -35,6 +35,8 @@ AC_DEFUN([gl_WCHAR_H],
fi
AC_SUBST([HAVE_WINT_T])
+ AC_REQUIRE([gl_TYPE_WINT_T_PREREQ])
+
dnl Check for declarations of anything we want to poison if the
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[
@@ -53,7 +55,7 @@ AC_DEFUN([gl_WCHAR_H],
wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset
wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp
wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr
- wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth
+ wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth wcsftime
])
])
@@ -61,8 +63,8 @@ dnl Check whether <wchar.h> is usable at all.
AC_DEFUN([gl_WCHAR_H_INLINE_OK],
[
dnl Test whether <wchar.h> suffers due to the transition from '__inline' to
- dnl 'gnu_inline'. See <http://sourceware.org/bugzilla/show_bug.cgi?id=4022>
- dnl and <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>. In summary,
+ dnl 'gnu_inline'. See <https://sourceware.org/bugzilla/show_bug.cgi?id=4022>
+ dnl and <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>. In summary,
dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and
dnl the option -std=c99 or -std=gnu99, leads to a broken <wchar.h>.
AC_CACHE_CHECK([whether <wchar.h> uses 'inline' correctly],
@@ -88,7 +90,8 @@ int main () { return zero(); }
dnl that the object file has the latter name from the start.
save_ac_compile="$ac_compile"
ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
- if AC_TRY_EVAL([ac_compile]); then
+ if echo '#include "conftest.c"' >conftest1.c &&
+ AC_TRY_EVAL([ac_compile]); then
AC_LANG_CONFTEST([
AC_LANG_SOURCE([[#define wcstod renamed_wcstod
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
@@ -103,7 +106,8 @@ int zero (void) { return 0; }
]])])
dnl See note above about renaming object files.
ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
- if AC_TRY_EVAL([ac_compile]); then
+ if echo '#include "conftest.c"' >conftest2.c &&
+ AC_TRY_EVAL([ac_compile]); then
if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then
:
else
@@ -112,7 +116,7 @@ int zero (void) { return 0; }
fi
fi
ac_compile="$save_ac_compile"
- rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
+ rm -f conftest[12].c conftest[12].$ac_objext conftest$ac_exeext
])
if test $gl_cv_header_wchar_h_correct_inline = no; then
AC_MSG_ERROR([<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
@@ -120,7 +124,7 @@ This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
C99 mode. You have four options:
- Add the flag -fgnu89-inline to CC and reconfigure, or
- Fix your include files, using parts of
- <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
+ <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
- Use a gcc version older than 4.3, or
- Don't use the flags -std=c99 or -std=gnu99.
Configuration aborted.])
@@ -177,6 +181,7 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS],
GNULIB_WCSSTR=0; AC_SUBST([GNULIB_WCSSTR])
GNULIB_WCSTOK=0; AC_SUBST([GNULIB_WCSTOK])
GNULIB_WCSWIDTH=0; AC_SUBST([GNULIB_WCSWIDTH])
+ GNULIB_WCSFTIME=0; AC_SUBST([GNULIB_WCSFTIME])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC])
HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT])
@@ -215,6 +220,7 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS],
HAVE_WCSSTR=1; AC_SUBST([HAVE_WCSSTR])
HAVE_WCSTOK=1; AC_SUBST([HAVE_WCSTOK])
HAVE_WCSWIDTH=1; AC_SUBST([HAVE_WCSWIDTH])
+ HAVE_WCSFTIME=1; AC_SUBST([HAVE_WCSFTIME])
HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB])
HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH])
REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T])
@@ -230,4 +236,5 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS],
REPLACE_WCSNRTOMBS=0; AC_SUBST([REPLACE_WCSNRTOMBS])
REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH])
REPLACE_WCSWIDTH=0; AC_SUBST([REPLACE_WCSWIDTH])
+ REPLACE_WCSFTIME=0; AC_SUBST([REPLACE_WCSFTIME])
])
diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4
index 11783d29..83bc3d5b 100644
--- a/m4/wchar_t.m4
+++ b/m4/wchar_t.m4
@@ -1,5 +1,5 @@
# wchar_t.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2002-2003, 2008-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2018 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.
diff --git a/m4/wctype_h.m4 b/m4/wctype_h.m4
index 45ddaeb1..15d1ef32 100644
--- a/m4/wctype_h.m4
+++ b/m4/wctype_h.m4
@@ -1,8 +1,8 @@
-# wctype_h.m4 serial 18
+# wctype_h.m4 serial 21
dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
-dnl Copyright (C) 2006-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2018 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.
@@ -30,6 +30,8 @@ AC_DEFUN([gl_WCTYPE_H],
fi
AC_SUBST([HAVE_WINT_T])
+ AC_REQUIRE([gl_TYPE_WINT_T_PREREQ])
+
gl_CHECK_NEXT_HEADERS([wctype.h])
if test $ac_cv_header_wctype_h = yes; then
if test $ac_cv_func_iswcntrl = yes; then
@@ -51,7 +53,8 @@ AC_DEFUN([gl_WCTYPE_H],
int main () { return iswprint ('x') == 0; }
]])],
[gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no],
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
+ [dnl Guess no on Linux libc5, yes otherwise.
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
#if __GNU_LIBRARY__ == 1
Linux libc5 i18n is broken.
#endif]], [])],
diff --git a/m4/wint_t.m4 b/m4/wint_t.m4
index 65e25a4c..95f68548 100644
--- a/m4/wint_t.m4
+++ b/m4/wint_t.m4
@@ -1,5 +1,5 @@
-# wint_t.m4 serial 6
-dnl Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc.
+# wint_t.m4 serial 7
+dnl Copyright (C) 2003, 2007-2018 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.
@@ -60,3 +60,15 @@ AC_DEFUN([gt_TYPE_WINT_T],
fi
AC_SUBST([GNULIB_OVERRIDES_WINT_T])
])
+
+dnl Prerequisites of the 'wint_t' override.
+AC_DEFUN([gl_TYPE_WINT_T_PREREQ],
+[
+ AC_CHECK_HEADERS_ONCE([crtdefs.h])
+ if test $ac_cv_header_crtdefs_h = yes; then
+ HAVE_CRTDEFS_H=1
+ else
+ HAVE_CRTDEFS_H=0
+ fi
+ AC_SUBST([HAVE_CRTDEFS_H])
+])
diff --git a/m4/write.m4 b/m4/write.m4
index fd46acc1..ecbdd225 100644
--- a/m4/write.m4
+++ b/m4/write.m4
@@ -1,5 +1,5 @@
-# write.m4 serial 5
-dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
+# write.m4 serial 6
+dnl Copyright (C) 2008-2018 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.
@@ -7,10 +7,12 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_WRITE],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- AC_REQUIRE([gl_MSVC_INVAL])
- if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
- REPLACE_WRITE=1
- fi
+ m4_ifdef([gl_MSVC_INVAL], [
+ AC_REQUIRE([gl_MSVC_INVAL])
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ REPLACE_WRITE=1
+ fi
+ ])
dnl This ifdef is just an optimization, to avoid performing a configure
dnl check whose result is not used. It does not make the test of
dnl GNULIB_UNISTD_H_SIGPIPE or GNULIB_SIGPIPE redundant.
diff --git a/m4/xalloc.m4 b/m4/xalloc.m4
deleted file mode 100644
index 53aba149..00000000
--- a/m4/xalloc.m4
+++ /dev/null
@@ -1,7 +0,0 @@
-# xalloc.m4 serial 18
-dnl Copyright (C) 2002-2006, 2009-2017 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.
-
-AC_DEFUN([gl_XALLOC], [:])
diff --git a/m4/xgetcwd.m4 b/m4/xgetcwd.m4
deleted file mode 100644
index e261a628..00000000
--- a/m4/xgetcwd.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-#serial 8
-dnl Copyright (C) 2002-2006, 2009-2017 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.
-
-AC_DEFUN([gl_XGETCWD],
-[
- :
-])
diff --git a/m4/xsize.m4 b/m4/xsize.m4
index 5f850577..fc7c1ab3 100644
--- a/m4/xsize.m4
+++ b/m4/xsize.m4
@@ -1,5 +1,5 @@
# xsize.m4 serial 5
-dnl Copyright (C) 2003-2004, 2008-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2004, 2008-2018 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.
diff --git a/m4/xstrndup.m4 b/m4/xstrndup.m4
deleted file mode 100644
index efb94a1a..00000000
--- a/m4/xstrndup.m4
+++ /dev/null
@@ -1,15 +0,0 @@
-# xstrndup.m4 serial 2
-dnl Copyright (C) 2003, 2009-2017 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.
-
-AC_DEFUN([gl_XSTRNDUP],
-[
- gl_PREREQ_XSTRNDUP
-])
-
-# Prerequisites of lib/xstrndup.c.
-AC_DEFUN([gl_PREREQ_XSTRNDUP], [
- :
-])