aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert2018-08-11 19:07:43 -0700
committerPaul Eggert2018-08-11 19:08:29 -0700
commitd64c1be99036d083d1d0db97ed1f41b1dd1005bc (patch)
treea509acaac4b35e88057a71688838088177d65a96 /lib
parent1145bd0ef97630473746fb96da00951ae81c358c (diff)
downloademacs-d64c1be99036d083d1d0db97ed1f41b1dd1005bc.tar.gz
emacs-d64c1be99036d083d1d0db97ed1f41b1dd1005bc.zip
Update from Gnulib
This incorporates: 2018-08-11 verify: port 'assume' to traditional tools * build-aux/config.sub, lib/regcomp.c, lib/verify.h: Copy from Gnulib. * lib/gnulib.mk.in: Regenerate.
Diffstat (limited to 'lib')
-rw-r--r--lib/gnulib.mk.in4
-rw-r--r--lib/regcomp.c27
-rw-r--r--lib/verify.h3
3 files changed, 14 insertions, 20 deletions
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in
index 7ad390875b0..666105b74bb 100644
--- a/lib/gnulib.mk.in
+++ b/lib/gnulib.mk.in
@@ -238,6 +238,8 @@ GL_GENERATE_STDALIGN_H = @GL_GENERATE_STDALIGN_H@
238GL_GENERATE_STDDEF_H = @GL_GENERATE_STDDEF_H@ 238GL_GENERATE_STDDEF_H = @GL_GENERATE_STDDEF_H@
239GL_GENERATE_STDINT_H = @GL_GENERATE_STDINT_H@ 239GL_GENERATE_STDINT_H = @GL_GENERATE_STDINT_H@
240GMALLOC_OBJ = @GMALLOC_OBJ@ 240GMALLOC_OBJ = @GMALLOC_OBJ@
241GMP_LIB = @GMP_LIB@
242GMP_OBJ = @GMP_OBJ@
241GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ 243GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
242GNULIB_ATOLL = @GNULIB_ATOLL@ 244GNULIB_ATOLL = @GNULIB_ATOLL@
243GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ 245GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
@@ -1720,7 +1722,7 @@ BUILT_SOURCES += $(GETOPT_H) $(GETOPT_CDEFS_H)
1720 1722
1721# We need the following in order to create <getopt.h> when the system 1723# We need the following in order to create <getopt.h> when the system
1722# doesn't have one that works with the given compiler. 1724# doesn't have one that works with the given compiler.
1723getopt.h: getopt.in.h $(top_builddir)/config.status 1725getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
1724 $(AM_V_GEN)rm -f $@-t $@ && \ 1726 $(AM_V_GEN)rm -f $@-t $@ && \
1725 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 1727 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
1726 sed -e 's|@''GUARD_PREFIX''@|GL|g' \ 1728 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
diff --git a/lib/regcomp.c b/lib/regcomp.c
index 53eb2263740..0e4816c89c2 100644
--- a/lib/regcomp.c
+++ b/lib/regcomp.c
@@ -2684,15 +2684,14 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
2684 2684
2685# ifdef RE_ENABLE_I18N 2685# ifdef RE_ENABLE_I18N
2686/* Convert the byte B to the corresponding wide character. In a 2686/* Convert the byte B to the corresponding wide character. In a
2687 unibyte locale, treat B as itself if it is an encoding error. 2687 unibyte locale, treat B as itself. In a multibyte locale, return
2688 In a multibyte locale, return WEOF if B is an encoding error. */ 2688 WEOF if B is an encoding error. */
2689static wint_t 2689static wint_t
2690parse_byte (unsigned char b, re_charset_t *mbcset) 2690parse_byte (unsigned char b, re_charset_t *mbcset)
2691{ 2691{
2692 wint_t wc = __btowc (b); 2692 return mbcset == NULL ? b : __btowc (b);
2693 return wc == WEOF && !mbcset ? b : wc;
2694} 2693}
2695#endif 2694# endif
2696 2695
2697 /* Local function for parse_bracket_exp only used in case of NOT _LIBC. 2696 /* Local function for parse_bracket_exp only used in case of NOT _LIBC.
2698 Build the range expression which starts from START_ELEM, and ends 2697 Build the range expression which starts from START_ELEM, and ends
@@ -3531,18 +3530,10 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
3531 continue; 3530 continue;
3532 /* Compare only if the length matches and the collation rule 3531 /* Compare only if the length matches and the collation rule
3533 index is the same. */ 3532 index is the same. */
3534 if (len == weights[idx2 & 0xffffff] && (idx1 >> 24) == (idx2 >> 24)) 3533 if (len == weights[idx2 & 0xffffff] && (idx1 >> 24) == (idx2 >> 24)
3535 { 3534 && memcmp (weights + (idx1 & 0xffffff) + 1,
3536 int cnt = 0; 3535 weights + (idx2 & 0xffffff) + 1, len) == 0)
3537 3536 bitset_set (sbcset, ch);
3538 while (cnt <= len &&
3539 weights[(idx1 & 0xffffff) + 1 + cnt]
3540 == weights[(idx2 & 0xffffff) + 1 + cnt])
3541 ++cnt;
3542
3543 if (cnt > len)
3544 bitset_set (sbcset, ch);
3545 }
3546 } 3537 }
3547 /* Check whether the array has enough space. */ 3538 /* Check whether the array has enough space. */
3548 if (BE (*equiv_class_alloc == mbcset->nequiv_classes, 0)) 3539 if (BE (*equiv_class_alloc == mbcset->nequiv_classes, 0))
@@ -3802,9 +3793,9 @@ free_charset (re_charset_t *cset)
3802# ifdef _LIBC 3793# ifdef _LIBC
3803 re_free (cset->coll_syms); 3794 re_free (cset->coll_syms);
3804 re_free (cset->equiv_classes); 3795 re_free (cset->equiv_classes);
3796# endif
3805 re_free (cset->range_starts); 3797 re_free (cset->range_starts);
3806 re_free (cset->range_ends); 3798 re_free (cset->range_ends);
3807# endif
3808 re_free (cset->char_classes); 3799 re_free (cset->char_classes);
3809 re_free (cset); 3800 re_free (cset);
3810} 3801}
diff --git a/lib/verify.h b/lib/verify.h
index bc7f99dbd73..3b57ddee0ac 100644
--- a/lib/verify.h
+++ b/lib/verify.h
@@ -276,7 +276,8 @@ template <int w>
276 when 'assume' silences warnings even with older GCCs. */ 276 when 'assume' silences warnings even with older GCCs. */
277# define assume(R) ((R) ? (void) 0 : __builtin_trap ()) 277# define assume(R) ((R) ? (void) 0 : __builtin_trap ())
278#else 278#else
279# define assume(R) ((void) (0 && (R))) 279 /* Some tools grok NOTREACHED, e.g., Oracle Studio 12.6. */
280# define assume(R) ((R) ? (void) 0 : /*NOTREACHED*/ (void) 0)
280#endif 281#endif
281 282
282/* @assert.h omit end@ */ 283/* @assert.h omit end@ */