[Qemu-devel] [PATCH] target_posix_types.h

2007-11-14 Thread Thayne Harbaugh
This patch, 44_target_posix_types.patch provides target specific posix types. These types improve target structure creation, code similarity to kernel code and improve type casting for assignment between target and host. Index: qemu/linux-user/alpha/target_posix_types.h

Re: [Qemu-devel] [PATCH] target_posix_types.h

2007-11-14 Thread Jocelyn Mayer
On Wed, 2007-11-14 at 17:36 +, Thiemo Seufer wrote: Jocelyn Mayer wrote: On Wed, 2007-11-14 at 08:59 -0700, Thayne Harbaugh wrote: This patch, 44_target_posix_types.patch provides target specific posix types. These types improve target structure creation, code similarity to

Re: [Qemu-devel] [PATCH] target_posix_types.h

2007-11-14 Thread Thiemo Seufer
Jocelyn Mayer wrote: On Wed, 2007-11-14 at 08:59 -0700, Thayne Harbaugh wrote: This patch, 44_target_posix_types.patch provides target specific posix types. These types improve target structure creation, code similarity to kernel code and improve type casting for assignment between

Re: [Qemu-devel] [PATCH] target_posix_types.h

2007-11-14 Thread Thayne Harbaugh
On Wed, 2007-11-14 at 17:25 +0100, Jocelyn Mayer wrote: On Wed, 2007-11-14 at 08:59 -0700, Thayne Harbaugh wrote: This patch, 44_target_posix_types.patch provides target specific posix types. These types improve target structure creation, code similarity to kernel code and improve type

Re: [Qemu-devel] [PATCH] target_posix_types.h

2007-11-14 Thread Fabrice Bellard
Thayne Harbaugh wrote: This patch, 44_target_posix_types.patch provides target specific posix types. These types improve target structure creation, code similarity to kernel code and improve type casting for assignment between target and host. Why is it needed ? Fabrice.

Re: [Qemu-devel] [PATCH] target_posix_types.h

2007-11-14 Thread Thayne Harbaugh
On Wed, 2007-11-14 at 20:14 +0100, Fabrice Bellard wrote: Thayne Harbaugh wrote: On Wed, 2007-11-14 at 19:32 +0100, Fabrice Bellard wrote: Thayne Harbaugh wrote: This patch, 44_target_posix_types.patch provides target specific posix types. These types improve target structure creation,

Re: [Qemu-devel] [PATCH] target_posix_types.h

2007-11-14 Thread Paul Brook
This means that time_t had to be tracked down on varying architectures to find the size and there was an assumption made that time_t is 32 bits - which isn't true for all targets. The next problem is that if the target is 32 bits but the host is 64 bits then there's a sign extension problem

Re: [Qemu-devel] [PATCH] target_posix_types.h

2007-11-14 Thread Thayne Harbaugh
On Wed, 2007-11-14 at 20:14 +0100, Fabrice Bellard wrote: Thayne Harbaugh wrote: On Wed, 2007-11-14 at 19:32 +0100, Fabrice Bellard wrote: Thayne Harbaugh wrote: This patch, 44_target_posix_types.patch provides target specific posix types. These types improve target structure creation,

Re: [Qemu-devel] [PATCH] target_posix_types.h

2007-11-14 Thread Warner Losh
From: Paul Brook [EMAIL PROTECTED] Subject: Re: [Qemu-devel] [PATCH] target_posix_types.h Date: Wed, 14 Nov 2007 20:39:36 + This means that time_t had to be tracked down on varying architectures to find the size and there was an assumption made that time_t is 32 bits - which isn't true

Re: [Qemu-devel] [PATCH] target_posix_types.h

2007-11-14 Thread Thayne Harbaugh
On Wed, 2007-11-14 at 20:39 +, Paul Brook wrote: This means that time_t had to be tracked down on varying architectures to find the size and there was an assumption made that time_t is 32 bits - which isn't true for all targets. The next problem is that if the target is 32 bits but

Re: [Qemu-devel] [PATCH] target_posix_types.h

2007-11-14 Thread Thayne Harbaugh
On Wed, 2007-11-14 at 14:06 -0700, Warner Losh wrote: From: Paul Brook [EMAIL PROTECTED] Subject: Re: [Qemu-devel] [PATCH] target_posix_types.h Date: Wed, 14 Nov 2007 20:39:36 + This means that time_t had to be tracked down on varying architectures to find the size

Re: [Qemu-devel] [PATCH] target_posix_types.h

2007-11-14 Thread Paul Brook
time_t is only one example. There are similar problems with the handling of struct target_iovec. There are still other places with similar problems. Yes, special casing can work. There's the possible problem of value truncation when moving between 32 and 64 bits. My point is that I