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: "Daniel Stodden" <dns@xxxxxxxxxxxx>
Subject: RE: [Xen-devel] sizeof(long) different under windows x64 and linuxx64
From: "James Harper" <james.harper@xxxxxxxxxxxxxxxx>
Date: Wed, 23 Jan 2008 10:41:09 +1100
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 22 Jan 2008 15:41:35 -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>
References: <AEC6C66638C05B468B556EA548C1A77D0131A8A5@trantor><1201044378.9372.32.camel@xxxxxxxxxxxxxxxxxxxx> <AEC6C66638C05B468B556EA548C1A77D0131A8A7@trantor>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AchdTkSdZFxCaPfQT2u0zk0o5MjKxQAAB6xgAABXDsA=
Thread-topic: [Xen-devel] sizeof(long) different under windows x64 and linuxx64
> 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.

Having another look, there are 248 occurrences of the word 'long' in the
.h files under xen/include/public. A search and replace on that is
probably going to break things (eg it would find the word 'belong' too),
but a search and replace on 'unsigned long' (203 occurrences) is
probably safe, leaving 45 'long's to be manually inspected. Nothing like
as big a job as it could have been.

I'll tackle it tonight!

James


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

<Prev in Thread] Current Thread [Next in Thread>