From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: fnmatch and FNM_CASEFOLD
Date: Mon, 2 Dec 2013 02:26:30 -0500 [thread overview]
Message-ID: <20131202072630.GF24286@brightrain.aerifal.cx> (raw)
In-Reply-To: <20131201220610.GD24286@brightrain.aerifal.cx>
On Sun, Dec 01, 2013 at 05:06:10PM -0500, Rich Felker wrote:
> While writing this email, I actually looked into how FNM_LEADING_DIR
> is supposed to work, and it's a trivial one-line change to make it
> work in combination with FNM_PATHNAME, so I think we should just add
> that, and document that it's a no-op without FNM_PATHNAME. Can you
> tell me if this would cover most real-world usage? At some later point
> we might be able to add it for non-FNM_PATHNAME. I have ideas how to
> do this but I'd like to combine that with an overhaul to the whole
> file I have in mind for post-1.0.
I found a trivial but inefficient way to handle the non-FNM_PATHNAME
case too, so I've implemented both and committed. Now FNM_LEADING_DIR
should be fully supported/working.
FNM_CASEFOLD on the other hand remains a no-op and I'm unclear on what
to do with it. The intent of POSIX seems to be that fnmatch bracket
expressions behave like RE brackets, for which POSIX specifies
case-insensitive semanics (for REG_ICASE flag, etc.) that disagree
with what glibc is doing. So the choices we're stuck with are
implementing a "correct" version of a nonstandard interface that
differs from the real-world systems it's modeled after, an "incorrect"
case-insensitivity, or something else entirely. It's messy enough that
I see why I originally did not even want to go here at all, but I'm
not sure what we should do.
Rich
prev parent reply other threads:[~2013-12-02 7:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-29 9:59 orc
2013-11-29 17:42 ` Rich Felker
2013-11-29 23:34 ` Rich Felker
2013-11-30 21:16 ` Rich Felker
2013-12-01 14:02 ` Felix Janda
2013-12-01 22:06 ` Rich Felker
2013-12-02 7:26 ` Rich Felker [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131202072630.GF24286@brightrain.aerifal.cx \
--to=dalias@aerifal.cx \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).