Re: how to tell 64 vs 32 bit architecture ?

From: Boris Kochergin <spawk_at_acm.poly.edu>
Date: Fri, 07 Sep 2007 01:57:50 -0400
I don't know about 100% portable, but the following works across 
FreeBSD, Linux, and Solaris since at least GCC 2.95: __LONG_BIT (as 
found in /usr/include/machine/_limits.h on FreeBSD) is #defined as 32 on 
32-bit machines and 64 on 64-bit machines. I suspect it may even be part 
of a standard as the comments at the top of that file indicate so.

-Boris
Received on Fri Sep 07 2007 - 04:24:51 UTC

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