Re: Checking $host for 64-bit code generation

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

 



On Mon, 23 Jun 2008, Ralf Wildenhues wrote:

What is 64-bit code, and why do you need to know in your program?

A very good question.

Both are serious questions, and LONG_MAX/ULONG_MAX, CHAR_BIT and
AC_CHECK_SIZEOF for int, long, or a pointer type, may be part of
the answer to your question.  Of course, many programs don't need
to know or check for any of this at all and are still portable to
"64-bit" systems, or even systems with 48 bit types, which is Good.

A 64-bit application uses 64-bit pointers. It is possible that 'long' is either 32-bit or 64-bit. Some 64-bit environments (e.g. 64-bit Windows) may require specifying 'long long' or some proprietary type in order to obtain a 64-bit integer value.

Autoconf already provides an excellent mechanism for determining the size of types. This allows for testing the size of pointers and the size of various integral types.

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