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: Chris Morrow <cmorrow@xxxxxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] sizeof(long) different under windows x64 and linux x64
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Wed, 23 Jan 2008 21:18:47 +0000
Delivery-date: Wed, 23 Jan 2008 13:19:04 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4797A670.9090604@xxxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcheBYpoyTf2lMn4EdyQQwAWy6hiGQ==
Thread-topic: [Xen-devel] sizeof(long) different under windows x64 and linux x64
User-agent: Microsoft-Entourage/11.3.6.070618
I doubt anyone printf's hypercall struct fields directly. If they do, we can
provide a suitable PRIxxx macro. Yeah, they're a bit ugly but it's the right
answer to this problem. We use PRIxxx macros extensively in Xen code
already.

 -- Keir

On 23/1/08 20:41, "Chris Morrow" <cmorrow@xxxxxxxxxxxxxx> wrote:

> 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.



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