cURL / Mailing Lists / curl-library / Single Mail

curl-library

problem with curl 7.35 using MinGW

From: LM <lmemsm_at_gmail.com>
Date: Tue, 11 Feb 2014 15:28:57 -0500

Hope this is the right place to report this.

I was using curl 7.32. Just rebuilt curl using version 7.35. I'm
using MinGW (from www.mingw.org) and msys on Windows as my build
system. I ran some test pages with curl 7.35. One of the pages I
tried was at the curl web site:
curl -v 'http://curl.haxx.se/download/'

The page downloaded fine with curl 7.32, but failed with 7.35 with the
following error:
curl: (56) Problem (2) in the Chunked-Encoded data

Was curious to see what the difference was between 7.32 and 7.35.
Noticed that 7.32 was using strtoul and 7.35 defines curlx_strtoofft
as strtoll. Added the following patch below and the page downloads
fine again as do the other pages I was testing.

Sincerely,
Laura
http://www.distasis.com/cpp

diff -Naurp src/curl-7.35.0/lib/strtoofft.h tmp/curl-7.35.0/lib/strtoofft.h
--- src/curl-7.35.0/lib/strtoofft.h 2013-09-08 18:11:15 -0400
+++ tmp/curl-7.35.0/lib/strtoofft.h
@@ -42,7 +42,11 @@

 #if (CURL_SIZEOF_CURL_OFF_T > CURL_SIZEOF_LONG)
 # ifdef HAVE_STRTOLL
+#ifdef __MINGW32__
+# define curlx_strtoofft strtoul
+#else
 # define curlx_strtoofft strtoll
+#endif
 # else
 # if defined(_MSC_VER) && (_MSC_VER >= 1300) && (_INTEGRAL_MAX_BITS >= 64)
        _CRTIMP __int64 __cdecl _strtoi64(const char *, char **, int);
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-02-11