cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Helping apps use 64bit with libcurl

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 20 May 2008 22:17:56 -0700

On Tue, May 20, 2008 at 11:28:42PM +0100, Jamie Lokier wrote:
> Suggestion: let the *_LARGE constants have different values at compile
> time, determined by the header file, according to the size of curl_off_t.
>
> Programs compiled with one size, and linked to a library compiled with
> a different size, will give sensible error results due to the
> mismatched constants, instead of random failues or even spurious
> successes.

That's not a bad idea--a run-time check would be straightforward, although
a compile-time one would be nicer for the user. Another way would be
to do something like replace curl_easy_init (or curl_global_init or something
else) with a macro like this:

#define curl_easy_init() curl_easy_init_checksize(sizeof(off_t))

and let the library verify it. This means more overhead, though, so I'm
more in favour of the renamed config.h trick.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-05-21