summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-01-10 07:48:37 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2017-01-10 07:49:55 -0800
commitfa0a2b4e7c81f57aecc1d94df00588a4dd5c281d (patch)
tree31408852501056452a337677c8f5b80fd3c24e7c
parent560a384038845e37228226313eccfc8d70132553 (diff)
downloademacs-fa0a2b4e7c81f57aecc1d94df00588a4dd5c281d.tar.gz
Merge from gnulib
This incorporates: 2017-01-09 maint: time stamp -> timestamp 2017-01-07 stdioext: Port to Minix 3.2 and newer 2017-01-06 glob, intprops, xalloc: work around Clang bug 2017-01-02 revert copyright-year change to synced files * doc/misc/texinfo.tex, lib/fpending.c, lib/intprops.h, lib/mktime.c: * lib/stat-time.h, lib/stdio-impl.h, lib/time.in.h, lib/timespec.h: * lib/utimens.c, lib/xalloc-oversized.h: Copy from gnulib.
-rw-r--r--doc/misc/texinfo.tex5
-rw-r--r--lib/fpending.c2
-rw-r--r--lib/intprops.h10
-rw-r--r--lib/mktime.c2
-rw-r--r--lib/stat-time.h2
-rw-r--r--lib/stdio-impl.h4
-rw-r--r--lib/time.in.h2
-rw-r--r--lib/timespec.h6
-rw-r--r--lib/utimens.c10
-rw-r--r--lib/xalloc-oversized.h12
10 files changed, 22 insertions, 33 deletions
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index 954dceb6427..c8913ab918e 100644
--- a/doc/misc/texinfo.tex
+++ b/doc/misc/texinfo.tex
@@ -5,7 +5,10 @@
%
\def\texinfoversion{2016-09-18.18}
%
-% Copyright 1985-1986, 1988, 1990-2017 Free Software Foundation, Inc.
+% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
+% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
+% Free Software Foundation, Inc.
%
% This texinfo.tex file is free software: you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
diff --git a/lib/fpending.c b/lib/fpending.c
index 8761c77ca66..c9b77866858 100644
--- a/lib/fpending.c
+++ b/lib/fpending.c
@@ -35,7 +35,7 @@ __fpending (FILE *fp)
#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
return fp->_IO_write_ptr - fp->_IO_write_base;
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
return fp->_p - fp->_bf._base;
#elif defined __EMX__ /* emx+gcc */
return fp->_ptr - fp->_buffer;
diff --git a/lib/intprops.h b/lib/intprops.h
index e0c178fea8e..85ed61f8d8c 100644
--- a/lib/intprops.h
+++ b/lib/intprops.h
@@ -23,10 +23,6 @@
#include <limits.h>
#include <verify.h>
-#ifndef __has_builtin
-# define __has_builtin(x) 0
-#endif
-
/* Return a value with the common real type of E and V and the value of V. */
#define _GL_INT_CONVERT(e, v) (0 * (e) + (v))
@@ -241,12 +237,10 @@ verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH);
: (max) >> (b) < (a))
/* True if __builtin_add_overflow (A, B, P) works when P is non-null. */
-#define _GL_HAS_BUILTIN_OVERFLOW \
- (5 <= __GNUC__ || __has_builtin (__builtin_add_overflow))
+#define _GL_HAS_BUILTIN_OVERFLOW (5 <= __GNUC__)
/* True if __builtin_add_overflow_p (A, B, C) works. */
-#define _GL_HAS_BUILTIN_OVERFLOW_P \
- (7 <= __GNUC__ || __has_builtin (__builtin_add_overflow_p))
+#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
/* The _GL*_OVERFLOW macros have the same restrictions as the
*_RANGE_OVERFLOW macros, except that they do not assume that operands
diff --git a/lib/mktime.c b/lib/mktime.c
index b67514996f4..998882f5860 100644
--- a/lib/mktime.c
+++ b/lib/mktime.c
@@ -153,7 +153,7 @@ isdst_differ (int a, int b)
/* Return an integer value measuring (YEAR1-YDAY1 HOUR1:MIN1:SEC1) -
(YEAR0-YDAY0 HOUR0:MIN0:SEC0) in seconds, assuming that the clocks
- were not adjusted between the time stamps.
+ were not adjusted between the timestamps.
The YEAR values uses the same numbering as TP->tm_year. Values
need not be in the usual range. However, YEAR1 must not overflow
diff --git a/lib/stat-time.h b/lib/stat-time.h
index b060cc7a7b5..9402b3fc1c0 100644
--- a/lib/stat-time.h
+++ b/lib/stat-time.h
@@ -181,7 +181,7 @@ get_stat_birthtime (struct stat const *st)
|| defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC)
/* FreeBSD and NetBSD sometimes signal the absence of knowledge by
using zero. Attempt to work around this problem. Alas, this can
- report failure even for valid time stamps. Also, NetBSD
+ report failure even for valid timestamps. Also, NetBSD
sometimes returns junk in the birth time fields; work around this
bug if it is detected. */
if (! (t.tv_sec && 0 <= t.tv_nsec && t.tv_nsec < 1000000000))
diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h
index d2d4daa6e10..75a945eb724 100644
--- a/lib/stdio-impl.h
+++ b/lib/stdio-impl.h
@@ -29,7 +29,7 @@
#include <errno.h> /* For detecting Plan9. */
#if defined __sferror || defined __DragonFly__ || defined __ANDROID__
- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
# if defined __DragonFly__ /* DragonFly */
/* See <http://www.dragonflybsd.org/cvsweb/src/lib/libc/stdio/priv_stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>. */
@@ -58,7 +58,7 @@
# define fp_ fp
# endif
-# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __ANDROID__ /* NetBSD >= 1.5ZA, OpenBSD, Android */
+# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __minix || defined __ANDROID__ /* NetBSD >= 1.5ZA, OpenBSD, Minix 3, Android */
/* See <http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
and <http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> */
struct __sfileext
diff --git a/lib/time.in.h b/lib/time.in.h
index 3740364b094..fef89807f8a 100644
--- a/lib/time.in.h
+++ b/lib/time.in.h
@@ -217,7 +217,7 @@ _GL_CXXALIAS_SYS (gmtime, struct tm *, (time_t const *__timer));
_GL_CXXALIASWARN (gmtime);
# endif
-/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store
+/* Parse BUF as a timestamp, assuming FORMAT specifies its layout, and store
the resulting broken-down time into TM. See
<http://www.opengroup.org/susv3xsh/strptime.html>. */
# if @GNULIB_STRPTIME@
diff --git a/lib/timespec.h b/lib/timespec.h
index fc7b3d115b7..a5eca797ce3 100644
--- a/lib/timespec.h
+++ b/lib/timespec.h
@@ -29,7 +29,7 @@ _GL_INLINE_HEADER_BEGIN
# define _GL_TIMESPEC_INLINE _GL_INLINE
#endif
-/* Resolution of timespec time stamps (in units per second), and log
+/* Resolution of timespec timestamps (in units per second), and log
base 10 of the resolution. */
enum { TIMESPEC_RESOLUTION = 1000000000 };
@@ -48,7 +48,7 @@ make_timespec (time_t s, long int ns)
/* Return negative, zero, positive if A < B, A == B, A > B, respectively.
- For each time stamp T, this code assumes that either:
+ For each timestamp T, this code assumes that either:
* T.tv_nsec is in the range 0..999999999; or
* T.tv_sec corresponds to a valid leap second on a host that supports
@@ -56,7 +56,7 @@ make_timespec (time_t s, long int ns)
* T.tv_sec is the minimum time_t value and T.tv_nsec is -1; or
T.tv_sec is the maximum time_t value and T.tv_nsec is 2000000000.
This allows for special struct timespec values that are less or
- greater than all possible valid time stamps.
+ greater than all possible valid timestamps.
In all these cases, it is safe to subtract two tv_nsec values and
convert the result to integer without worrying about overflow on
diff --git a/lib/utimens.c b/lib/utimens.c
index e2bb702e7dc..3643668c3a5 100644
--- a/lib/utimens.c
+++ b/lib/utimens.c
@@ -154,14 +154,14 @@ update_timespec (struct stat const *statbuf, struct timespec *ts[2])
return false;
}
-/* Set the access and modification time stamps of FD (a.k.a. FILE) to be
+/* Set the access and modification timestamps of FD (a.k.a. FILE) to be
TIMESPEC[0] and TIMESPEC[1], respectively.
FD must be either negative -- in which case it is ignored --
or a file descriptor that is open on FILE.
If FD is nonnegative, then FILE can be NULL, which means
use just futimes (or equivalent) instead of utimes (or equivalent),
and fail if on an old system without futimes (or equivalent).
- If TIMESPEC is null, set the time stamps to the current time.
+ If TIMESPEC is null, set the timestamps to the current time.
Return 0 on success, -1 (setting errno) on failure. */
int
@@ -190,7 +190,7 @@ fdutimens (int fd, char const *file, struct timespec const timespec[2])
return -1;
}
- /* Some Linux-based NFS clients are buggy, and mishandle time stamps
+ /* Some Linux-based NFS clients are buggy, and mishandle timestamps
of files in NFS file systems in some cases. We have no
configure-time test for this, but please see
<http://bugs.gentoo.org/show_bug.cgi?id=132673> for references to
@@ -411,7 +411,7 @@ fdutimens (int fd, char const *file, struct timespec const timespec[2])
}
}
-/* Set the access and modification time stamps of FILE to be
+/* Set the access and modification timestamps of FILE to be
TIMESPEC[0] and TIMESPEC[1], respectively. */
int
utimens (char const *file, struct timespec const timespec[2])
@@ -419,7 +419,7 @@ utimens (char const *file, struct timespec const timespec[2])
return fdutimens (-1, file, timespec);
}
-/* Set the access and modification time stamps of FILE to be
+/* Set the access and modification timestamps of FILE to be
TIMESPEC[0] and TIMESPEC[1], respectively, without dereferencing
symlinks. Fail with ENOSYS if the platform does not support
changing symlink timestamps, but FILE was a symlink. */
diff --git a/lib/xalloc-oversized.h b/lib/xalloc-oversized.h
index 6b4e68b7c0e..ff0efc6ba40 100644
--- a/lib/xalloc-oversized.h
+++ b/lib/xalloc-oversized.h
@@ -21,11 +21,6 @@
#include <stddef.h>
#include <stdint.h>
-/* Default for (non-Clang) compilers that lack __has_builtin. */
-#ifndef __has_builtin
-# define __has_builtin(x) 0
-#endif
-
/* True if N * S would overflow in a size_t calculation,
or would generate a value larger than PTRDIFF_MAX.
This expands to a constant expression if N and S are both constants.
@@ -46,13 +41,10 @@ typedef size_t __xalloc_count_type;
positive and N must be nonnegative. This is a macro, not a
function, so that it works correctly even when SIZE_MAX < N. */
-#if 7 <= __GNUC__ || __has_builtin (__builtin_add_overflow_p)
+#if 7 <= __GNUC__
# define xalloc_oversized(n, s) \
__builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1)
-#elif ((5 <= __GNUC__ \
- || (__has_builtin (__builtin_mul_overflow) \
- && __has_builtin (__builtin_constant_p))) \
- && !__STRICT_ANSI__)
+#elif 5 <= __GNUC__ && !__STRICT_ANSI__
# define xalloc_oversized(n, s) \
(__builtin_constant_p (n) && __builtin_constant_p (s) \
? __xalloc_oversized (n, s) \