summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-06-29 17:31:04 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2018-06-29 17:32:35 -0700
commit35e9dcab5141bf9cae67abe740933fe627ecc371 (patch)
tree2813d1f6340df34a97695874e5546e4b2454d555 /m4
parent2e2811865f0adb6658a87d3581a2dc3a9022f451 (diff)
downloademacs-35e9dcab5141bf9cae67abe740933fe627ecc371.tar.gz
Update from Gnulib
This incorporates: 2018-06-29 regex: glibc does not use intprops.h 2018-06-28 regex: port to recently proposed glibc regex merge 2018-06-25 Continue to use spaces for indentation, not tabs 2018-06-25 manywarnings: Don't enable -Wjump-misses-init by default 2018-06-25 acl-internal.h: remove _GL_ATTRIBUTE_CONST on void function 2018-06-24 manywarnings: accommodate GCC 9: remove -Wchkp and -Wabi 2018-06-24 maint: clarify comments about sticky EOF 2018-06-24 af_alg: avoid hangs when reading from streams 2018-06-17 crypto: use byteswap 2018-06-17 getloadavg: Return 0 on MS-Windows without Cygwi 2018-06-17 getloadavg: Allow building on MS-Windows without Cygwin * build-aux/config.guess, build-aux/config.sub, doc/misc/texinfo.tex: * lib/acl-internal.c, lib/acl-internal.h, lib/get-permissions.c: * lib/getloadavg.c, lib/gettimeofday.c, lib/md5.c, lib/pselect.c: * lib/set-permissions.c, lib/sha1.c, lib/sha256.c, lib/sha512.c: * lib/time.in.h, m4/getloadavg.m4, m4/gnulib-common.m4: * m4/manywarnings.m4, m4/pthread_sigmask.m4, m4/vararrays.m4: Copy from Gnulib.
Diffstat (limited to 'm4')
-rw-r--r--m4/getloadavg.m42
-rw-r--r--m4/gnulib-common.m420
-rw-r--r--m4/manywarnings.m47
-rw-r--r--m4/pthread_sigmask.m470
-rw-r--r--m4/vararrays.m466
5 files changed, 81 insertions, 84 deletions
diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4
index d3a8910ecfc..c9f5a6da5df 100644
--- a/m4/getloadavg.m4
+++ b/m4/getloadavg.m4
@@ -108,7 +108,7 @@ AC_DEFUN([gl_PREREQ_GETLOADAVG],
[
# Figure out what our getloadavg.c needs.
-AC_CHECK_HEADERS_ONCE([sys/param.h])
+AC_CHECK_HEADERS_ONCE([sys/param.h unistd.h])
# On HPUX9, an unprivileged user can get load averages this way.
if test $gl_func_getloadavg_done = no; then
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index 736e421016c..5f07855acf1 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -354,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/manywarnings.m4 b/m4/manywarnings.m4
index 60c0e4051cb..925c40e139a 100644
--- a/m4/manywarnings.m4
+++ b/m4/manywarnings.m4
@@ -1,4 +1,4 @@
-# manywarnings.m4 serial 14
+# manywarnings.m4 serial 15
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,
@@ -108,12 +108,11 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)],
# comm -3 \
# <((sed -n 's/^ *\(-[^ 0-9][^ ]*\) .*/\1/p' manywarnings.m4; \
# awk '/^[^#]/ {print $1}' ../build-aux/gcc-warning.spec) | sort) \
- # <(gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort)
+ # <(LC_ALL=C gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort)
gl_manywarn_set=
for gl_manywarn_item in -fno-common \
-W \
- -Wabi \
-Waddress \
-Waggressive-loop-optimizations \
-Wall \
@@ -128,7 +127,6 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)],
-Wcast-align=strict \
-Wcast-function-type \
-Wchar-subscripts \
- -Wchkp \
-Wclobbered \
-Wcomment \
-Wcomments \
@@ -176,7 +174,6 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)],
-Wint-to-pointer-cast \
-Winvalid-memory-model \
-Winvalid-pch \
- -Wjump-misses-init \
-Wlogical-not-parentheses \
-Wlogical-op \
-Wmain \
diff --git a/m4/pthread_sigmask.m4 b/m4/pthread_sigmask.m4
index a33b433c0ef..585b80a40ff 100644
--- a/m4/pthread_sigmask.m4
+++ b/m4/pthread_sigmask.m4
@@ -124,41 +124,41 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
case " $LIBS " in
*' -pthread '*) ;;
*' -lpthread '*) ;;
- *)
- AC_CACHE_CHECK([whether pthread_sigmask works without -lpthread],
- [gl_cv_func_pthread_sigmask_in_libc_works],
- [
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
- #include <pthread.h>
- #include <signal.h>
- #include <stddef.h>
- int main ()
- {
- sigset_t set;
- sigemptyset (&set);
- return pthread_sigmask (1729, &set, NULL) != 0;
- }]])],
- [gl_cv_func_pthread_sigmask_in_libc_works=no],
- [gl_cv_func_pthread_sigmask_in_libc_works=yes],
- [
- changequote(,)dnl
- case "$host_os" in
- freebsd* | hpux* | solaris | solaris2.[2-9]*)
- gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
- *)
- gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
- esac
- changequote([,])dnl
- ])
- ])
- case "$gl_cv_func_pthread_sigmask_in_libc_works" in
- *no)
- REPLACE_PTHREAD_SIGMASK=1
- AC_DEFINE([PTHREAD_SIGMASK_INEFFECTIVE], [1],
- [Define to 1 if pthread_sigmask may return 0 and have no effect.])
- ;;
- esac;;
+ *)
+ AC_CACHE_CHECK([whether pthread_sigmask works without -lpthread],
+ [gl_cv_func_pthread_sigmask_in_libc_works],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+ #include <pthread.h>
+ #include <signal.h>
+ #include <stddef.h>
+ int main ()
+ {
+ sigset_t set;
+ sigemptyset (&set);
+ return pthread_sigmask (1729, &set, NULL) != 0;
+ }]])],
+ [gl_cv_func_pthread_sigmask_in_libc_works=no],
+ [gl_cv_func_pthread_sigmask_in_libc_works=yes],
+ [
+ changequote(,)dnl
+ case "$host_os" in
+ freebsd* | hpux* | solaris | solaris2.[2-9]*)
+ gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
+ *)
+ gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
+ esac
+ changequote([,])dnl
+ ])
+ ])
+ case "$gl_cv_func_pthread_sigmask_in_libc_works" in
+ *no)
+ REPLACE_PTHREAD_SIGMASK=1
+ AC_DEFINE([PTHREAD_SIGMASK_INEFFECTIVE], [1],
+ [Define to 1 if pthread_sigmask may return 0 and have no effect.])
+ ;;
+ esac;;
esac
fi
diff --git a/m4/vararrays.m4 b/m4/vararrays.m4
index 329eb490c3c..17563b519b0 100644
--- a/m4/vararrays.m4
+++ b/m4/vararrays.m4
@@ -18,44 +18,44 @@ AC_DEFUN([AC_C_VARARRAYS],
ac_cv_c_vararrays,
[AC_EGREP_CPP([defined],
[#ifdef __STDC_NO_VLA__
- defined
- #endif
+ defined
+ #endif
],
[ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'],
[AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[/* Test for VLA support. This test is partly inspired
- from examples in the C standard. Use at least two VLA
- functions to detect the GCC 3.4.3 bug described in:
- https://lists.gnu.org/r/bug-gnulib/2014-08/msg00014.html
- */
- #ifdef __STDC_NO_VLA__
- syntax error;
- #else
- extern int n;
- int B[100];
- int fvla (int m, int C[m][m]);
+ [AC_LANG_PROGRAM(
+ [[/* Test for VLA support. This test is partly inspired
+ from examples in the C standard. Use at least two VLA
+ functions to detect the GCC 3.4.3 bug described in:
+ https://lists.gnu.org/r/bug-gnulib/2014-08/msg00014.html
+ */
+ #ifdef __STDC_NO_VLA__
+ syntax error;
+ #else
+ extern int n;
+ int B[100];
+ int fvla (int m, int C[m][m]);
- int
- simple (int count, int all[static count])
- {
- return all[count - 1];
- }
+ int
+ simple (int count, int all[static count])
+ {
+ return all[count - 1];
+ }
- int
- fvla (int m, int C[m][m])
- {
- typedef int VLA[m][m];
- VLA x;
- int D[m];
- static int (*q)[m] = &B;
- int (*s)[n] = q;
- return C && &x[0][0] == &D[0] && &D[0] == s[0];
- }
- #endif
- ]])],
- [ac_cv_c_vararrays=yes],
- [ac_cv_c_vararrays=no])])])
+ int
+ fvla (int m, int C[m][m])
+ {
+ typedef int VLA[m][m];
+ VLA x;
+ int D[m];
+ static int (*q)[m] = &B;
+ int (*s)[n] = q;
+ return C && &x[0][0] == &D[0] && &D[0] == s[0];
+ }
+ #endif
+ ]])],
+ [ac_cv_c_vararrays=yes],
+ [ac_cv_c_vararrays=no])])])
if test "$ac_cv_c_vararrays" = yes; then
dnl This is for compatibility with Autoconf 2.61-2.69.
AC_DEFINE([HAVE_C_VARARRAYS], 1,