Date: Fri, 10 Oct 2003 14:12:41 -0700 From: David <david@pinko.net> To: freebsd-bugs@FreeBSD.ORG Subject: fnmatch ("[[:alpha:]]","x", FNM_PATHNAME) returns FNM_NOMATCH Message-ID: <3F8720C9.4070203@pinko.net>
next in thread | raw e-mail | index | archive | help
For some reason send-pr isn't working correctly, so I am emailing it. ------ To: FreeBSD-gnats-submit@freebsd.org From: david@pinko.net Reply-To: david@pinko.net Cc: X-send-pr-version: 3.113 X-GNATS-Notify: >Submitter-Id: current-users >Originator: David Gardner >Organization: na >Confidential: no <FreeBSD PRs are public data> >Synopsis: fnmatch ("[[:alpha:]]","x", FNM_PATHNAME) returns FNM_NOMATCH >Severity: non-critical >Priority: low >Category: standards >Class: sw-bug >Release: FreeBSD 4.8-RELEASE i386 >Environment: System: FreeBSD eden 4.8-RELEASE FreeBSD 4.8-RELEASE #3: Thu Jun 19 21:19:54 PDT 2003 root@eden:/usr/src/sys/compile/Socialist i386 From fnmatch.h: src/include/fnmatch.h,v 1.9 1999/11/21 17:32:45 fnmatch.h 8.1 (Berkeley) 6/2/93 g++ version 2.95.4 gcc version 3.0.4 >Description: The fnmatch function doesn't seem to like any of the character classes that are listed in the re_format man page. I ssh'ed to a linux box to check this and the character classes behaved the way I expected them to. >How-To-Repeat: #include <iostream> #include <fnmatch.h> void main () { int result = fnmatch ("[[:alpha:]]","x", FNM_PATHNAME); if (result == FNM_NOMATCH) cout << "failed" << endl; else cout << "passed" << endl; } >Fix: fnmatch seems to like the expression "[A-Za-z]" which is equivelent to "[[:alpha:]]".
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F8720C9.4070203>