cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Helping apps use 64bit with libcurl

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 26 May 2008 18:01:10 +0200 (CEST)

On Mon, 26 May 2008, Jamie Lokier wrote:

> Daniel Stenberg wrote:
>> Then, we could extend our current check in curl/include/curl.h and make
>> that #warn if curl_off_t is > 4 bytes but no LFS define is set. That check
>> really only works on POSIX-like systems.
>
> On platforms which have always historically been 64-bit, isn't it normal to
> have sizeof(off_t) == 8 with no LFS define? I.e. the LFS define makes no
> difference, so some apps might reasonably not use it on those platforms.

Ah, yes - good thinking! The configure magic rather needs to be somewhat more
magic.

The size of curl_off_t is not enough, we probably also need to know the size
of long so that we know if there's a difference between them that can cause
trouble.

In the header:

If there's no LFS define to be found, and size of long equals size of
curl_off_t, we can probably assume that the LARGE options work as wanted.

-- 
  / daniel.haxx.se
Received on 2008-05-26