cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: int64_t vs long long

From: Jamie Lokier <jamie_at_shareable.org>
Date: Fri, 13 Jun 2008 10:19:54 +0100

Yang Tse wrote:
> 2008/6/13, Daniel Stenberg wrote:
>
> > I think there's a theoretical risk that long long isn't the same size as
> > int64_t since long long seems to be defined as "at least 64 bits" in C99.
>
> Initially I'll only use "long long" if the size as reported by
> sizeof() is actually 8, else the other data types will be checked.
>
> Besides 'long long', '__longlong', 'signed __int64', 'long' and
> 'int64_t' does anyone remember other data types that _might_ be "at
> least 64 bits" and signed ?

quad_t, intmax_t, intptr_t, int_least64_t, int_fast64_t.

(Btw, unsigned variations are u_quad_t, u_int64_t).

Oh, and char, short, int, long, wchar_t etc. _might_ be at least 64 bits ;-)

-- Jamie
Received on 2008-06-13