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

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



On Wednesday 23 January 2008 15:33:20 Keir Fraser wrote:
> On 23/1/08 14:25, "John Levon" <levon@xxxxxxxxxxxxxxxxx> wrote:
> >> Can I get some feedback from the people-who-make-decisions if a patch
> >> changing all 'unsigned long's in the public .h files to uintptr_t's
> >> would be accepted? If not, what type should I use?
> >
> > Shouldn't it be changed appropriately? That is, uintptr_t for values
> > that actually do, or can, hold a "pointer" value, and something else for
> > other 'longs'?
>
> We could just call it xen_long or xen_ulong. That would hide the underlying
> uintptr_t, which is needed anyway for XEN_INTERFACE_VERSION backward
> source-level compatibility.

When that ends up for uintptr_t being "unsigned long long" on 64bit platforms
and "unsigned long" on 32bit platforms, then you did it in a portable way.

BTW: C99 also defines intptr_t for whatever that might be useful.

Christoph

-- 
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy



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