Magnus Hagander <magnus@hagander.net> writes:
> See attached patch which takes out the parts of fnmatch that we're not
> interested in, and puts it directly in fe-secure.c. Obviously, if we go
> down that way, we can remove fnmatch.c from port again :-)
> Thoughts?
Generally +1, but a couple of comments:
* This seems to be still mostly NetBSD code, so I think you need to do
more than just credit them in an aside. Should we repeat the full
NetBSD copyright notice for this one function?
* This is still making unjustified assumptions about the behavior of
tolower/toupper. I think you probably want ASCII-only case folding,
ie use pg_toupper/pg_tolower. If it actually should be locale aware
then it's still wrong because it won't work in multibyte encodings.
Also you forgot the de rigueur (unsigned char) casts for ctype.h calls.
regards, tom lane