>From 11e6fc32e9c5c770150b47bc0260b1b91110eba0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 14 Jul 2021 23:23:20 -0500 Subject: [PATCH 1/2] regex: fix shell quoting problem in configuration * m4/regex.m4 (gl_REGEX): Fix quoting problems. These C programs are put into unquoted here-documents, so $ and \ need to be quoted. --- ChangeLog | 7 +++++++ m4/regex.m4 | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 25d85aa4a..00d31cdc7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2021-07-14 Paul Eggert + + regex: fix shell quoting problem in configuration + * m4/regex.m4 (gl_REGEX): Fix quoting problems. + These C programs are put into unquoted here-documents, + so $ and \ need to be quoted. + 2021-07-08 Paul Eggert select: port better to MinGW diff --git a/m4/regex.m4 b/m4/regex.m4 index 850c57222..0e1bafef2 100644 --- a/m4/regex.m4 +++ b/m4/regex.m4 @@ -1,4 +1,4 @@ -# serial 71 +# serial 72 # Copyright (C) 1996-2001, 2003-2021 Free Software Foundation, Inc. # @@ -246,7 +246,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; else @@ -264,7 +264,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) result |= 64; else -- 2.25.1