[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7321] gnulib update
From: |
gavinsmith0123 |
Subject: |
[7321] gnulib update |
Date: |
Tue, 30 Aug 2016 18:03:59 +0000 (UTC) |
Revision: 7321
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7321
Author: gavin
Date: 2016-08-30 18:03:58 +0000 (Tue, 30 Aug 2016)
Log Message:
-----------
gnulib update
Modified Paths:
--------------
trunk/ChangeLog
trunk/gnulib/lib/alloca.in.h
trunk/gnulib/lib/intprops.h
trunk/gnulib/lib/regex.h
trunk/gnulib/lib/string.in.h
trunk/gnulib/lib/xalloc-oversized.h
trunk/gnulib/m4/stdbool.m4
trunk/gnulib/m4/strstr.m4
trunk/gnulib/m4/wchar_h.m4
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2016-08-30 18:02:06 UTC (rev 7320)
+++ trunk/ChangeLog 2016-08-30 18:03:58 UTC (rev 7321)
@@ -1,3 +1,8 @@
+2016-08-30 Gavin Smith <address@hidden>
+
+ * tp/Texinfo/Convert/XSParagraph: Run gnulib-tool --add-import.
+ * (top-level): Run gnulib-tool --add-import.
+
2016-08-28 Emanuele Giaquinta <address@hidden> (tiny change)
* util/texi2dvi (cleanup): Fix cleanup for "clean" build mode.
Modified: trunk/gnulib/lib/alloca.in.h
===================================================================
--- trunk/gnulib/lib/alloca.in.h 2016-08-30 18:02:06 UTC (rev 7320)
+++ trunk/gnulib/lib/alloca.in.h 2016-08-30 18:03:58 UTC (rev 7321)
@@ -51,6 +51,8 @@
void *_alloca (unsigned short);
# pragma intrinsic (_alloca)
# define alloca _alloca
+# elif defined __MVS__
+# include <stdlib.h>
# else
# include <stddef.h>
# ifdef __cplusplus
Modified: trunk/gnulib/lib/intprops.h
===================================================================
--- trunk/gnulib/lib/intprops.h 2016-08-30 18:02:06 UTC (rev 7320)
+++ trunk/gnulib/lib/intprops.h 2016-08-30 18:03:58 UTC (rev 7321)
@@ -23,6 +23,10 @@
#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))
@@ -67,6 +71,12 @@
#define _GL_SIGNED_INT_MAXIMUM(e) \
(((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1)
+/* Work around OpenVMS incompatibility with C99. */
+#if !defined LLONG_MAX && defined __INT64_MAX
+# define LLONG_MAX __INT64_MAX
+# define LLONG_MIN __INT64_MIN
+#endif
+
/* This include file assumes that signed types are two's complement without
padding bits; the above macros have undefined behavior otherwise.
If this is a problem for you, please let us know how to fix it for your
host.
@@ -222,20 +232,25 @@
? (a) < (min) >> (b) \
: (max) >> (b) < (a))
-/* True if __builtin_add_overflow (A, B, P) works when P is null. */
-#define _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL (7 <= __GNUC__)
+/* 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))
+/* True if __builtin_add_overflow_p (A, B, C) works. */
+#define _GL_HAS_BUILTIN_OVERFLOW_P \
+ (7 <= __GNUC__ || __has_builtin (__builtin_add_overflow_p))
+
/* The _GL*_OVERFLOW macros have the same restrictions as the
*_RANGE_OVERFLOW macros, except that they do not assume that operands
(e.g., A and B) have the same type as MIN and MAX. Instead, they assume
that the result (e.g., A + B) has that type. */
-#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL
-# define _GL_ADD_OVERFLOW(a, b, min, max)
- __builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0)
-# define _GL_SUBTRACT_OVERFLOW(a, b, min, max)
- __builtin_sub_overflow (a, b, (__typeof__ ((a) - (b)) *) 0)
-# define _GL_MULTIPLY_OVERFLOW(a, b, min, max)
- __builtin_mul_overflow (a, b, (__typeof__ ((a) * (b)) *) 0)
+#if _GL_HAS_BUILTIN_OVERFLOW_P
+# define _GL_ADD_OVERFLOW(a, b, min, max) \
+ __builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0)
+# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \
+ __builtin_sub_overflow_p (a, b, (__typeof__ ((a) - (b))) 0)
+# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \
+ __builtin_mul_overflow_p (a, b, (__typeof__ ((a) * (b))) 0)
#else
# define _GL_ADD_OVERFLOW(a, b, min, max) \
((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \
@@ -315,7 +330,7 @@
_GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW)
#define INT_SUBTRACT_OVERFLOW(a, b) \
_GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW)
-#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL
+#if _GL_HAS_BUILTIN_OVERFLOW || _GL_HAS_BUILTIN_OVERFLOW_P
# define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a)
#else
# define INT_NEGATE_OVERFLOW(a) \
@@ -349,10 +364,6 @@
#define INT_MULTIPLY_WRAPV(a, b, r) \
_GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW)
-#ifndef __has_builtin
-# define __has_builtin(x) 0
-#endif
-
/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
https://llvm.org/bugs/show_bug.cgi?id=25390
@@ -369,7 +380,7 @@
the operation. BUILTIN is the builtin operation, and OVERFLOW the
overflow predicate. Return 1 if the result overflows. See above
for restrictions. */
-#if 5 <= __GNUC__ || __has_builtin (__builtin_add_overflow)
+#if _GL_HAS_BUILTIN_OVERFLOW
# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r)
#elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS
# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \
@@ -412,7 +423,7 @@
# else
# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
_GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
- long int, LONG_MIN, LONG_MAX))
+ long int, LONG_MIN, LONG_MAX)
# endif
#endif
Modified: trunk/gnulib/lib/regex.h
===================================================================
--- trunk/gnulib/lib/regex.h 2016-08-30 18:02:06 UTC (rev 7320)
+++ trunk/gnulib/lib/regex.h 2016-08-30 18:03:58 UTC (rev 7321)
@@ -552,7 +552,7 @@
match, or -2 for an internal error. Also return register
information in REGS (if REGS and BUFFER->no_sub are nonzero). */
extern regoff_t re_search (struct re_pattern_buffer *__buffer,
- const char *__string, regoff_t __length,
+ const char *__String, regoff_t __length,
regoff_t __start, regoff_t __range,
struct re_registers *__regs);
@@ -570,7 +570,7 @@
/* Like 're_search', but return how many characters in STRING the regexp
in BUFFER matched, starting at position START. */
extern regoff_t re_match (struct re_pattern_buffer *__buffer,
- const char *__string, regoff_t __length,
+ const char *__String, regoff_t __length,
regoff_t __start, struct re_registers *__regs);
@@ -642,7 +642,7 @@
int __cflags);
extern int regexec (const regex_t *_Restrict_ __preg,
- const char *_Restrict_ __string, size_t __nmatch,
+ const char *_Restrict_ __String, size_t __nmatch,
regmatch_t __pmatch[_Restrict_arr_],
int __eflags);
Modified: trunk/gnulib/lib/string.in.h
===================================================================
--- trunk/gnulib/lib/string.in.h 2016-08-30 18:02:06 UTC (rev 7320)
+++ trunk/gnulib/lib/string.in.h 2016-08-30 18:03:58 UTC (rev 7321)
@@ -416,15 +416,15 @@
# undef strndup
# define strndup rpl_strndup
# endif
-_GL_FUNCDECL_RPL (strndup, char *, (char const *__string, size_t __n)
+_GL_FUNCDECL_RPL (strndup, char *, (char const *__s, size_t __n)
_GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (strndup, char *, (char const *__string, size_t __n));
+_GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n));
# else
# if ! @HAVE_DECL_STRNDUP@
-_GL_FUNCDECL_SYS (strndup, char *, (char const *__string, size_t __n)
+_GL_FUNCDECL_SYS (strndup, char *, (char const *__s, size_t __n)
_GL_ARG_NONNULL ((1)));
# endif
-_GL_CXXALIAS_SYS (strndup, char *, (char const *__string, size_t __n));
+_GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n));
# endif
_GL_CXXALIASWARN (strndup);
#elif defined GNULIB_POSIXCHECK
@@ -444,17 +444,17 @@
# undef strnlen
# define strnlen rpl_strnlen
# endif
-_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__string, size_t __maxlen)
+_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__s, size_t __maxlen)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__string, size_t __maxlen));
+_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__s, size_t __maxlen));
# else
# if ! @HAVE_DECL_STRNLEN@
-_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)
+_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__s, size_t __maxlen)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
# endif
-_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen));
+_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__s, size_t __maxlen));
# endif
_GL_CXXALIASWARN (strnlen);
#elif defined GNULIB_POSIXCHECK
Modified: trunk/gnulib/lib/xalloc-oversized.h
===================================================================
--- trunk/gnulib/lib/xalloc-oversized.h 2016-08-30 18:02:06 UTC (rev 7320)
+++ trunk/gnulib/lib/xalloc-oversized.h 2016-08-30 18:03:58 UTC (rev 7321)
@@ -43,16 +43,8 @@
nonnegative. This is a macro, not a function, so that it
works correctly even when SIZE_MAX < N. */
-/* GCC 7 __builtin_mul_overflow should easily compute this. See:
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68120 */
-#if 7 <= __GNUC__
-# define xalloc_oversized(n, s) __builtin_mul_overflow (n, s, (size_t *) NULL)
-
-/* GCC 5 and Clang __builtin_mul_overflow needs a temporary, and
- should be used only for non-constant operands, so that
- xalloc_oversized is a constant expression if both arguments are.
- Do not use this if pedantic, since pedantic GCC issues a diagnostic
- for ({ ... }). */
+#if 7 <= __GNUC__ || __has_builtin (__builtin_add_overflow_p)
+# define xalloc_oversized(n, s) __builtin_mul_overflow_p (n, s, (size_t) 1)
#elif ((5 <= __GNUC__ \
|| (__has_builtin (__builtin_mul_overflow) \
&& __has_builtin (__builtin_constant_p))) \
Modified: trunk/gnulib/m4/stdbool.m4
===================================================================
--- trunk/gnulib/m4/stdbool.m4 2016-08-30 18:02:06 UTC (rev 7320)
+++ trunk/gnulib/m4/stdbool.m4 2016-08-30 18:03:58 UTC (rev 7321)
@@ -5,7 +5,7 @@
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-#serial 6
+#serial 7
# Prepare for substituting <stdbool.h> if it is not supported.
@@ -44,7 +44,10 @@
[[
#include <stdbool.h>
- #if __cplusplus < 201103
+ #ifdef __cplusplus
+ typedef bool Bool;
+ #else
+ typedef _Bool Bool;
#ifndef bool
"error: bool is not defined"
#endif
@@ -66,37 +69,38 @@
"error: __bool_true_false_are_defined is not defined"
#endif
- struct s { _Bool s: 1; _Bool t; } s;
+ struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
char a[true == 1 ? 1 : -1];
char b[false == 0 ? 1 : -1];
char c[__bool_true_false_are_defined == 1 ? 1 : -1];
char d[(bool) 0.5 == true ? 1 : -1];
/* See body of main program for 'e'. */
- char f[(_Bool) 0.0 == false ? 1 : -1];
+ char f[(Bool) 0.0 == false ? 1 : -1];
char g[true];
- char h[sizeof (_Bool)];
+ char h[sizeof (Bool)];
char i[sizeof s.t];
enum { j = false, k = true, l = false * true, m = true * 256 };
/* The following fails for
HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
- _Bool n[m];
+ Bool n[m];
char o[sizeof n == m * sizeof n[0] ? 1 : -1];
- char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+ char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
/* Catch a bug in an HP-UX C compiler. See
http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
*/
- _Bool q = true;
- _Bool *pq = &q;
+ Bool q = true;
+ Bool *pq = &q;
+ bool *qq = &q;
]],
[[
bool e = &s;
- *pq |= q;
- *pq |= ! q;
+ *pq |= q; *pq |= ! q;
+ *qq |= q; *qq |= ! q;
/* Refer to every declared value, to avoid compiler
optimizations. */
return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k +
!!l
- + !m + !n + !o + !p + !q + !pq);
+ + !m + !n + !o + !p + !q + !pq + !qq);
]])],
[ac_cv_header_stdbool_h=yes],
[ac_cv_header_stdbool_h=no])])
Modified: trunk/gnulib/m4/strstr.m4
===================================================================
--- trunk/gnulib/m4/strstr.m4 2016-08-30 18:02:06 UTC (rev 7320)
+++ trunk/gnulib/m4/strstr.m4 2016-08-30 18:03:58 UTC (rev 7321)
@@ -1,4 +1,4 @@
-# strstr.m4 serial 16
+# strstr.m4 serial 17
dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -67,6 +67,12 @@
AC_CACHE_CHECK([whether strstr works in linear time],
[gl_cv_func_strstr_linear],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#ifdef __MVS__
+/* z/OS does not deliver signals while strstr() is running (thanks to
+ restrictions on its LE runtime), which prevents us from limiting the
+ running time of this test. */
+# error "This test does not work properly on z/OS"
+#endif
#include <signal.h> /* for signal */
#include <string.h> /* for strstr */
#include <stdlib.h> /* for malloc */
Modified: trunk/gnulib/m4/wchar_h.m4
===================================================================
--- trunk/gnulib/m4/wchar_h.m4 2016-08-30 18:02:06 UTC (rev 7320)
+++ trunk/gnulib/m4/wchar_h.m4 2016-08-30 18:03:58 UTC (rev 7321)
@@ -7,7 +7,7 @@
dnl Written by Eric Blake.
-# wchar_h.m4 serial 39
+# wchar_h.m4 serial 40
AC_DEFUN([gl_WCHAR_H],
[
@@ -81,8 +81,14 @@
extern int zero (void);
int main () { return zero(); }
]])])
+ dnl Do not rename the object file from conftest.$ac_objext to
+ dnl conftest1.$ac_objext, as this will cause the link to fail on
+ dnl z/OS when using the XPLINK object format (due to duplicate
+ dnl CSECT names). Instead, temporarily redefine $ac_compile so
+ dnl that the object file has the latter name from the start.
+ save_ac_compile="$ac_compile"
+ ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
if AC_TRY_EVAL([ac_compile]); then
- mv conftest.$ac_objext conftest1.$ac_objext
AC_LANG_CONFTEST([
AC_LANG_SOURCE([[#define wcstod renamed_wcstod
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
@@ -95,8 +101,9 @@
#include <wchar.h>
int zero (void) { return 0; }
]])])
+ dnl See note above about renaming object files.
+ ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
if AC_TRY_EVAL([ac_compile]); then
- mv conftest.$ac_objext conftest2.$ac_objext
if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext
conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then
:
else
@@ -104,6 +111,7 @@
fi
fi
fi
+ ac_compile="$save_ac_compile"
rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
])
if test $gl_cv_header_wchar_h_correct_inline = no; then
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7321] gnulib update,
gavinsmith0123 <=