autoconf
[Top][All Lists]
Advanced

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

Re: getting a 64 bit integer type


From: Alexandre Oliva
Subject: Re: getting a 64 bit integer type
Date: 04 Jul 2001 08:00:55 -0300
User-agent: Gnus/5.090003 (Oort Gnus v0.03) XEmacs/21.4 (Academic Rigor)

On Jun 28, 2001, Peter Eisentraut <address@hidden> wrote:

> Dale E Martin writes:
>> Is there a way to get a system's 64 bit integer type using autoconf?

> Check the size of 'long int' and 'long long int' and use the first one of
> size 8.

This won't necessarily get you a 64-bit integer type.  There are
machines with 16-bit chars, in which sizeof long long == 4, assuming
long long is 64-bits wide.  Besides, there's no guarantee that there
will be *any* 64-bits type.  In C89, the widest data type you could
count on was long, with at least 32 bits.  In C99, there is long long,
with at least 64 bits, but it might well be 72 bits if someone ported
a C99 compiler to one of those old 9-bits-per-byte machines.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  address@hidden, redhat.com}
CS PhD student at IC-Unicamp        address@hidden, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me



reply via email to

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