summaryrefslogtreecommitdiff
path: root/lib
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 /lib
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.
Diffstat (limited to 'lib')
-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
6 files changed, 14 insertions, 5 deletions
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__))