From: Paul Eggert Date: Thu, 15 Jul 2021 04:23:20 +0000 (-0500) Subject: regex: fix shell quoting problem in configuration X-Git-Tag: v1.0~2781 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=11e6fc32e9c5c770150b47bc0260b1b91110eba0;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 25d85aa4af..00d31cdc77 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 850c572228..0e1bafef29 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