summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/regex/regcomp.c
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowi@redhat.com>2012-06-11 22:15:27 +0000
committerYaakov Selkowitz <yselkowi@redhat.com>2012-06-11 22:15:27 +0000
commit3e5a48af5e1ecf1c3e1129c760128c3f6d479b57 (patch)
treeb311234d8f4ea680e9a8f9b0c3a8603d75d550c8 /winsup/cygwin/regex/regcomp.c
parent53943a2e87124d840c3537b138423380ef980f0f (diff)
downloadcygnal-3e5a48af5e1ecf1c3e1129c760128c3f6d479b57.tar.gz
cygnal-3e5a48af5e1ecf1c3e1129c760128c3f6d479b57.tar.bz2
cygnal-3e5a48af5e1ecf1c3e1129c760128c3f6d479b57.zip
* regex/regcomp.c (p_ere): Allow vertical-line following
left-parenthesis in ERE, as in glibc.
Diffstat (limited to 'winsup/cygwin/regex/regcomp.c')
-rw-r--r--winsup/cygwin/regex/regcomp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/regex/regcomp.c b/winsup/cygwin/regex/regcomp.c
index 30502f7f1..b44ba2c62 100644
--- a/winsup/cygwin/regex/regcomp.c
+++ b/winsup/cygwin/regex/regcomp.c
@@ -324,7 +324,10 @@ p_ere(struct parse *p,
conc = HERE();
while (MORE() && (c = PEEK()) != '|' && c != stop)
p_ere_exp(p);
+#ifndef __CYGWIN__
+ /* undefined behaviour according to POSIX; allowed by glibc */
(void)REQUIRE(HERE() != conc, REG_EMPTY); /* require nonempty */
+#endif
if (!EAT('|'))
break; /* NOTE BREAK OUT */