cURL / Mailing Lists / curl-library / Single Mail


Re: int64_t vs long long

From: Daniel Stenberg <>
Date: Fri, 13 Jun 2008 00:17:06 +0200 (CEST)

On Thu, 12 Jun 2008, Yang Tse wrote:

> Given a compiler/system that has an intrinsec 64-bit "long long" data type
> and an "int64_t" declared in <stdint.h>" which one should we prefer for
> curl_off_t ?

I don't think it matters. The define will be hw-specific so if long long and
int64_t is equally sized they can be used interchangably. The upside with
long long is that it works without any include files - but of course may not
work on pre-C99 systems.

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.

Received on 2008-06-13