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

Re: [Xen-devel] [PATCH 1 of 5] blktap: remove HAVE_BYTESWAP_H checking, since it's defined by qemu



2011/12/19 Ian Campbell <Ian.Campbell@xxxxxxxxxx>:
> On Mon, 2011-12-19 at 11:28 +0000, Roger Pau Monnà wrote:
>> 2011/12/19 Ian Campbell <Ian.Campbell@xxxxxxxxxx>:
>> > On Mon, 2011-12-19 at 11:26 +0000, Roger Pau Monnà wrote:
>> >> 2011/12/19 Ian Campbell <Ian.Campbell@xxxxxxxxxx>:
>> >> > I think this is the correct option. No need to undef stuff. There is
>> >> > only one other include of byteswap.h in blktap.
>> >> >
>> >>
>> >> On uclibc, byteswap.h gets included by default, because _GNU_SOURCE
>> >> implies _BSD_SOURCE there. One solution is to add _POSIX_SOURCE, which
>> >> prevents the addition of _BSD_SOURCE.
>> >
>> > What path of includes leads to the inclusion of byteswap.h?
>>
>> This one:
>>
>> stdlib.h -> sys/types.h -> endian.h -> (becasue __USE_BSD is defined) 
>> byteswap.h
>
> Hrm :-/
>
> So on the flip side which platforms don't have this header at all?
>
> William suggested BSD doesn't but the use of __USE_BSD seems to suggest
> otherwise?
>
> Does NetBSD have byteswap.h?


Nope, but NetBSD has it's own preprocessor case:

#if defined(__NetBSD__)
#include <sys/endian.h>
#include <sys/types.h>

Doesn't have byteswap.h per se, but the functions are there. NetBSD
and OpenBSD are covered, because they have their specific cases, so
only Solaris and Linux are left to this case.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.