Question about curl_off_t
Date: Mon, 6 Aug 2007 15:46:37 +0200
It seems clear that the idea behind type curl_off_t is a 64bit integer
on platforms supporting it. A 32bit type should only be used on
platforms where no 64bit alternative exists.
However, the default type definition (as off_t) is pretty much dependent
of the compilation mode. For example, systems defining _LARGE_FILES on a
compilation parameter also define off_t as a 64bit integer: this is OK
for libcurl compilation.
However, when compiling an application using libcurl, one may use
"regular" 32bit IO and thus arrange to not define _LARGE_FILES,
resulting in having a 32bit off_t ... and thus a 32-bit curl_off_t too.
This is then in conflict with the libcurl compiled library, and may
cause problem when passing curl_off_t values to curl_easy_setopt()
(there may be other cases, but I did not check them all).
The current implementation forces calling applications to be compiled in
I think curl_off_t type (and associated values) must be determined at
configure time, then substituted into the curl.h header file, in order
to always have coherent definitions. For example from a curl.h.in
file... any other clever idea ???
Received on 2007-08-06