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

2013-05-05 Thread Blue Swirl
On Sat, Apr 27, 2013 at 6:50 PM, Martin Husemann wrote: > On Thu, Apr 25, 2013 at 08:36:55PM +0200, Martin Husemann wrote: >> Ok, I can fix the namespace issue (which is real) easily. > > Turns out to be a bit harder: qemu does not define (as far as I can tell) > any restricting macro (_POSIX_C_SO

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

2013-04-27 Thread Martin Husemann
On Thu, Apr 25, 2013 at 08:36:55PM +0200, Martin Husemann wrote: > Ok, I can fix the namespace issue (which is real) easily. Turns out to be a bit harder: qemu does not define (as far as I can tell) any restricting macro (_POSIX_C_SOURCE or whatever). Should it? Martin

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

2013-04-25 Thread Peter Maydell
On 25 April 2013 19:36, Martin Husemann wrote: > But this still leaves two questions open: > > - why not use an unsigned return value for your homegrown version? We follow gcc's API, which returns int for __builtin_popcountl. > - would it be preferable to use official/optimized versions if >

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

2013-04-25 Thread Martin Husemann
On Thu, Apr 25, 2013 at 06:09:36PM +0100, Richard Henderson wrote: > On 2013-04-25 14:38, Laszlo Ersek wrote: > >> is the K&R header supplanted by ISO . > >>Is there any good reason that we're including it at all? > > > >- is a portable SUS/POSIX header: > > > >http://pubs.opengroup.org/onlinepubs

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

2013-04-25 Thread Eric Blake
On 04/25/2013 11:09 AM, Richard Henderson wrote: > On 2013-04-25 14:38, Laszlo Ersek wrote: >>> is the K&R header supplanted by ISO . >>> Is there any good reason that we're including it at all? >> >> - is a portable SUS/POSIX header: >> >> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs

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

2013-04-25 Thread Richard Henderson
On 2013-04-25 14:38, Laszlo Ersek wrote: is the K&R header supplanted by ISO . Is there any good reason that we're including it at all? - 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

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

2013-04-25 Thread Laszlo Ersek
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 BIT

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

2013-04-25 Thread Richard Henderson
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 stri

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

2013-04-24 Thread Martin Husemann
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 intpopcountl(unsi