From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Christoph Egger" Subject: Re: sizeof(long) different under windows x64 and linuxx64 Date: Wed, 23 Jan 2008 15:45:25 +0100 Message-ID: <200801231545.26182.Christoph.Egger@amd.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: James Harper , Daniel Stodden , Samuel Thibault , John Levon List-Id: xen-devel@lists.xenproject.org On Wednesday 23 January 2008 15:33:20 Keir Fraser wrote: > On 23/1/08 14:25, "John Levon" 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 underlyi= ng > 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 platfor= ms 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 =2D-=20 AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Gesch=E4ftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplement=E4r: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Gesch=E4ftsf=FChrer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy