Re: how to tell 64 vs 32 bit architecture ?

From: Erich Dollansky <oceanare_at_pacific.net.sg>
Date: Fri, 07 Sep 2007 10:39:15 +0800
Hi,

I have not found a method yet whic works 100% and is portable.

Luigi Rizzo wrote:
> On Thu, Sep 06, 2007 at 03:25:52PM -0400, Yan wrote:

Consider this:

>> Perhaps "if(sizeof(void*)==4) { /* 32 */} else if(sizeof(void*) ==8) { /* 64
>> */ }" ?
>>
and also

sizeof (int)

The rest will be platform specific.

Erich
Received on Fri Sep 07 2007 - 01:07:28 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:17 UTC