On 1/29/19 12:57 PM, Siddhesh Poyarekar wrote: > From: Siddhesh Poyarekar <[email protected]> > > * 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.
Which versions of m4 and autoconf are you seeing this under? Can you
show actual snippets from the generated configure file showing that \
was eaten? And why are you only touching some of the lines, rather than
all places where \\ appears in the regex.m4 file? This fix feels fishy,
and I seriously doubt that escape characters are being eaten by m4, but
I would like to make sure we have a real root cause understanding what
prompted this patch.
> +++ 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;
For example, if I take coreutils.git, and using the Fedora 29 pre-built
m4-1.4.18-9.fc29.x86_64 and autoconf-2.69-28.fc29.noarch, I see the
following in the resulting configure (without your patch applied):
$ grep -A2 're_compile.*alnum' gnulib/m4/regex.m4 configure
gnulib/m4/regex.m4: s = re_compile_pattern
("[[:alnum:]_-]\\\\+$", 16, ®ex);
gnulib/m4/regex.m4- if (s)
gnulib/m4/regex.m4- result |= 32;
--
configure: s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16,
®ex);
configure- if (s)
configure- result |= 32;
which is identical (no \ eaten), so I'm not sure why you are seeing
problems.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
