]> Savannah Git Hosting - gnulib.git/commit
regex: port to recently proposed glibc regex merge
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 28 Jun 2018 19:23:31 +0000 (12:23 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 28 Jun 2018 19:24:21 +0000 (12:24 -0700)
commitf59be4169e656da3be4510ebe68db83d8200074c
tree9e9ed5e3e09ed06b2d4e2d26d79375097fafff8b
parent16aa5a2efe82e01a147b4022258fa9a272f67625
regex: port to recently proposed glibc regex merge

This patch is inspired by Adhemerval Zanella's recent proposal
https://www.sourceware.org/ml/libc-alpha/2018-06/msg00905.html
to merge glibc and Gnulib regex.  It aims to simplify the merge on
the glibc side, without keeping Gnulib portable.
* lib/regex.h: Fix a problem with glibc installed-header checking,
as follows:
(_Restrict_): Prefer __restrict if defined or if GCC 2.95 or later.
(_Restrict_arr_): Prefer __restrict_arr if defined,
otherwise prefer _Restrict_ if C99 or GCC 3.1 or later (but not C++).
* lib/regex_internal.c (re_string_realloc_buffers, build_wcs_buffer)
(build_wcs_upper_buffer, build_upper_buffer)
(re_string_translate_buffer, re_string_context_at):
Move decls here from lib/regex_internal.h, for glibc internal tests.
(build_wcs_upper_buffer): Use __wcrtomb, not wcrtomb, fixing
glibc BZ #18496.
* lib/regex_internal.h (lock_fini) [_LIBC]: Cast to 0 to pacify
-Wunused-value.
(bitset_set, bitset_clear, bitset_contain, bitset_empty)
(bitset_set_all, bitset_copy, bitset_not, bitset_merge)
(bitset_mask): Now static inline, and without any __attribute__
((unused)) decoration, for glibc internal tests.
ChangeLog
lib/regex.h
lib/regex_internal.c
lib/regex_internal.h