aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2019-07-06 08:54:24 -0700
committerPaul Eggert2019-07-06 08:54:54 -0700
commit27e727fb6ceca83a79a37b76741179c1406cc768 (patch)
tree7951445d69fbf1246c2892aae9b73951df3640a4
parent3a1fa9ed3f549ea9ac1eb07653d631372379c522 (diff)
downloademacs-27e727fb6ceca83a79a37b76741179c1406cc768.tar.gz
emacs-27e727fb6ceca83a79a37b76741179c1406cc768.zip
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 @@
2# Configuration validation subroutine script. 2# Configuration validation subroutine script.
3# Copyright 1992-2019 Free Software Foundation, Inc. 3# Copyright 1992-2019 Free Software Foundation, Inc.
4 4
5timestamp='2019-05-23' 5timestamp='2019-06-30'
6 6
7# This file is free software; you can redistribute it and/or modify it 7# This file is free software; you can redistribute it and/or modify it
8# under the terms of the GNU General Public License as published by 8# under the terms of the GNU General Public License as published by
@@ -337,17 +337,14 @@ case $1 in
337 basic_machine=m88k-harris 337 basic_machine=m88k-harris
338 os=sysv3 338 os=sysv3
339 ;; 339 ;;
340 hp300) 340 hp300 | hp300hpux)
341 basic_machine=m68k-hp 341 basic_machine=m68k-hp
342 os=hpux
342 ;; 343 ;;
343 hp300bsd) 344 hp300bsd)
344 basic_machine=m68k-hp 345 basic_machine=m68k-hp
345 os=bsd 346 os=bsd
346 ;; 347 ;;
347 hp300hpux)
348 basic_machine=m68k-hp
349 os=hpux
350 ;;
351 hppaosf) 348 hppaosf)
352 basic_machine=hppa1.1-hp 349 basic_machine=hppa1.1-hp
353 os=osf 350 os=osf
@@ -360,10 +357,6 @@ case $1 in
360 basic_machine=i386-mach 357 basic_machine=i386-mach
361 os=mach 358 os=mach
362 ;; 359 ;;
363 vsta)
364 basic_machine=i386-pc
365 os=vsta
366 ;;
367 isi68 | isi) 360 isi68 | isi)
368 basic_machine=m68k-isi 361 basic_machine=m68k-isi
369 os=sysv 362 os=sysv
@@ -612,6 +605,10 @@ case $1 in
612 basic_machine=vax-dec 605 basic_machine=vax-dec
613 os=vms 606 os=vms
614 ;; 607 ;;
608 vsta)
609 basic_machine=i386-pc
610 os=vsta
611 ;;
615 vxworks960) 612 vxworks960)
616 basic_machine=i960-wrs 613 basic_machine=i960-wrs
617 os=vxworks 614 os=vxworks
@@ -1350,7 +1347,7 @@ case $os in
1350 | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ 1347 | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
1351 | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ 1348 | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
1352 | knetbsd* | mirbsd* | netbsd* \ 1349 | knetbsd* | mirbsd* | netbsd* \
1353 | bitrig* | openbsd* | solidbsd* | libertybsd* \ 1350 | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \
1354 | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ 1351 | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
1355 | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ 1352 | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
1356 | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ 1353 | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
@@ -1368,7 +1365,8 @@ case $os in
1368 | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ 1365 | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
1369 | skyos* | haiku* | rdos* | toppers* | drops* | es* \ 1366 | skyos* | haiku* | rdos* | toppers* | drops* | es* \
1370 | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ 1367 | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
1371 | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi*) 1368 | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
1369 | nsk* | powerunix)
1372 # Remember, each alternative MUST END IN *, to match a version number. 1370 # Remember, each alternative MUST END IN *, to match a version number.
1373 ;; 1371 ;;
1374 qnx*) 1372 qnx*)
@@ -1452,9 +1450,6 @@ case $os in
1452 ns2) 1450 ns2)
1453 os=nextstep2 1451 os=nextstep2
1454 ;; 1452 ;;
1455 nsk*)
1456 os=nsk
1457 ;;
1458 # Preserve the version number of sinix5. 1453 # Preserve the version number of sinix5.
1459 sinix5.*) 1454 sinix5.*)
1460 os=`echo $os | sed -e 's|sinix|sysv|'` 1455 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 @@
22#define _GL_INCLUDING_UNISTD_H 22#define _GL_INCLUDING_UNISTD_H
23#include <config.h> 23#include <config.h>
24 24
25/* Specification. */
25#include <unistd.h> 26#include <unistd.h>
27
26#include <errno.h> 28#include <errno.h>
27#include <fcntl.h> 29#include <fcntl.h>
30#include <stdlib.h>
28#include <string.h> 31#include <string.h>
29#include <sys/stat.h> 32#include <sys/stat.h>
30#undef _GL_INCLUDING_UNISTD_H 33#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 @@
25#include <errno.h> 25#include <errno.h>
26#include <limits.h> 26#include <limits.h>
27#include <stdarg.h> 27#include <stdarg.h>
28#include <stdlib.h>
28#include <unistd.h> 29#include <unistd.h>
29 30
30#ifdef __KLIBC__ 31#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)
49 49
50#include <errno.h> 50#include <errno.h>
51#include <fcntl.h> 51#include <fcntl.h>
52#include <stdlib.h>
52#include <string.h> 53#include <string.h>
53 54
54#if HAVE_FSTATAT && HAVE_WORKING_FSTATAT_ZERO_FLAG 55#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@
1077gl_GNULIB_ENABLED_getgroups = @gl_GNULIB_ENABLED_getgroups@ 1077gl_GNULIB_ENABLED_getgroups = @gl_GNULIB_ENABLED_getgroups@
1078gl_GNULIB_ENABLED_malloca = @gl_GNULIB_ENABLED_malloca@ 1078gl_GNULIB_ENABLED_malloca = @gl_GNULIB_ENABLED_malloca@
1079gl_GNULIB_ENABLED_open = @gl_GNULIB_ENABLED_open@ 1079gl_GNULIB_ENABLED_open = @gl_GNULIB_ENABLED_open@
1080gl_GNULIB_ENABLED_pathmax = @gl_GNULIB_ENABLED_pathmax@
1081gl_GNULIB_ENABLED_strtoll = @gl_GNULIB_ENABLED_strtoll@ 1080gl_GNULIB_ENABLED_strtoll = @gl_GNULIB_ENABLED_strtoll@
1082gl_LIBOBJS = @gl_LIBOBJS@ 1081gl_LIBOBJS = @gl_LIBOBJS@
1083gl_LTLIBOBJS = @gl_LTLIBOBJS@ 1082gl_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 @@
18 18
19#include <config.h> 19#include <config.h>
20 20
21#include <errno.h> 21/* Specification. */
22#include <unistd.h> 22#include <unistd.h>
23
24#include <errno.h>
25#include <stdlib.h>
23#include <string.h> 26#include <string.h>
24#include <sys/stat.h> 27#include <sys/stat.h>
25 28
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>
259# define __has_builtin(x) 0 259# define __has_builtin(x) 0
260#endif 260#endif
261 261
262/* Assume that R always holds. This lets the compiler optimize 262/* Assume that R always holds. Behavior is undefined if R is false,
263 accordingly. R should not have side-effects; it may or may not be 263 fails to evaluate, or has side effects. Although assuming R can
264 evaluated. Behavior is undefined if R is false. */ 264 help a compiler generate better code or diagnostics, performance
265 can suffer if R uses hard-to-optimize features such as function
266 calls not inlined by the compiler. */
265 267
266#if (__has_builtin (__builtin_unreachable) \ 268#if (__has_builtin (__builtin_unreachable) \
267 || 4 < __GNUC__ + (5 <= __GNUC_MINOR__)) 269 || 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 @@
1# pthread_sigmask.m4 serial 17 1# pthread_sigmask.m4 serial 18
2dnl Copyright (C) 2011-2019 Free Software Foundation, Inc. 2dnl Copyright (C) 2011-2019 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -75,10 +75,6 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
75 else 75 else
76 dnl pthread_sigmask may exist but does not interoperate with the chosen 76 dnl pthread_sigmask may exist but does not interoperate with the chosen
77 dnl multithreading facility. 77 dnl multithreading facility.
78 dnl If "$gl_threads_api" = pth, we could use the function pth_sigmask,
79 dnl but it is equivalent to sigprocmask, so we choose to emulate
80 dnl pthread_sigmask with sigprocmask also in this case. This yields
81 dnl fewer link dependencies.
82 if test $ac_cv_func_pthread_sigmask = yes; then 78 if test $ac_cv_func_pthread_sigmask = yes; then
83 REPLACE_PTHREAD_SIGMASK=1 79 REPLACE_PTHREAD_SIGMASK=1
84 else 80 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 @@
1# sys_socket_h.m4 serial 23 1# sys_socket_h.m4 serial 24
2dnl Copyright (C) 2005-2019 Free Software Foundation, Inc. 2dnl Copyright (C) 2005-2019 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -104,17 +104,11 @@ AC_DEFUN([gl_PREREQ_SYS_H_SOCKET],
104 gl_CHECK_NEXT_HEADERS([sys/socket.h]) 104 gl_CHECK_NEXT_HEADERS([sys/socket.h])
105 if test $ac_cv_header_sys_socket_h = yes; then 105 if test $ac_cv_header_sys_socket_h = yes; then
106 HAVE_SYS_SOCKET_H=1 106 HAVE_SYS_SOCKET_H=1
107 HAVE_WS2TCPIP_H=0
108 else 107 else
109 HAVE_SYS_SOCKET_H=0 108 HAVE_SYS_SOCKET_H=0
110 if test $ac_cv_header_ws2tcpip_h = yes; then
111 HAVE_WS2TCPIP_H=1
112 else
113 HAVE_WS2TCPIP_H=0
114 fi
115 fi 109 fi
116 AC_SUBST([HAVE_SYS_SOCKET_H]) 110 AC_SUBST([HAVE_SYS_SOCKET_H])
117 AC_SUBST([HAVE_WS2TCPIP_H]) 111 gl_PREREQ_SYS_H_WS2TCPIP
118]) 112])
119 113
120# Common prerequisites of the <sys/socket.h> replacement and of the 114# Common prerequisites of the <sys/socket.h> replacement and of the
@@ -142,6 +136,24 @@ AC_DEFUN([gl_PREREQ_SYS_H_WINSOCK2],
142 AC_SUBST([HAVE_WINSOCK2_H]) 136 AC_SUBST([HAVE_WINSOCK2_H])
143]) 137])
144 138
139# Common prerequisites of the <sys/socket.h> replacement and of the
140# <arpa/inet.h> replacement.
141# Sets and substitutes HAVE_WS2TCPIP_H.
142AC_DEFUN([gl_PREREQ_SYS_H_WS2TCPIP],
143[
144 AC_REQUIRE([gl_CHECK_SOCKET_HEADERS])
145 if test $ac_cv_header_sys_socket_h = yes; then
146 HAVE_WS2TCPIP_H=0
147 else
148 if test $ac_cv_header_ws2tcpip_h = yes; then
149 HAVE_WS2TCPIP_H=1
150 else
151 HAVE_WS2TCPIP_H=0
152 fi
153 fi
154 AC_SUBST([HAVE_WS2TCPIP_H])
155])
156
145AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR], 157AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR],
146[ 158[
147 dnl Use AC_REQUIRE here, so that the default settings are expanded once only. 159 dnl Use AC_REQUIRE here, so that the default settings are expanded once only.