On Fri Sep 30, 2005 at 10:17:03 +1000, Erik de Castro Lopo wrote:
>Robert Collins wrote:
>
>> I'd try 64-bit sparc, ia-64 and amd-64 in 64 bit mode for comparison.
>
>This is OS dependant.
>
>All 64 bit Linux versions use the LP64 model where longs and
>pointers are 64 bit. Solaris on UltraSparc does the same and I
>haven't played with Solaris on amd-64 so I can't say. I have
>heard of certain old school 64 bit Unices where long was 32 
>bits but I think they died out when Uninx98 or Posix whatever
>decided that 64 bit unix should be LP64.
>
>One of the odd ones out of course is win64, where both int
>and long are 32 bits and pointers are 64 bits. Yep its nuts,
>but it is m$.

And of course if you really care about the size of the types then
you can use uint8_t, uint16_t, uint32_t, uint64_t, (drop the u
for signed types). And then there is uintptr_t for a type that is
going to be and integer large enough to hold a pointer.

(Of course using printf then becomes a real bitch...)

Benno
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to