summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-07-06 08:54:24 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-07-06 08:54:54 -0700
commit27e727fb6ceca83a79a37b76741179c1406cc768 (patch)
tree7951445d69fbf1246c2892aae9b73951df3640a4
parent3a1fa9ed3f549ea9ac1eb07653d631372379c522 (diff)
downloademacs-27e727fb6ceca83a79a37b76741179c1406cc768.tar.gz
Update from Gnulib
This incorporates: 2019-07-06 thread, lock, cond, tls: Remove support for Pth threads 2019-07-02 verify: document ‘assume’ better 2019-06-30 Include <stdlib.h> when needed 2019-06-30 inet_ntop, inet_pton: Avoid conflict with native Windows * build-aux/config.sub, lib/faccessat.c, lib/fcntl.c, lib/fstatat.c: * lib/readlinkat.c, lib/verify.h, m4/pthread_sigmask.m4: * m4/sys_socket_h.m4: Copy from Gnulib. * lib/gnulib.mk.in: Regenerate.
-rwxr-xr-xbuild-aux/config.sub25
-rw-r--r--lib/faccessat.c3
-rw-r--r--lib/fcntl.c1
-rw-r--r--lib/fstatat.c1
-rw-r--r--lib/gnulib.mk.in1
-rw-r--r--lib/readlinkat.c5
-rw-r--r--lib/verify.h8
-rw-r--r--m4/pthread_sigmask.m46
-rw-r--r--m4/sys_socket_h.m428
9 files changed, 45 insertions, 33 deletions
diff --git a/build-aux/config.sub b/build-aux/config.sub
index 5b158ac41c9..a318a468685 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2019 Free Software Foundation, Inc.
-timestamp='2019-05-23'
+timestamp='2019-06-30'
# 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
@@ -337,17 +337,14 @@ case $1 in
basic_machine=m88k-harris
os=sysv3
;;
- hp300)
+ hp300 | hp300hpux)
basic_machine=m68k-hp
+ os=hpux
;;
hp300bsd)
basic_machine=m68k-hp
os=bsd
;;
- hp300hpux)
- basic_machine=m68k-hp
- os=hpux
- ;;
hppaosf)
basic_machine=hppa1.1-hp
os=osf
@@ -360,10 +357,6 @@ case $1 in
basic_machine=i386-mach
os=mach
;;
- vsta)
- basic_machine=i386-pc
- os=vsta
- ;;
isi68 | isi)
basic_machine=m68k-isi
os=sysv
@@ -612,6 +605,10 @@ case $1 in
basic_machine=vax-dec
os=vms
;;
+ vsta)
+ basic_machine=i386-pc
+ os=vsta
+ ;;
vxworks960)
basic_machine=i960-wrs
os=vxworks
@@ -1350,7 +1347,7 @@ case $os in
| nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
| clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
| knetbsd* | mirbsd* | netbsd* \
- | bitrig* | openbsd* | solidbsd* | libertybsd* \
+ | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \
| ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
| bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
| ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
@@ -1368,7 +1365,8 @@ case $os in
| powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
| skyos* | haiku* | rdos* | toppers* | drops* | es* \
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
- | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi*)
+ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
+ | nsk* | powerunix)
# Remember, each alternative MUST END IN *, to match a version number.
;;
qnx*)
@@ -1452,9 +1450,6 @@ case $os in
ns2)
os=nextstep2
;;
- nsk*)
- os=nsk
- ;;
# Preserve the version number of sinix5.
sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
diff --git a/lib/faccessat.c b/lib/faccessat.c
index 6c63e61d83f..e8e581a54b5 100644
--- a/lib/faccessat.c
+++ b/lib/faccessat.c
@@ -22,9 +22,12 @@
#define _GL_INCLUDING_UNISTD_H
#include <config.h>
+/* Specification. */
#include <unistd.h>
+
#include <errno.h>
#include <fcntl.h>
+#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#undef _GL_INCLUDING_UNISTD_H
diff --git a/lib/fcntl.c b/lib/fcntl.c
index 51f62ef78a8..a3ffaa6e47b 100644
--- a/lib/fcntl.c
+++ b/lib/fcntl.c
@@ -25,6 +25,7 @@
#include <errno.h>
#include <limits.h>
#include <stdarg.h>
+#include <stdlib.h>
#include <unistd.h>
#ifdef __KLIBC__
diff --git a/lib/fstatat.c b/lib/fstatat.c
index 019d3c61638..db864da7605 100644
--- a/lib/fstatat.c
+++ b/lib/fstatat.c
@@ -49,6 +49,7 @@ orig_fstatat (int fd, char const *filename, struct stat *buf, int flags)
#include <errno.h>
#include <fcntl.h>
+#include <stdlib.h>
#include <string.h>
#if HAVE_FSTATAT && HAVE_WORKING_FSTATAT_ZERO_FLAG
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in
index 6f978aeb0cc..85fdbd2df6f 100644
--- a/lib/gnulib.mk.in
+++ b/lib/gnulib.mk.in
@@ -1077,7 +1077,6 @@ gl_GNULIB_ENABLED_getdtablesize = @gl_GNULIB_ENABLED_getdtablesize@
gl_GNULIB_ENABLED_getgroups = @gl_GNULIB_ENABLED_getgroups@
gl_GNULIB_ENABLED_malloca = @gl_GNULIB_ENABLED_malloca@
gl_GNULIB_ENABLED_open = @gl_GNULIB_ENABLED_open@
-gl_GNULIB_ENABLED_pathmax = @gl_GNULIB_ENABLED_pathmax@
gl_GNULIB_ENABLED_strtoll = @gl_GNULIB_ENABLED_strtoll@
gl_LIBOBJS = @gl_LIBOBJS@
gl_LTLIBOBJS = @gl_LTLIBOBJS@
diff --git a/lib/readlinkat.c b/lib/readlinkat.c
index c0f3e59f6ce..069411690d6 100644
--- a/lib/readlinkat.c
+++ b/lib/readlinkat.c
@@ -18,8 +18,11 @@
#include <config.h>
-#include <errno.h>
+/* Specification. */
#include <unistd.h>
+
+#include <errno.h>
+#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
diff --git a/lib/verify.h b/lib/verify.h
index f8e4eff026d..9b8e1ed20fa 100644
--- a/lib/verify.h
+++ b/lib/verify.h
@@ -259,9 +259,11 @@ template <int w>
# define __has_builtin(x) 0
#endif
-/* Assume that R always holds. This lets the compiler optimize
- accordingly. R should not have side-effects; it may or may not be
- evaluated. Behavior is undefined if R is false. */
+/* Assume that R always holds. Behavior is undefined if R is false,
+ fails to evaluate, or has side effects. Although assuming R can
+ help a compiler generate better code or diagnostics, performance
+ can suffer if R uses hard-to-optimize features such as function
+ calls not inlined by the compiler. */
#if (__has_builtin (__builtin_unreachable) \
|| 4 < __GNUC__ + (5 <= __GNUC_MINOR__))
diff --git a/m4/pthread_sigmask.m4 b/m4/pthread_sigmask.m4
index 648edf911fe..d788cf656ea 100644
--- a/m4/pthread_sigmask.m4
+++ b/m4/pthread_sigmask.m4
@@ -1,4 +1,4 @@
-# pthread_sigmask.m4 serial 17
+# pthread_sigmask.m4 serial 18
dnl Copyright (C) 2011-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -75,10 +75,6 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
else
dnl pthread_sigmask may exist but does not interoperate with the chosen
dnl multithreading facility.
- dnl If "$gl_threads_api" = pth, we could use the function pth_sigmask,
- dnl but it is equivalent to sigprocmask, so we choose to emulate
- dnl pthread_sigmask with sigprocmask also in this case. This yields
- dnl fewer link dependencies.
if test $ac_cv_func_pthread_sigmask = yes; then
REPLACE_PTHREAD_SIGMASK=1
else
diff --git a/m4/sys_socket_h.m4 b/m4/sys_socket_h.m4
index 1ea7b0b3f32..d0a902061aa 100644
--- a/m4/sys_socket_h.m4
+++ b/m4/sys_socket_h.m4
@@ -1,4 +1,4 @@
-# sys_socket_h.m4 serial 23
+# sys_socket_h.m4 serial 24
dnl Copyright (C) 2005-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -104,17 +104,11 @@ AC_DEFUN([gl_PREREQ_SYS_H_SOCKET],
gl_CHECK_NEXT_HEADERS([sys/socket.h])
if test $ac_cv_header_sys_socket_h = yes; then
HAVE_SYS_SOCKET_H=1
- HAVE_WS2TCPIP_H=0
else
HAVE_SYS_SOCKET_H=0
- if test $ac_cv_header_ws2tcpip_h = yes; then
- HAVE_WS2TCPIP_H=1
- else
- HAVE_WS2TCPIP_H=0
- fi
fi
AC_SUBST([HAVE_SYS_SOCKET_H])
- AC_SUBST([HAVE_WS2TCPIP_H])
+ gl_PREREQ_SYS_H_WS2TCPIP
])
# Common prerequisites of the <sys/socket.h> replacement and of the
@@ -142,6 +136,24 @@ AC_DEFUN([gl_PREREQ_SYS_H_WINSOCK2],
AC_SUBST([HAVE_WINSOCK2_H])
])
+# Common prerequisites of the <sys/socket.h> replacement and of the
+# <arpa/inet.h> replacement.
+# Sets and substitutes HAVE_WS2TCPIP_H.
+AC_DEFUN([gl_PREREQ_SYS_H_WS2TCPIP],
+[
+ AC_REQUIRE([gl_CHECK_SOCKET_HEADERS])
+ if test $ac_cv_header_sys_socket_h = yes; then
+ HAVE_WS2TCPIP_H=0
+ else
+ if test $ac_cv_header_ws2tcpip_h = yes; then
+ HAVE_WS2TCPIP_H=1
+ else
+ HAVE_WS2TCPIP_H=0
+ fi
+ fi
+ AC_SUBST([HAVE_WS2TCPIP_H])
+])
+
AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.