curl-library
Re: Helping apps use 64bit with libcurl
Date: Mon, 26 May 2008 14:51:23 +0200 (CEST)
On Mon, 26 May 2008, Michal Marek wrote:
> And more important, applications compiled against current headers will
> continue to use the 30120 option code regardless of the size of curl_off_t.
Yeah, but I think whatever method we come up with may have its biggest impact
and ways to improve things for programs that are (re)compiled with our new
magic in the header files. The existing apps will continue to behave as they
do today. Especially since I want to do this without breaking the ABI...
I think I favor a way to let the configure script generate a header in
include/curl with the size of the curl_off_t variable within libcurl. The
header would exist by default for non-configure based systems, and in that
file it would simply guess the size.
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.
If it detects that the app builds without LFS but the lib is built with it,
then it can in fact redefine the LARGE options to the non-LARGE defines after
the warning has been issued.
If it detects that the app builds with LFS but the lib is built without it,
then we should make the app get errors if it tries to use the LARGE options.
-- / daniel.haxx.seReceived on 2008-05-26