summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-12-16 08:11:35 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2018-12-16 08:12:22 -0800
commitf74595aace4b1240402562b0073b06c170969327 (patch)
treecd50bca64305e2fca5d4fa518e102e530a8b54ef /lib
parent07d8827946f9364180f18d6842acc80f0997ed75 (diff)
downloademacs-f74595aace4b1240402562b0073b06c170969327.tar.gz
Update from Gnulib
This incorporates: 2018-12-16 regex: propagate fix for glibc bug 18040 2018-12-16 obstack, libc-config: Support HP-UX cc in C99 mode 2018-12-15 regex: work around a bug in glibc-2.27 and prior 2018-12-13 localtime-buffer: Avoid endless recursion * build-aux/config.guess, build-aux/config.sub, lib/cdefs.h: * lib/gettext.h, lib/localtime-buffer.c, lib/regexec.c, m4/regex.m4: Copy from Gnulib.
Diffstat (limited to 'lib')
-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
4 files changed, 7 insertions, 2 deletions
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;