[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: apr_strnatcasecmp vs. strcasecmp

From: Mark Phippard <markp_at_softlanding.com>
Date: 2006-02-17 04:48:41 CET

> > A quick question: Is there some reason we use (with one exception in
> > config.c) strcasecmp() instead of apr_strnatcasecmp()?
>
> I think our one use of apr_strnatcasecmp is probably a mistake, or at
least not
> a particularly good idea.

We have made some progress on this one. I contacted my contact on IBM's
Apache team and she confirmed that they use this function extensively in
Apache and that it should work fine on OS/400 in UTF8 mode. Paul created a
small test program that seemed to confirm this, yet Subversion still did
not work.

I did some digging on the two compiled objects and noticed that they were
linking different runtime functions (Subversion was apparently linking the
EBCDIC version). I went back to IBM with this and we each did some more
digging and appear to have figured it out:

Subversion uses #include <string.h> but to get the UTF8 support in this
function on OS/400 you need to #include <strings.h>. Does this make sense
to anyone? My IBM contact is going to run it by the C compiler team to see
what they say. Now that we have discovered this, Paul seems to recall
reading some stuff in the IBM docs about it, he is going to see if he can
find anything.

Keep in mind that we do not have autoconf or any of the GNU toolchain on
OS/400. I had to write a custom build process from scratch. So, for all I
know, there are ways this is dealt with on other platforms that I just need
to do in our build system, like setting some compiler define.

Paul is out tomorrow but will look at it some more on Monday. Hopefully we
will have some more info from IBM at that time. I imagine they would at
least tell me if I could set an option on the compiler to control this.

Not being a C programmer by trade, just curious if anyone might be able to
shed some light on this for me. I did a Google search and found enough
evidence to see that this is not completely unique to OS/400 and most of
the stuff seemed to reference autoconf macros to pick the right file. I
just do not understand how that is done or rather what it ultimately does.

Thanks

Mark

_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. and SoftLanding Europe Plc by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Feb 17 04:49:01 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.