[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/tests/lib/libc/gen
On Mon, Oct 13, 2014 at 2:26 PM, Christos Zoulas <christos%zoulas.com@localhost> wrote:
> On Oct 13, 2:23pm, justin%specialbusservice.com@localhost (Justin Cormack) wrote:
> -- Subject: Re: CVS commit: src/tests/lib/libc/gen
> | You can have a ] by having it as the first character that is made explicit.
> | And if the / is not special then that is no problem either.
> Yes, '/' is the problem.
> | Let me read through the spec again. We are not alone in not passing this
> | test eg glibc). I can't remember what FreeBSD does will check again.
> I couldn't find a place where it said how to quote /.
Well also there is the bit thats says
When pattern matching is used where shell quote removal is not
performed (such as in the argument to the find - name primary when
find is being called using one of the exec functions as defined in the
System Interfaces volume of IEEE Std 1003.1-2001, or in the pattern
argument to the fnmatch() function), special characters can be escaped
to remove their special meaning by preceding them with a backslash
character. This escaping backslash is discarded. The sequence "\\"
represents one literal backslash. All of the requirements and effects
of quoting on ordinary, shell special, and special pattern characters
shall apply to escaping in this context.
Which seems to suggest your change is correct... will see if can get agreement.
The / handling for fnmatch seems to be covered by
The flags argument shall modify the interpretation of pattern and
string. It is the bitwise-inclusive OR of zero or more of the flags
defined in <fnmatch.h>. If the FNM_PATHNAME flag is set in flags, then
a slash character ( '/' ) in string shall be explicitly matched by a
slash in pattern; it shall not be matched by either the asterisk or
question-mark special characters, nor by a bracket expression. If the
FNM_PATHNAME flag is not set, the slash character shall be treated as
an ordinary character.
Which suggests \/ is not allowed, you are matching pathnames or not
and cannot escape a /
Main Index |
Thread Index |