]> git.eshelyaron.com Git - emacs.git/commitdiff
Merge from gnulib
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 10 Jan 2017 15:48:37 +0000 (07:48 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 10 Jan 2017 15:49:55 +0000 (07:49 -0800)
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.

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

index 954dceb6427bb9b46a5eed4cc5e05552d362ec56..c8913ab918ebe1a07ed834eff34d9eb429a0c3a5 100644 (file)
@@ -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
index 8761c77ca66281c339c2e53acd229c2ac4de8ce7..c9b77866858b7abc3f59b5db17984807a1bc4c2b 100644 (file)
@@ -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;
index e0c178fea8e8b7db2e56eaed7e4beee8aadfd14e..85ed61f8d8c95394727d5c05ba4de888cd491606 100644 (file)
 #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
index b67514996f49e29e623b50fb8c5870c1667cd3a9..998882f58608f4358e492a2f73441f6fe0c3bfb6 100644 (file)
@@ -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
index b060cc7a7b5fc62f6c4e0bf8deeefbbe558fb81b..9402b3fc1c05325bf2eab999daf4ba5f54ae5cb3 100644 (file)
@@ -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))
index d2d4daa6e1005adb41e2ced129d4cfa7d72ec86b..75a945eb7247c41f671ad003c4deb74c66d302d4 100644 (file)
@@ -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
index 3740364b094fe93b7c8dd5d3453535bb2d55a7ec..fef89807f8a01e8c484a01571ed6021bad37a42c 100644 (file)
@@ -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@
index fc7b3d115b77f18c5da9de750c5575d4eccdbde1..a5eca797ce3b5eda275594605022c7485fee4c48 100644 (file)
@@ -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
index e2bb702e7dc4244955480c47fab9798602036bff..3643668c3a549327a9cfe41ccbe6836939fdeb66 100644 (file)
@@ -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.  */
index 6b4e68b7c0e70ab2f32c26f9e0f65b4574bc8c84..ff0efc6ba40553ff6a94698cc505063061ccde04 100644 (file)
 #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) \