cURL / Mailing Lists / curl-library / Single Mail


Re: Issue with http_chunks.c

From: Glen A Johnson Jr. <>
Date: Mon, 21 Jul 2014 23:34:15 -0400


Date: Sun, 20 Jul 2014 22:39:09 +0200 (CEST)

From: Daniel Stenberg < <> >

To: libcurl development <
<> >

Subject: Re: . Re: Issue with http_chunks.c

Message-ID: <
<> >

Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed


>On Sun, 20 Jul 2014, Glen A Johnson Jr. wrote:


>> I'm using visual studio 2013.

>> With a 64 bit compile size_t is an 8 byte value.

>> ssize_t which is typedefed as long is a 4 byte value;


>Oh, yeah that's wrong. On win64 ssize_t cannot be a long, it needs to be a
proper 64bit value, size_t but signed.


>> I don't think this is specific to visual studio however some Unix

>> systems probably allocate long as 8 bytes in a 64bit build. Given the

>> existing code listed below:


>All 64 bit systems known to man *except* win64, use 64bit longs. So yeah,
this is a win64 specific problem.


>Where is ssize_t typedefed to a long? Shouldn't it be defined to use
__int64 in lib/config-win32.h on line 379 ?


The project was imported with cmake so HAVE_CONFIG_H was defined at line 39
of curl_setup.h therefore curl_config.h (output from CMAKE) is used and on
line 941 of curl_config.h ssize_t is defined as long.


I removed the HAVE_CONFIG_H define and added the ldap library that cmake had
disabled and the problem is corrected.




Glen Johnson

Phone: 321-696-3122



List admin:
Received on 2014-07-22