cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: LONG_MAX patch

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 15 Jan 2004 16:19:27 +0100 (CET)

On Thu, 15 Jan 2004, Gisle Vanem wrote:

> > Doesn't windows provide an 'off_t' type larger than 32 bits? If so, then
>
> No, 'off_t' (actually '_off_t') is 'long' on all I've checked (MSVC v6,
> MingW Watcom and Digital Mars).

Ok, then we don't currently support large files completely on Windows...

> > I would guess that Windows has support for large files somehow!
>
> Natively it does, but in the various libc it's little support for it. There
> is fstati64(), telli64(), lseeki64() etc. in MingW/MSVC (not the libc, but
> in the MSVCRT.DLL), so resuming >2GB files should work.

The code uses 'off_t' for large resume index and since that is 32 bit only...

> They all have 64-bit longs ('long long' or '__int64'). So 'filesize_t'
> should be careful not to use use 64 bit file-offsets.

filesize_t is not used, we use off_t internally and in the API to pass along
large file sizes where needed.

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
Received on 2004-01-15