qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Git head build problem (popcountl vs. system headers)


From: Laszlo Ersek
Subject: Re: [Qemu-devel] Git head build problem (popcountl vs. system headers)
Date: Thu, 25 Apr 2013 15:38:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5

On 04/25/13 12:36, Richard Henderson wrote:
> On 2013-04-25 07:47, Martin Husemann wrote:
>> I just tried building git HEAD on NetBSD-current and gcc chokes on
>> a prototype mismatch for popcountl:
>>
>> util/hbitmap.c has:
>>
>> static inline int popcountl(unsigned long l)
>> {
>>      return BITS_PER_LONG == 32 ? ctpop32(l) : ctpop64(l);
>> }
>>
>> while NetBSD's strings.h uses:
>>
>> unsigned int        popcountl(unsigned long) __constfunc;
> 
> <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

- "popcountl()" in NetBSD's <strings.h> is either a
standards-nonconformance issue, or the the qemu build system doesn't set
up the right SUS/POSIX environment for compilation on NetBSD. (If that's
possible at all, I don't know.)

Laszlo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]