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: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] sizeof(long) different under windows x64 and linuxx64
From: "Christoph Egger" <Christoph.Egger@xxxxxxx>
Date: Wed, 23 Jan 2008 15:45:25 +0100
Cc: James Harper <james.harper@xxxxxxxxxxxxxxxx>, Daniel Stodden <dns@xxxxxxxxxxxx>, Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>, John Levon <levon@xxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 23 Jan 2008 06:46:55 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C3BD00B0.1B4E1%Keir.Fraser@xxxxxxxxxxxx>
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: <C3BD00B0.1B4E1%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.7
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