From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Morrow Subject: Re: sizeof(long) different under windows x64 and linux x64 Date: Wed, 23 Jan 2008 13:41:20 -0700 Message-ID: <4797A670.9090604@YottaYotta.com> References: <1201045195.2837.37.camel@lute.groveronline.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1201045195.2837.37.camel@lute.groveronline.com> 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 List-Id: xen-devel@lists.xenproject.org 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. -- Chris Morrow YottaYotta Inc. email: cmorrow@yottayotta.com phone: (780) 989 6814 web: http://www.yottayotta.com