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 linux x64

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] sizeof(long) different under windows x64 and linux x64
From: Chris Morrow <cmorrow@xxxxxxxxxxxxxx>
Date: Wed, 23 Jan 2008 13:41:20 -0700
Delivery-date: Wed, 23 Jan 2008 12:41:50 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1201045195.2837.37.camel@xxxxxxxxxxxxxxxxxxxxx>
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: YottaYotta Inc.
References: <AEC6C66638C05B468B556EA548C1A77D0131A8A5@trantor> <1201045195.2837.37.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.10 (X11/20070304)
Andy Grover wrote:

I think it's very hard to be LP64/LLP64-clean without actual testing on
both.

Printf format statements need to reflect whether the 64 bit type is a long or a long long.

uintptr_t foo
printf("%lx", foo) or printf("%llx", foo);

This can be a pain to resolve. /usr/include/inttypes.h has defines that are supposed to help with this, but they are ugly to use.

--
Chris Morrow    YottaYotta Inc. email: cmorrow@xxxxxxxxxxxxxx
phone: (780) 989 6814           web:   http://www.yottayotta.com


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