* regex/regcomp.c (p_ere): Allow vertical-line following

left-parenthesis in ERE, as in glibc.
This commit is contained in:
Yaakov Selkowitz 2012-06-11 22:15:27 +00:00
parent 53943a2e87
commit 3e5a48af5e
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2012-06-11 Yaakov Selkowitz <yselkowitz@...>
* regex/regcomp.c (p_ere): Allow vertical-line following
left-parenthesis in ERE, as in glibc.
2012-06-10 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* include/sys/elf_common.h (R_386_16): Define.

View File

@ -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 */