Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/tests/lib/libc/gen




On Oct 13, 2014 2:13 PM, "Christos Zoulas" <christos%zoulas.com@localhost> wrote:
>
> On Oct 13, 11:29am, justin%specialbusservice.com@localhost (Justin Cormack) wrote:
> -- Subject: Re: CVS commit: src/tests/lib/libc/gen
>
> | Not sure about this. See
> | http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html#tag_09_03_05
> |
> | "The special characters '.', '*', '[', and '\' (period, asterisk,
> | left-bracket, and backslash, respectively) shall lose their special
> | meaning within a bracket _expression_."
>
> fnmatch patterns are not BRe's (for example '.' is not special
> to fnmatch expressions, and '?' is missing from above); but the first 3
> characters have no special meaning, that's common to both.
>
> | So I think the original version of the test is in fact correct with a
> | single \ in the actual string within the bracket _expression_. This test
> | passes in a very few implementations. I might be wrong though...
>
> If that was the case, there would be no way to quote something inside
> a bracket _expression_, so you could never have a '/' or ']' in a bracket
> _expression_. I think that is a defect. Here's is a case where complying
> to an ambiguous standard, makes functionality worse, and I would file
> a defect with ToG.

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.

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.

Justin



Home | Main Index | Thread Index | Old Index