On 2009-06-01, Ted Walther <[email protected]> wrote:
> On Mon, Jun 01, 2009 at 12:51:31PM +0000, Stuart Henderson wrote:
>>On 2009-06-01, Ted Walther <[email protected]> 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.

I'm not sure which is preferred, but __LP64__ seems slightly more 
common in the wild.

Reply via email to