WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] sizeof(long) different under windows x64 and linuxx64

To: James Harper <james.harper@xxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] sizeof(long) different under windows x64 and linuxx64
From: Daniel Stodden <dns@xxxxxxxxxxxx>
Date: Wed, 23 Jan 2008 01:01:02 +0100
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 28 Jan 2008 02:18:15 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <AEC6C66638C05B468B556EA548C1A77D0131A8A7@trantor>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Bundesprüfstelle für jugendgefährdende Mädchen
References: <AEC6C66638C05B468B556EA548C1A77D0131A8A5@trantor> <1201044378.9372.32.camel@xxxxxxxxxxxxxxxxxxxx> <AEC6C66638C05B468B556EA548C1A77D0131A8A7@trantor>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, 2008-01-23 at 10:34 +1100, James Harper wrote:

> The enormity of this problem is just sinking in... Xen makes use of a
> type (long) that it assumes is 32 bits under a 32 bit arch, and 64 bits
> under a 64 bit arch. Windows has no such native type (except for
> pointer), but that can be solved via some #if statements.
> 
> 'long' and 'unsigned long' is used all over the place inside
> xen/include/public. I would need to create this new type, and replace
> all occurrences of 'long' with it in the 8750-ish lines of .h files.
> 
> Any suggestions as to what the type should be called? Maybe a bit of
> typedef'ing around xen_ulong_t and xen_long_t would work?

well, i don't see yet where a new type would be needed.

it's only public/ which matters. and for the foreseeable time being,
from that it's only the subset which matters to frontends (although i
agree that fixing the full PV interface would be cleaner).

under the assumption that xen_ulong_t is to be interpreted as 'ulong as
what xen considers a ulong': fixing the xen_(u)long_t to (u)int64_t
should be sufficient, because that's what xen/gcc will always want it to
be on x86_64.

means you need to split the typedef among xen-32/64.h.

anything else?

regards,
daniel

-- 
dns@xxxxxxxxxxxx

Wire up your home and stay there.




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