|
From: | Alexander Graf |
Subject: | Re: [Qemu-ppc] [Qemu-devel] [PATCH] linux-user: Fix undefined HOST_LONG_SIZE on PPC hosts |
Date: | Thu, 19 Apr 2012 17:12:14 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:10.0.3) Gecko/20120306 Thunderbird/10.0.3 |
On 04/19/2012 04:47 PM, Peter Maydell wrote:
On 19 April 2012 15:23, Alexander Graf<address@hidden> wrote:On my PPC host, HOST_LONG_SIZE is not defined even after running configure. Use the normal C way of determining the long size instead. #elif defined(HOST_PPC) - return HOST_LONG_SIZE; + return sizeof(long); #elseHOST_LONG_SIZE was removed by Stefan in commit 9c6ecf; it looks like this PPC-only use was accidentally omitted. For consistency with that commit and how we handle TYPE_LONG in this function, it would be better to use 'sizeof(void *)' here I think.
I'm fairly sure that's not semantically what we're aiming for. We're trying to find the host's typdef for the compat_dev_t type.
In fact, that one is defined as u32: arch/powerpc/include/asm/compat.h:typedef u32 compat_dev_t; So I'm not sure if sizeof(long) is even correct...It's certainly more correct than sizeof(void*) and gets us bug compatible to where we were before :).
Alex
[Prev in Thread] | Current Thread | [Next in Thread] |