cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: strtoll patch

From: Gisle Vanem <gvanem_at_broadpark.no>
Date: Thu, 22 Jan 2004 18:11:06 +0100

"Daniel Stenberg" <daniel-curl_at_haxx.se> said:

> Yes, I've committed code now for using curl_off_t, and thus SIZEOF_CURL_OFF_T
> as well. I even did a little fix for lseek() in lib/file.c based on a comment
> from you on an earlier mail.

I assume SIZEOF_CURL_OFF_T is produced by Configure, but for
Win32/DOS shouldn't it be defined in curl.h? Something like:

--- CVS-latest\include\curl\curl.h Thu Jan 22 12:56:39 2004
+++ include\curl\curl.h Thu Jan 22 17:02:23 2004
@@ -88,6 +88,10 @@
 #endif
 #endif

+#ifndef SIZEOF_CURL_OFF_T
+#define SIZEOF_CURL_OFF_T sizeof(curl_off_t)
+#endif
+
 struct curl_httppost {

and

--- CVS-latest\src\main.c Thu Jan 22 13:46:07 2004
+++ src\main.c Thu Jan 22 16:59:18 2004
@@ -1010,8 +1010,7 @@
 #ifdef HAVE_STRTOLL
   *val = strtoll(str, NULL, 0);
 #else
- /* TODO: Handle strtoll stuff...sigh... */
-#error "lack of strtoll() needs fixing"
+ *val = Curl_strtoll(str, NULL, 0);
 #endif

BTW, curl.h needs to be included in strtoofft.h.

> If we're lucky, the CVS version of libcurl offers large file support on
> windows too! ;-)

I'm ready to try it, but have no >2GB file to test with. I have
a 1.2MBit DSL link, so if anybody knows of a suitable test file, give
me a word.

--gv

-------------------------------------------------------
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-22