cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: >2 GB file support

From: Rob Braun <bbraun_at_synack.net>
Date: Wed, 13 Aug 2003 00:03:26 -0700

On Tue, Aug 12, 2003 at 11:46:09PM -0700, Dan Fandrich wrote:
>
> This is great news! The patch somehow seems shorter than I thought it would
> be solve this problem.

Yes, it does seem rather short... However, it also does accomplish
the task of downloading the large files. =)
Perhaps there's aspects of the problem I'm not getting, which I'd
love to hear about.

> A solution to #4 is something like this in a header file:
>
> #ifdef LARGE_FILE_SUPPORT
> #define FILESIZE_FMT "%lld"
> #else
> #define FILESIZE_FMT "%ld"
> #endif
>
> used like this:
>
> printf("transfer closed with " FILESIZE_FMT " bytes remaining to read", sz);

I'll submit a new patch in ~15 hours which uses that.

> It looks like the API is going to have to change to properly support
> large files. If the move is made to 64 bit ints and the API changed,
> I'd like to see the new progress callbacks also changed to use long longs
> instead of floats. It's useful sometimes, especially on some embedded
> processors, to eliminate use of floats entirely and an API change is a
> good excuse to do it. That float usage has always seemed a bit odd to
> me since you can't depend on the numbers in the callback to be exact.

It appears that none of the changes I made affect public API, so
clients of libcurl will hopefully be unaffected. I'll also test this
before submitting a revised version of the patch.

Rob

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-08-13