[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] bswap: Don't rely on HOST_LONG_BITS
From: |
Stefan Weil |
Subject: |
Re: [Qemu-devel] [PATCH] bswap: Don't rely on HOST_LONG_BITS |
Date: |
Thu, 31 Jan 2013 07:17:48 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 |
Am 30.01.2013 23:00, schrieb Richard Henderson:
> On 01/30/2013 01:56 PM, Stefan Weil wrote:
>> Could you please try whether this patch fixes the build problems:
>>
>>
>> From 4dd39af7a3e493669977ec6f50e91bf649b5727f Mon Sep 17 00:00:00 2001
>> From: Stefan Weil <address@hidden>
>> Date: Wed, 30 Jan 2013 22:52:12 +0100
>> Subject: [PATCH] Fix build problems for big endian hosts
>>
>> Make sure that HOST_LONG_BITS is always defined when qemu/bswap.h
>> is included.
>>
>> Signed-off-by: Stefan Weil <address@hidden>
>
> This probably works. And from the list of includes removed, looks
> good from a long-term maintenance point of view.
>
> I stand by my use of ULONG_MAX to match the unsigned long type though.
>
>
> r~
>
Andreas has pointed out that HOST_LONG_BITS was not correct in function
leul_to_cpu, so your patch fixes a real bug for MinGW-w64.
My patch only fixes the compilation.
In the long term HOST_LONG_BITS should be renamed to HOST_PTR_BITS
or HOST_POINTER_BITS to avoid future confusion and wrong use of this macro.
Stefan