]> git.eshelyaron.com Git - emacs.git/commitdiff
Update from gnulib
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 14 Jan 2020 00:25:28 +0000 (16:25 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 14 Jan 2020 00:27:02 +0000 (16:27 -0800)
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.

build-aux/config.guess
build-aux/config.sub
lib/gnulib.mk.in
lib/inttypes.in.h
lib/stdlib.in.h
lib/unistd.in.h
m4/00gnulib.m4
m4/gnulib-comp.m4
m4/largefile.m4
m4/unistd_h.m4

index 95b16c7747a1562945d51921249d22b05a7001e1..45001cfecde8f3e0716992163e3e211b6997f749 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2019 Free Software Foundation, Inc.
+#   Copyright 1992-2020 Free Software Foundation, Inc.
 
-timestamp='2019-12-21'
+timestamp='2020-01-01'
 
 # 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
@@ -50,7 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2019 Free Software Foundation, Inc.
+Copyright 1992-2020 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
index 0f2234c174d48b551995ca26d922d07fe94f1411..f02d43ad500ca9fc7467e3f28151ce18bc98bfa3 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2019 Free Software Foundation, Inc.
+#   Copyright 1992-2020 Free Software Foundation, Inc.
 
-timestamp='2019-06-30'
+timestamp='2020-01-01'
 
 # 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
@@ -67,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2019 Free Software Foundation, Inc.
+Copyright 1992-2020 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
index 951e5b1a652b751c2c8152be88e9c1369ad381e0..ed80f88a8740c489c4becaca3004d1dbf71faeb6 100644 (file)
@@ -316,6 +316,7 @@ GNULIB_GETLINE = @GNULIB_GETLINE@
 GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
 GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
 GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETOPT_POSIX = @GNULIB_GETOPT_POSIX@
 GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
 GNULIB_GETPASS = @GNULIB_GETPASS@
 GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
@@ -3210,6 +3211,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
              -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
              -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
+             -e 's/@''GNULIB_GETOPT_POSIX''@/$(GNULIB_GETOPT_POSIX)/g' \
              -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
              -e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \
              -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
index 5184e266f27fdb5ceac12e74630f7ccde216b37b..d6efc7eeeef0f0c0f447841c8f2aa297401610e9 100644 (file)
@@ -38,6 +38,8 @@
 #  endif
 
 #  @INCLUDE_NEXT@ @NEXT_INTTYPES_H@
+
+#  define _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H
 # endif
 #endif
 
index e088959b285b724b74ff228835247e1b76865b64..49bbf6fccfbb9f8311e774598e526e54be15d67b 100644 (file)
@@ -201,6 +201,10 @@ _GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name)
 #  endif
 _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name));
 # endif
+# ifndef GNULIB_defined_canonicalize_file_name
+#  define GNULIB_defined_canonicalize_file_name \
+     (!@HAVE_CANONICALIZE_FILE_NAME@ || @REPLACE_CANONICALIZE_FILE_NAME@)
+# endif
 _GL_CXXALIASWARN (canonicalize_file_name);
 #elif defined GNULIB_POSIXCHECK
 # undef canonicalize_file_name
@@ -516,6 +520,9 @@ _GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
 #  endif
 _GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
 # endif
+# ifndef GNULIB_defined_ptsname_r
+#  define GNULIB_defined_ptsname_r (!@HAVE_PTSNAME_R@ || @REPLACE_PTSNAME_R@)
+# endif
 _GL_CXXALIASWARN (ptsname_r);
 #elif defined GNULIB_POSIXCHECK
 # undef ptsname_r
index 7909416f366fdafd7c73ba9dca06d40ab6df3fcf..d6176adc00ddb3d3949ba32b485608c1fb7a5029 100644 (file)
 
 
 /* Get getopt(), optarg, optind, opterr, optopt.  */
-#if @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT
+#if @GNULIB_GETOPT_POSIX@ && @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT
 # include <getopt-cdefs.h>
 # include <getopt-pfx-core.h>
 #endif
index 1a1a1d74f7ef48a6c39bd738a05a750efb9e128e..58bc4efb9c52249f39ef2cf7c9b33276e5a73f9c 100644 (file)
@@ -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
index 85a605693267790b2b920c54985c23f0c1c4b3cb..abaca719024a15920050b2a5ce0ba9d0ee670940 100644 (file)
@@ -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
index 40b16bc0e540eb563103ebae5d83278ea568cff2..e381339c40c3989912b82d05a1309c257efe6b9a 100644 (file)
@@ -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])
index 7453866df842179cb2a5f8cdc1f5efb37b9523a3..ea2bb016dbbb36039d27cb6ebb339df927e8981e 100644 (file)
@@ -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])