[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Git head build problem (popcountl vs. system headers)
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] Git head build problem (popcountl vs. system headers) |
Date: |
Thu, 25 Apr 2013 11:39:05 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 |
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