]> granicus.if.org Git - curl/commitdiff
--libcurl: use *_LARGE options with typecasted constants
authorDaniel Stenberg <daniel@haxx.se>
Tue, 6 Jul 2010 17:19:52 +0000 (19:19 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 6 Jul 2010 17:19:52 +0000 (19:19 +0200)
In the generated code --libcurl makes, all calls to curl_easy_setopt()
that use *_LARGE options now have the value typecasted to curl_off_t, so
that it works correctly for 32bit systems with 64bit curl_off_t type.

src/main.c

index 5827b5ed4abafeff8bac9d4d03eaa390367f71ce..0618b6fbded369c95fef7efdcefc8699d8ec8a24 100644 (file)
@@ -4118,7 +4118,7 @@ static CURLcode _my_setopt(CURL *curl, bool str, struct Configurable *config,
   }
   else {
     curl_off_t oval = va_arg(arg, curl_off_t);
-    snprintf(value, sizeof(value), "%" CURL_FORMAT_CURL_OFF_T, oval);
+    snprintf(value, sizeof(value), "(curl_off_t)%" CURL_FORMAT_CURL_OFF_T, oval);
     ret = curl_easy_setopt(curl, tag, oval);
   }