summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild-aux/config.guess5
-rwxr-xr-xbuild-aux/config.sub6
-rw-r--r--lib/cdefs.h2
-rw-r--r--lib/gettext.h2
-rw-r--r--lib/localtime-buffer.c2
-rw-r--r--lib/regexec.c3
-rw-r--r--m4/regex.m413
7 files changed, 24 insertions, 9 deletions
diff --git a/build-aux/config.guess b/build-aux/config.guess
index 47d7bed50c5..94c4ac154a3 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -2,7 +2,7 @@
# Attempt to guess a canonical system name.
# Copyright 1992-2018 Free Software Foundation, Inc.
-timestamp='2018-11-28'
+timestamp='2018-12-07'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -96,8 +96,7 @@ fi
tmp=
# shellcheck disable=SC2172
-trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15
-trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0
+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
set_cc_for_build() {
: "${TMPDIR=/tmp}"
diff --git a/build-aux/config.sub b/build-aux/config.sub
index 46708056af3..a5081b8e0d1 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2018 Free Software Foundation, Inc.
-timestamp='2018-11-28'
+timestamp='2018-12-16'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -111,7 +111,7 @@ case $# in
esac
# Split fields of configuration type
-IFS="-" read -r field1 field2 field3 field4 <<EOF
+IFS="-" read field1 field2 field3 field4 <<EOF
$1
EOF
@@ -918,7 +918,7 @@ case $basic_machine in
;;
*-*)
- IFS="-" read -r cpu vendor <<EOF
+ IFS="-" read cpu vendor <<EOF
$basic_machine
EOF
;;
diff --git a/lib/cdefs.h b/lib/cdefs.h
index 2d620cccaff..70fb638881c 100644
--- a/lib/cdefs.h
+++ b/lib/cdefs.h
@@ -139,7 +139,7 @@
Headers that should use flexible arrays only if they're "real"
(e.g. only if they won't affect sizeof()) should test
#if __glibc_c99_flexarr_available. */
-#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
+#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L && !defined __HP_cc
# define __flexarr []
# define __glibc_c99_flexarr_available 1
#elif __GNUC_PREREQ (2,97)
diff --git a/lib/gettext.h b/lib/gettext.h
index f2d7458f4a8..8eef008e7ce 100644
--- a/lib/gettext.h
+++ b/lib/gettext.h
@@ -185,7 +185,7 @@ npgettext_aux (const char *domain,
#include <string.h>
#if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
- /* || __STDC_VERSION__ == 199901L
+ /* || (__STDC_VERSION__ == 199901L && !defined __HP_cc)
|| (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ )
# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1
#else
diff --git a/lib/localtime-buffer.c b/lib/localtime-buffer.c
index df11f4321db..910c8bcfed3 100644
--- a/lib/localtime-buffer.c
+++ b/lib/localtime-buffer.c
@@ -34,6 +34,7 @@ struct tm *localtime_buffer_addr = &tm_zero_buffer;
struct tm *
rpl_localtime (time_t const *timep)
+#undef localtime
{
struct tm *tm = localtime (timep);
@@ -46,6 +47,7 @@ rpl_localtime (time_t const *timep)
/* Same as above, since gmtime and localtime use the same buffer. */
struct tm *
rpl_gmtime (time_t const *timep)
+#undef gmtime
{
struct tm *tm = gmtime (timep);
diff --git a/lib/regexec.c b/lib/regexec.c
index 8b82ea50d44..c7d099c38e4 100644
--- a/lib/regexec.c
+++ b/lib/regexec.c
@@ -2783,8 +2783,11 @@ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx)
return REG_ESPACE;
err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node,
bkref_str_idx);
+ buf = (const char *) re_string_get_buffer (&mctx->input);
if (err == REG_NOMATCH)
continue;
+ if (__glibc_unlikely (err != REG_NOERROR))
+ return err;
}
}
return REG_NOERROR;
diff --git a/m4/regex.m4 b/m4/regex.m4
index 055d71b5aaa..3a39b1a2044 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -1,4 +1,4 @@
-# serial 67
+# serial 68
# Copyright (C) 1996-2001, 2003-2018 Free Software Foundation, Inc.
#
@@ -213,6 +213,17 @@ AC_DEFUN([gl_REGEX],
if (! REG_STARTEND)
result |= 64;
+ /* Matching with the compiled form of this regexp would provoke
+ an assertion failure prior to glibc-2.28:
+ regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed
+ With glibc-2.28, compilation fails and reports the invalid
+ back reference. */
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("0|()0|\\1|0", 10, &regex);
+ if (!s || strcmp (s, "Invalid back reference"))
+ result |= 64;
+
#if 0
/* It would be nice to reject hosts whose regoff_t values are too
narrow (including glibc on hosts with 64-bit ptrdiff_t and