aboutsummaryrefslogtreecommitdiff
path: root/posix/fnmatch_loop.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-03-28 06:25:09 +0000
committerUlrich Drepper <drepper@redhat.com>2001-03-28 06:25:09 +0000
commit228293b5906774f8d5dffde32251863d045a354e (patch)
tree72d24b6e2e10251bea2175544236ea79b9d0860c /posix/fnmatch_loop.c
parent325a39c51197c480891d83b742abc01e61c7786f (diff)
downloadglibc-228293b5906774f8d5dffde32251863d045a354e.zip
glibc-228293b5906774f8d5dffde32251863d045a354e.tar.gz
glibc-228293b5906774f8d5dffde32251863d045a354e.tar.bz2
Update.
* posix/fnmatch_loop.c (FCT): Handle !() after * special like @() and +(). * posix/tst-fnmatch.input: Add test cases for matching empty strings.
Diffstat (limited to 'posix/fnmatch_loop.c')
-rw-r--r--posix/fnmatch_loop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/posix/fnmatch_loop.c b/posix/fnmatch_loop.c
index 20ae0e3..fd25853 100644
--- a/posix/fnmatch_loop.c
+++ b/posix/fnmatch_loop.c
@@ -164,8 +164,8 @@ FCT (pattern, string, string_end, no_leading_period, flags)
if (c == L('[')
|| (__builtin_expect (flags & FNM_EXTMATCH, 0) != 0
- /* XXX Do we have to add '!'? */
- && (c == L('@') || c == L('+')) && *p == L('(')))
+ && (c == L('@') || c == L('+') || c == L('!'))
+ && *p == L('(')))
{
int flags2 = ((flags & FNM_FILE_NAME)
? flags : (flags & ~FNM_PERIOD));