[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-21 20:42:33 CET

> Greg Hudson <ghudson@MIT.EDU> wrote on 02/17/2006 12:59:59 PM:
>
> Ugh. IBM's header files are apparently trying to be compatible with
> 20-year-old System V and BSD, and could use an update. It's true that
> strcasecmp and strncasecmp came from BSD which at first used
> <strings.h>, but it's been a while since any popular Unix system didn't
> make <string.h> and <strings.h> mostly identical, and declare
> strcasecmp/strncasecmp in both. (Unless you've asked for a clean
> namespace for a particular standard which doesn't include those
> functions.)

I deleted ghudson's original message, so the threading of this reply is
likely incorrect. Sorry.

I sent ghudson's reply to IBM. This was their reply. I probably should
not bother to post this, but it seemed interesting and relevant to the
discussion and the subsequent patch.

<---- Begin Quote -------
The i5/OS C runtime is compliant to the "The Single UNIX® Specification,
Version 2" - the strcasecmp/strncasecmp functions are documented to be
declared in the <strings.h> header file.

http://www.opengroup.org/onlinepubs/007908799/xsh/strcasecmp.html

The newest version of the specification is "The Open Group Base
Specifications Issue 6" and the functions are documented to be in the
<strings.h> header file as well.

http://www.opengroup.org/onlinepubs/009695399/functions/strcasecmp.html

I did some snooping on what other platforms do and found the following
brief history of the routines (from
http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/strcasecmp.3.html

):

HISTORY
     The strcasecmp() and strncasecmp() functions first appeared in
4.4BSD.
     Their prototypes existed previously in <string.h> before they were
moved
     to <strings.h> for IEEE Std 1003.1-2001 (``POSIX.1'') compliance.

So i5/OS is compliant to the newest/latest standards.
----- End Quote ----->

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 Tue Feb 21 20:43: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.