Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowi@redhat.com>2012-06-12 02:15:27 +0400
committerYaakov Selkowitz <yselkowi@redhat.com>2012-06-12 02:15:27 +0400
commit3e5a48af5e1ecf1c3e1129c760128c3f6d479b57 (patch)
treeb311234d8f4ea680e9a8f9b0c3a8603d75d550c8 /winsup/cygwin/regex
parent53943a2e87124d840c3537b138423380ef980f0f (diff)
* regex/regcomp.c (p_ere): Allow vertical-line following
left-parenthesis in ERE, as in glibc.
Diffstat (limited to 'winsup/cygwin/regex')
-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 */