On 04/25/2013 11:09 AM, Richard Henderson wrote: > On 2013-04-25 14:38, Laszlo Ersek wrote: >>> <strings.h> is the K&R header supplanted by ISO <string.h>. >>> Is there any good reason that we're including it at all? >> >> - <strings.h> is a portable SUS/POSIX header: >> >> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/strings.h.html > > Huh. Ok, fine, but what do we think we're using out of it that > isn't in <string.h>?
strcasecmp(). Just because some (many) systems pollute <string.h> with strcasecmp() without you having to explicitly include <strings.h> (and POSIX allows but not requires this: http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_02_02 says that the str* prefix is reserved in <string.h>), a strictly-conforming implementation cannot rely on this extension, and there are systems where you have to get strcasecmp() from <strings.h>, just as POSIX requires. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature