[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] sizeof(long) different under windows x64 and linux x64


  • To: Chris Morrow <cmorrow@xxxxxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • 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
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcheBYpoyTf2lMn4EdyQQwAWy6hiGQ==
  • Thread-topic: [Xen-devel] sizeof(long) different under windows x64 and linux x64

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.