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. -BorisReceived 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