On Mon, Jun 01, 2009 at 12:51:31PM +0000, Stuart Henderson wrote:
On 2009-06-01, Ted Walther <t...@enumera.com> wrote:
I'm preparing a port of newLISP. Is there a simple test I can run to
find out if the host platform is 64bit? A #define has to be set in the
code according to whether the platform is 64bit or not.
We set _LP64 and __LP64__ variables on 64-bit arch.
$ cpp -dM /dev/null | grep LP64
#define _LP64 1
#define __LP64__ 1
Thank you Stuart. It looks like all platforms with gcc support these
two defines. Is there any reason to prefer one or another? Google
found a netbsd post where someone said to prefer _LP64, then another
person said that is only for kernel use, use __arch64__ in userland.
Ted
--
There's a party in your skull. And you're invited!
Name: Ted Walther
Phone: 604-755-7732
Skype: tederific
Email: t...@reactor-core.org
Address: 1755 246 St, LANGLEY BC V2Z1G4