On 11/14/2012 03:29 PM, Роман Донченко wrote: > Eric Blake <[email protected]> писал в своём письме Thu, 15 Nov 2012 > 02:11:57 +0400: > >> For reference, on Cygwin (where m4 uses gnulib's regex engine, rather >> than glibc's) I get correct behavior: >> >> $ printf %s 'regexp(abab, \(a\(b\)*\)*\2, \&-\1-\2)' | m4 >> -1 > > That's interesting, because I don't: > > $ uname -sr > CYGWIN_NT-6.1-WOW64 1.7.17(0.262/5/3) > > $ m4 --version > m4 (GNU M4) 1.4.16 > Packaged by Cygwin (1.4.16-1) > (etc, etc) > > $ printf %s 'regexp(abab, \(a\(b\)*\)*\2, \&-\1-\2)' | m4 > abab-a-b > > In fact, Cygwin was where I did the test in the OP (although I've > previously observed the bug on Linux, too).
Arg, chalk that up to a typo on my part: when I was retyping the command line between the systems, I omitted a comma. The correct result would be the empty string, not -1; and I confirm that cygwin has the same behavior as Linux (probably due to gnulib copying from glibc). -- Eric Blake [email protected] +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
