-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hrvoje Niksic wrote:
> Micah Cowan <[EMAIL PROTECTED]> writes:
> 
>>> It sounds like a libc problem rather than a gcc problem.  Try
>>> #undefing SYSTEM_FNMATCH in sysdep.h and see if it works then.
>> It's hard for me to imagine an fnmatch that ignores FNM_PATHNAME: I
>> mean, don't most shells rely on this to handle file globbing and
>> whatnot?
> 
> The conventional wisdom among free software of the 90s was that
> fnmatch() was too buggy to be useful.  For that reason all free shells
> rolled their own fnmatch, as did other programs that needed it,
> including Wget.  Maybe the conventional wisdom was right for the
> reporter's system.
> 
> Another possibility is that something else is installing fnmatch.h in
> a directory on the compiler's search path and breaking the system
> fnmatch.  IIRC Apache was a known culprit that installed fnmatch.h in
> /usr/local/include.  That was another reason why Wget used to
> completely ignore system-provided fnmatch.

I'm wondering whether it might make sense to go back to completely
ignoring the system-provided fnmatch? In particular, it would probably
resolve the remaining issue with that one bug you reported about
fnmatch() failing on strings whose encoding didn't match the locale.

Additionally, I've been toying with the idea of adding something like a
"**" to match all characters, including slashes. There was a user who
had trouble using wildcards to match any directory whose name was (as in
the problem example here), "!COMPLETE". At the time I wasn't fully
certain that it wasn't a bug in Wget; as I understand it now, in order
to match _any_ directory !COMPLETE, you'd have to be sure to exclude
"!COMPLETE", "*/!COMPLETE", "*/*/!COMPLETE", etc. I'm not sure if it's
original there, but Vim uses a ** pattern, so that you could simply
write "**!COMPLETE" (or, if you wanted to be more correct I suppose,
just "!COMPLETE" and "**/!COMPLETE").

What do you think?

- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer,
and GNU Wget Project Maintainer.
http://micah.cowan.name/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD4DBQFH8/zx7M8hyUobTrERAtpoAJiQHrzVjFwKXxEjteqMGAGgBCMgAJ9rZIah
k+92ivTBGpSsmHcLnlsjfQ==
=JLn9
-----END PGP SIGNATURE-----

Reply via email to