summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-06-25 09:18:17 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-06-25 09:22:52 -0700
commit848ff94b451f00e13452891f1a9774de542ce8bb (patch)
tree75321339d97b6a7fc764e272ce9d9ada66a54bda /lib
parent55ccd1b4854153497a538c85b0063d6ff02ded5c (diff)
downloademacs-848ff94b451f00e13452891f1a9774de542ce8bb.tar.gz
Update from Gnulib
This incorporates: 2019-06-24 unistd: stddef.h and sys/types.h namespace cleanup * lib/gnulib.mk.in: Regenerate. * lib/unistd.in.h: Copy from gnulib.
Diffstat (limited to 'lib')
-rw-r--r--lib/gnulib.mk.in2
-rw-r--r--lib/unistd.in.h17
2 files changed, 9 insertions, 10 deletions
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in
index d0bef0bd5de..b9a32d9dbc1 100644
--- a/lib/gnulib.mk.in
+++ b/lib/gnulib.mk.in
@@ -1073,7 +1073,9 @@ gl_GNULIB_ENABLED_dirfd = @gl_GNULIB_ENABLED_dirfd@
gl_GNULIB_ENABLED_euidaccess = @gl_GNULIB_ENABLED_euidaccess@
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/unistd.in.h b/lib/unistd.in.h
index 94a8f383c99..59ee39ecea5 100644
--- a/lib/unistd.in.h
+++ b/lib/unistd.in.h
@@ -52,7 +52,10 @@
#define _@GUARD_PREFIX@_UNISTD_H
/* NetBSD 5.0 mis-defines NULL. Also get size_t. */
-#include <stddef.h>
+/* But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+# include <stddef.h>
+#endif
/* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>. */
/* MSVC declares 'unlink' in <stdio.h>, not in <unistd.h>. We must include
@@ -124,15 +127,9 @@
/* MSVC defines off_t in <sys/types.h>.
May also define off_t to a 64-bit type on native Windows. */
-#if !@HAVE_UNISTD_H@ || @WINDOWS_64_BIT_OFF_T@
-/* Get off_t. */
-# include <sys/types.h>
-#endif
-
-#if (@GNULIB_READ@ || @GNULIB_WRITE@ \
- || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \
- || @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK)
-/* Get ssize_t. */
+/* But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+/* Get off_t, ssize_t. */
# include <sys/types.h>
#endif