diff options
Diffstat (limited to 'posix')
-rw-r--r-- | posix/fnmatch_loop.c | 4 | ||||
-rw-r--r-- | posix/tst-fnmatch.input | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/posix/fnmatch_loop.c b/posix/fnmatch_loop.c index 20ae0e3669..fd25853c31 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)); diff --git a/posix/tst-fnmatch.input b/posix/tst-fnmatch.input index 219124556e..e448576be1 100644 --- a/posix/tst-fnmatch.input +++ b/posix/tst-fnmatch.input @@ -713,5 +713,9 @@ C "[" "!([!]a[])" 0 EXTMATCH C "]" "!([!]a[])" 0 EXTMATCH C ")" "*([)])" 0 EXTMATCH C "*" "*([*(])" 0 EXTMATCH -C "abcd" "*!(|a)cd" NOMATCH EXTMATCH +C "abcd" "*!(|a)cd" 0 EXTMATCH C "ab/.a" "+([abc])/*" NOMATCH EXTMATCH|PATHNAME|PERIOD +C "" "" 0 +C "" "" 0 EXTMATCH +C "" "*([abc])" 0 EXTMATCH +C "" "?([abc])" 0 EXTMATCH |