]> Savannah Git Hosting - gnulib.git/commitdiff
regex: fix shell quoting problem in configuration
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 15 Jul 2021 04:23:20 +0000 (23:23 -0500)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 15 Jul 2021 04:55:58 +0000 (23:55 -0500)
* m4/regex.m4 (gl_REGEX): Fix quoting problems.
These C programs are put into unquoted here-documents,
so $ and \ need to be quoted.

ChangeLog
m4/regex.m4

index 25d85aa4afae8adf14c5e096d4909c8efafe7af5..00d31cdc7757771f79594f12697705d952fecc2c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-07-14  Paul Eggert  <eggert@cs.ucla.edu>
+
+       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  <eggert@cs.ucla.edu>
 
        select: port better to MinGW
index 850c572228af696fd57aa576c84a0122802546fc..0e1bafef2942d4fc7b91c1ee62305c798ac5179f 100644 (file)
@@ -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 (&regex, 0, sizeof regex);
-            s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
+            s = re_compile_pattern ("[[:alnum:]_-]\\\\+\$", 16, &regex);
             if (s)
               result |= 32;
             else
@@ -264,7 +264,7 @@ AC_DEFUN([gl_REGEX],
                back reference.  */
             re_set_syntax (RE_SYNTAX_POSIX_EGREP);
             memset (&regex, 0, sizeof regex);
-            s = re_compile_pattern ("0|()0|\\1|0", 10, &regex);
+            s = re_compile_pattern ("0|()0|\\\\1|0", 10, &regex);
             if (!s)
               result |= 64;
             else