cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: LONG_MAX patch

From: Mark Pizzolato <curl-library-20031003_at_reg.pizzolato.net>
Date: Thu, 15 Jan 2004 13:49:25 -0800

Well,you could use the undocumented i64() interfaces mentioned below, hoever
there really aren't include files which document them. They are, by design,
for internal use of the CRTL.

Meanwhile, the clean way to do this on windows is to either directly or
indirectly use: fgetpos(), and fsetpos(). As it turns out, on Win32
environments, a pos_t is an int64, writing a Win32 specific fseeko() wrapper
function is sort of trivial.

- Mark

----- Original Message -----
From: "Daniel Stenberg" <daniel-curl_at_haxx.se>
To: "libcurl Mailing list" <curl-library_at_lists.sourceforge.net>
Sent: Thursday, January 15, 2004 7:19 AM
Subject: Re: LONG_MAX patch

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
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
Received on 2004-01-15