autoconf
[Top][All Lists]
Advanced

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

Re: Checking $host for 64-bit code generation


From: Bob Friesenhahn
Subject: Re: Checking $host for 64-bit code generation
Date: Mon, 23 Jun 2008 16:27:24 -0500 (CDT)

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
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]