[3/8] linux-user: Fix undefined HOST_LONG_SIZE on PPC hosts

Submitted by Alexander Graf on May 1, 2012, 7:50 p.m.

Details

Message ID 1335901857-29799-4-git-send-email-agraf@suse.de
State New
Headers show

Commit Message

Alexander Graf May 1, 2012, 7:50 p.m.
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.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 thunk.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Stefan Weil May 1, 2012, 8:51 p.m.
Am 01.05.2012 21:50, schrieb Alexander Graf:
> 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.
>
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
> thunk.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/thunk.h b/thunk.h
> index 5be8f91..87025c3 100644
> --- a/thunk.h
> +++ b/thunk.h
> @@ -113,7 +113,7 @@ static inline int thunk_type_size(const argtype 
> *type_ptr, int is_host)
> defined(HOST_PARISC) || defined(HOST_SPARC64)
> return 4;
> #elif defined(HOST_PPC)
> - return HOST_LONG_SIZE;
> + return sizeof(void *);
> #else
> return 2;
> #endif


Malc reverted his change and applied Alexander's previous patch,
so this one is no longer needed (and would conflict with
latest git master).

Regards,

Stefan W.
Andreas Färber May 1, 2012, 9:02 p.m.
Am 01.05.2012 22:51, schrieb Stefan Weil:
> Am 01.05.2012 21:50, schrieb Alexander Graf:
>> 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.
>>
>> Signed-off-by: Alexander Graf <agraf@suse.de>
>> ---
>> thunk.h | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/thunk.h b/thunk.h
>> index 5be8f91..87025c3 100644
>> --- a/thunk.h
>> +++ b/thunk.h
>> @@ -113,7 +113,7 @@ static inline int thunk_type_size(const argtype
>> *type_ptr, int is_host)
>> defined(HOST_PARISC) || defined(HOST_SPARC64)
>> return 4;
>> #elif defined(HOST_PPC)
>> - return HOST_LONG_SIZE;
>> + return sizeof(void *);
>> #else
>> return 2;
>> #endif
> 
> 
> Malc reverted his change and applied Alexander's previous patch,
> so this one is no longer needed (and would conflict with
> latest git master).

Since malc does seem to have committed Alex' exact patch, I would hope
that a PULL applies fine now, just like a rebase of a local branch onto
committed patch versions from master...

Andreas

Patch hide | download patch | download mbox

diff --git a/thunk.h b/thunk.h
index 5be8f91..87025c3 100644
--- a/thunk.h
+++ b/thunk.h
@@ -113,7 +113,7 @@  static inline int thunk_type_size(const argtype *type_ptr, int is_host)
       defined(HOST_PARISC) || defined(HOST_SPARC64)
             return 4;
 #elif defined(HOST_PPC)
-            return HOST_LONG_SIZE;
+            return sizeof(void *);
 #else
             return 2;
 #endif