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. Fix: fnmatch seems to like the expression "[A-Za-z]" which is equivelent to "[[:alpha:]]". 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; }
State Changed From-To: open->analyzed I agree that this behaviour is incorrect and have documented it in the fnmatch(3) manual page.
Responsible Changed From-To: freebsd-standards->tjr I'll take care of this one.
Responsible Changed From-To: tjr->freebsd-bugs tjr has returned his commit bit for safekeeping.
State Changed From-To: analyzed->open unowned PRs must not be in analyzed state
Responsible Changed From-To: freebsd-bugs->freebsd-standards Canonicalize assignment.
It is more than [:alpha:].... it is: [: :] character class [= =] equivalence character class [. .] collation symbol Given that the bugreport is 14 years old, is there a chance that this will be implemented in a predictable time? I am asking this because I am currently taking the FreeBSD libc i18n code and integrating it into libc from OpenSolaris (SchilliX) and I would like to get something that could pass the POSIX certification tests.
BTW: bin/sh/expand.c implements [:alpha:] but not the equivalence class and not the collation symbol. It may still help how to implement things...
batch change: For bugs that match the following - Status Is In progress AND - Untouched since 2018-01-01. AND - Affects Base System OR Documentation DO: Reset to open status. Note: I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.
The references to POSIX are: https://pubs.opengroup.org/onlinepubs/9699919799/functions/fnmatch.html together with https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13_01 and https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_05