Detecting 64bit vs. 32bit Linux
Michael Yanowitz
m.yanowitz at kearfott.com
Mon Jul 10 08:57:07 EDT 2006
The one thing I observed (just an observation) is that:
a) on 32-bit machines:
sizeof(int) = 32
sizeof(long) = 32
b) on 64-bit machines:
sizeof(int) = 32
sizeof(long) = 64
This in C and Python.
Thanks in advance:
Michael Yanowitz
-----Original Message-----
From: python-list-bounces+m.yanowitz=kearfott.com at python.org
[mailto:python-list-bounces+m.yanowitz=kearfott.com at python.org]On Behalf
Of Lawrence D'Oliveiro
Sent: Monday, July 10, 2006 3:11 AM
To: python-list at python.org
Subject: Re: Detecting 64bit vs. 32bit Linux
In article <44aea052$1 at usenet01.boi.hp.com>,
dwelch91 <donald.welch at hp.com> wrote:
>I need to detect whether the operating system I am running on (not the
>Python version) is 64bit or 32bit. One requirement is that I need to
>include support for non-Intel/AMD architectures.
The standard C way would be to check sizeof(void *).
--
http://mail.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list