[Bf-committers] AMD64 bit support issues
Ken Hughes
khughes at pacific.edu
Mon Nov 7 21:28:35 CET 2005
Jorrit Tyberghein wrote:
> Note that on 64-bits linux a long is 64bits.
> On 11/6/05, Timothy Kanters <tkanters at gmail.com> wrote:
>>On 11/6/05, Ken Hughes <khughes at pacific.edu> wrote:
>>>One of the links someone sent earlier points out that a long is 32-bits
>>A long is indeed 32bits but you have got __int64 under windows .
Yes, looking at the link for LP64 that Ton sent:
http://developer.apple.com/macosx/images/lp64compare.gif
the only place sizeof(long) != sizeof(pointer) is 64-bit windows.
Here's how I see it:
Everywhere except 64-bit windows (what the heck is that called anyway?
win64?) we could get away with long, but for win64 we'd have to hack
with "#if defined()" a special pointer type (__int64 or long long)
anyway. To me it seems cleaner to not put those "#if defined()" in each
module but to put them into one header file which is (should be) used by
each file doing funny pointer-to-math casts. We can call the type PTR
or POINTER or FRED or whatever (or use the pre-defined intptr_t).
I'd like to take some of the patches which have been submitted and clean
try to get the source fixed up prior to the 2.40 cvs freeze, and we
could go for now with using longs. But it would be nice to fix it now
for all the platforms.
Ken
More information about the Bf-committers
mailing list