Re: determining 32 v. 64 bit compilatio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 29 Jun 2010, Russ Allbery wrote:
I suspect that you're dealing with "all the world is Linux" code, and
therefore doing something like:

AC_CHECK_SIZEOF([long])
AS_IF([test "$ac_cv_sizeof_long" -eq 8],
   [AC_DEFINE([OSBIT], 64, [Define to the size of a long in bits.])],
   [AC_DEFINE([OSBIT], 32, [Define to the size of a long in bits.])])

would do what you want, but you won't find something exactly like that
built into Autoconf since it's not generally a meaningful thing to do on a
broader variety of platforms.

More specifically, this test would not be very useful for Microsoft Windows where the 'long' type is 32-bit in a 64-bit application.

There are also OSs which support various optional application models with various sizes for 'long' and pointers.

Bob
--
Bob Friesenhahn
bfriesen@xxxxxxxxxxxxxxxxxxx, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux