Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[BZ #361]
Update.
2004-09-01  Jakub Jelinek  <jakub@redhat.com>

	[BZ #361]
	* posix/fnmatch_loop.c (FCT): For backslash between brackets, branch
	to normal_bracket after fetching the next character.
	* posix/tst-fnmatch.input: Add 25 new tests.
	Reported by Markus Oberhumer <markus@oberhumer.com>.
  • Loading branch information
Ulrich Drepper committed Sep 2, 2004
1 parent 4956393 commit aae95a1
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
@@ -1,3 +1,11 @@
2004-09-01 Jakub Jelinek <jakub@redhat.com>

[BZ #361]
* posix/fnmatch_loop.c (FCT): For backslash between brackets, branch
to normal_bracket after fetching the next character.
* posix/tst-fnmatch.input: Add 25 new tests.
Reported by Markus Oberhumer <markus@oberhumer.com>.

2004-09-01 Ulrich Drepper <drepper@redhat.com>

* elf/rtld.c (dl_main): First check existence of ld.so.preload
Expand Down
5 changes: 2 additions & 3 deletions posix/fnmatch_loop.c
@@ -1,4 +1,4 @@
/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2003
/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2003,2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Expand Down Expand Up @@ -242,8 +242,7 @@ FCT (pattern, string, string_end, no_leading_period, flags)
c = FOLD ((UCHAR) *p);
++p;

if (c == fn)
goto matched;
goto normal_bracket;
}
else if (c == L('[') && *p == L(':'))
{
Expand Down
27 changes: 26 additions & 1 deletion posix/tst-fnmatch.input
@@ -1,5 +1,5 @@
# Tests for fnmatch.
# Copyright (C) 2000, 2001 Free Software Foundation, Inc.
# Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributes by Ulrich Drepper <drepper@redhat.com>.
#
Expand Down Expand Up @@ -389,6 +389,31 @@ C "az" "[-a]z" 0
C "bz" "[-ab]z" 0
C "cz" "[-ab]z" NOMATCH
C "-z" "[-ab]z" 0
C "\\" "[\\\\-a]" 0
C "_" "[\\\\-a]" 0
C "a" "[\\\\-a]" 0
C "-" "[\\\\-a]" NOMATCH
C "\\" "[\\]-a]" NOMATCH
C "_" "[\\]-a]" 0
C "a" "[\\]-a]" 0
C "]" "[\\]-a]" 0
C "-" "[\\]-a]" NOMATCH
C "\\" "[!\\\\-a]" NOMATCH
C "_" "[!\\\\-a]" NOMATCH
C "a" "[!\\\\-a]" NOMATCH
C "-" "[!\\\\-a]" 0
C "!" "[\\!-]" 0
C "-" "[\\!-]" 0
C "\\" "[\\!-]" NOMATCH
C "Z" "[Z-\\\\]" 0
C "[" "[Z-\\\\]" 0
C "\\" "[Z-\\\\]" 0
C "-" "[Z-\\\\]" NOMATCH
C "Z" "[Z-\\]]" 0
C "[" "[Z-\\]]" 0
C "\\" "[Z-\\]]" 0
C "]" "[Z-\\]]" 0
C "-" "[Z-\\]]" NOMATCH

# Following are tests outside the scope of IEEE 2003.2 since they are using
# locales other than the C locale. The main focus of the tests is on the
Expand Down

0 comments on commit aae95a1

Please sign in to comment.