From: Siddhesh Poyarekar <siddh...@sourceware.org> * m4/regex.m4 (gl_REGEX): Add extra escape characters to regular expressions. ---
The m4 preprocessor eats up half the escape characters, so give it twice as much. I ran into this when running tests for glibc 2.29 release and verified that this patch fixes the problem. Siddhesh m4/regex.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/m4/regex.m4 b/m4/regex.m4 index 35119c5c8..8e7efadff 100644 --- a/m4/regex.m4 +++ b/m4/regex.m4 @@ -204,7 +204,7 @@ AC_DEFUN([gl_REGEX], & ~RE_CONTEXT_INVALID_DUP & ~RE_NO_EMPTY_RANGES); memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex); + s = re_compile_pattern ("[[:alnum:]_-]\\\\\\\\+$", 16, ®ex); if (s) result |= 32; @@ -220,7 +220,7 @@ AC_DEFUN([gl_REGEX], back reference. */ re_set_syntax (RE_SYNTAX_POSIX_EGREP); memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("0|()0|\\1|0", 10, ®ex); + s = re_compile_pattern ("0|()0|\\\\1|0", 10, ®ex); if (!s || strcmp (s, "Invalid back reference")) result |= 64; -- 2.19.2