cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURL doesn't support 64-bits file on Linux

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 22 Nov 2004 20:17:25 +0100 (CET)

On Mon, 22 Nov 2004, Wei Weng wrote:

> If you try to download a large file (bigger than 2GB) on Linux using CURL
> binary compiled with no special flags (during ./configure), it will give you
> a "File size limit exceeded" error when exactly 2GB file size is reached.

It doesn't for me and for many other people.

Who would say such a thing? libcurl has no string like nor does it have any
check for maximum file size, it would instead fail to parse the number when
used.

What Linux version is this? What target file system do you store the download
on?

> The reason is that we use FILE streams in CURL to fopen/fwrite large files,
> but FILE streams don't support 64bits operations by default. Either you need
> to compile with some flags or use some other 64bits file stream functions.

Check the configure output again and you see that it checks for what defines
to set to build for large file support and it then sets them. curl/libcurl
builds with large file support on all modern unix systems I've seen it build
on.

> Or, you can wrap the file descriptor functions and use them instead.
> (open->open64, write->write, read->read, close->close).

No need to do that.

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-11-22