summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2020-01-13 16:25:28 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2020-01-13 16:27:02 -0800
commit4fc0bc96787252b1b3e14a7f747ef556273b5979 (patch)
tree4df0bfb717a271480089be4c3ccc7d1cd35e8b47 /m4
parent0abda558bc547991cddd9667be722eaeb428dca8 (diff)
downloademacs-4fc0bc96787252b1b3e14a7f747ef556273b5979.tar.gz
Update from gnulib
This incorporates: 2020-01-10 fix major regression from 2020-01-04 2020-01-05 tests: avoid GCC over-optimization 2020-01-04 fix AC_CHECK_DECL so it deactivates clang's built-ins 2020-01-03 getopt-posix: fix compilation failure in testdirs 2020-01-03 doc: mention the 64-bit inode number problem 2020-01-02 wchar: make the HP-UX workaround work on HP-UX 11.31 * build-aux/config.guess, build-aux/config.sub, lib/inttypes.in.h: * lib/stdlib.in.h, lib/unistd.in.h, m4/00gnulib.m4, m4/largefile.m4: * m4/unistd_h.m4: Copy from Gnulib * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
Diffstat (limited to 'm4')
-rw-r--r--m4/00gnulib.m470
-rw-r--r--m4/gnulib-comp.m41
-rw-r--r--m4/largefile.m44
-rw-r--r--m4/unistd_h.m43
4 files changed, 73 insertions, 5 deletions
diff --git a/m4/00gnulib.m4 b/m4/00gnulib.m4
index 1a1a1d74f7e..58bc4efb9c5 100644
--- a/m4/00gnulib.m4
+++ b/m4/00gnulib.m4
@@ -1,13 +1,14 @@
-# 00gnulib.m4 serial 3
+# 00gnulib.m4 serial 5
dnl Copyright (C) 2009-2020 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 This file must be named something that sorts before all other
-dnl gnulib-provided .m4 files. It is needed until such time as we can
-dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and
-dnl m4_divert semantics.
+dnl gnulib-provided .m4 files. The first part is needed until such time
+dnl as we can assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and
+dnl m4_divert semantics. The second part is needed until the clang fix
+dnl has been included in Autoconf.
# Until autoconf 2.63, handling of the diversion stack required m4_init
# to be called first; but this does not happen with aclocal. Wrapping
@@ -39,6 +40,67 @@ m4_version_prereq([2.63.263], [],
[m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl
[AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])])
+# The following definitions arrange to use a compiler option
+# -Werror=implicit-function-declaration in AC_CHECK_DECL, when the
+# compiler is clang. Without it, clang implicitly declares "known"
+# library functions in C mode, but not in C++ mode, which would cause
+# Gnulib to omit a declaration and thus later produce an error in C++
+# mode. As of clang 9.0, these "known" functions are identified through
+# LIBBUILTIN invocations in the LLVM source file
+# llvm/tools/clang/include/clang/Basic/Builtins.def.
+AC_DEFUN([gl_COMPILER_CLANG],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_CACHE_CHECK([whether the compiler is clang],
+ [gl_cv_compiler_clang],
+ [AC_EGREP_CPP([barfbarf],[
+#ifdef __clang__
+barfbarf
+#endif
+ ],
+ [gl_cv_compiler_clang=yes],
+ [gl_cv_compiler_clang=no])
+ ])
+])
+AC_DEFUN_ONCE([gl_COMPILER_PREPARE_CHECK_DECL],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gl_COMPILER_CLANG])
+ AC_CACHE_CHECK([for compiler option needed when checking for declarations],
+ [gl_cv_compiler_check_decl_option],
+ [if test $gl_cv_compiler_clang = yes; then
+ dnl Test whether the compiler supports the option
+ dnl '-Werror=implicit-function-declaration'.
+ save_ac_compile="$ac_compile"
+ ac_compile="$ac_compile -Werror=implicit-function-declaration"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
+ [gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'],
+ [gl_cv_compiler_check_decl_option=none])
+ ac_compile="$save_ac_compile"
+ else
+ gl_cv_compiler_check_decl_option=none
+ fi
+ ])
+ if test "x$gl_cv_compiler_check_decl_option" != xnone; then
+ ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
+ else
+ ac_compile_for_check_decl="$ac_compile"
+ fi
+])
+dnl Redefine _AC_CHECK_DECL_BODY so that it references ac_compile_for_check_decl
+dnl instead of ac_compile.
+m4_define([_AC_CHECK_DECL_BODY],
+[ ac_save_ac_compile="$ac_compile"
+ ac_compile="$ac_compile_for_check_decl"]
+m4_defn([_AC_CHECK_DECL_BODY])[ ac_compile="$ac_save_ac_compile"
+])
+ ])
+dnl Redefine AC_CHECK_DECL so that it starts with an invocation of
+dnl gl_COMPILER_PREPARE_CHECK_DECL.
+m4_define([AC_CHECK_DECL],
+ [gl_COMPILER_PREPARE_CHECK_DECL dnl
+]m4_defn([AC_CHECK_DECL]))
+
# gl_00GNULIB
# -----------
# Witness macro that this file has been included. Needed to force
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index 85a60569326..abaca719024 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -303,6 +303,7 @@ AC_DEFUN([gl_INIT],
GNULIB_GL_UNISTD_H_GETOPT=1
fi
AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
+ gl_UNISTD_MODULE_INDICATOR([getopt-posix])
gl_GETTIME
gl_FUNC_GETTIMEOFDAY
if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
diff --git a/m4/largefile.m4 b/m4/largefile.m4
index 40b16bc0e54..e381339c40c 100644
--- a/m4/largefile.m4
+++ b/m4/largefile.m4
@@ -1,4 +1,5 @@
# Enable large files on systems where this is not the default.
+# Enable support for files on Linux file systems with 64-bit inode numbers.
# Copyright 1992-1996, 1998-2020 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -73,6 +74,9 @@ rm -rf conftest*[]dnl
# one must use special compiler options to get large-file access to work.
# For more details about this brain damage please see:
# http://www.unix.org/version2/whatsnew/lfs20mar.html
+# Additionally, on Linux file systems with 64-bit inodes a file that happens
+# to have a 64-bit inode number cannot be accessed by 32-bit applications on
+# Linux x86/x86_64. This can occur with file systems such as XFS and NFS.
AC_DEFUN([AC_SYS_LARGEFILE],
[AC_ARG_ENABLE(largefile,
[ --disable-largefile omit support for large files])
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4
index 7453866df84..ea2bb016dbb 100644
--- a/m4/unistd_h.m4
+++ b/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 76
+# unistd_h.m4 serial 77
dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -84,6 +84,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME])
GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN])
GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R])
+ GNULIB_GETOPT_POSIX=0; AC_SUBST([GNULIB_GETOPT_POSIX])
GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE])
GNULIB_GETPASS=0; AC_SUBST([GNULIB_GETPASS])
GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL])