cURL / Mailing Lists / curl-library / Single Mail


RE: large file support

From: Greg Hewgill <>
Date: Thu, 12 Feb 2004 16:52:54 -0600

I looked at the transfer.c in cvs today and it still declares the contentlength variable as a long. So I suppose an appropriate fix would be to change it to curl_off_t, then.

I'll keep an eye out for cvs changes since 7.11.0 as I work through this, thanks.

Greg Hewgill

-----Original Message-----
From: codemastr []
Sent: Thursday, February 12, 2004 16:44
To: libcurl development
Subject: Re: large file support

You might want to take a look at some of the changes that have already been
made to curl regarding large file support. I.e. check the CVS as well as
7.11.0. For example, using off_t isn't the best idea since not all systems
have it. Instead curl has a curl_off_t which should work on any system. That
type however was added after 7.11.0 was released. Perhaps it would be a good
idea for you to download a recent CVS snapshot and work from that. Like I
said, there have been some large file changes since 7.11.0 and it would
stink if you spent time fixing something that is already fixed :)

You can get the latest CVS snapshot from <>

Dominick Meglio
----- Original Message -----
From: "Greg Hewgill" <>
To: <>
Sent: Thursday, February 12, 2004 11:26 AM
Subject: large file support

> I'm working on adding large file support (>2GB) to an application that
uses curl. I'm using libcurl 7.11.0 on linux. I found that the
"contentlength" local variable in Curl_readwrite is declared as a "long",
which is only 32 bits wide on my platform. I changed this declaration to
"off_t" and the GET functionality worked for me.
> I'm nowhere near done making all these large file changes, so I'll let you
know if I find anything else in libcurl.
> Greg Hewgill
Received on 2004-02-12