cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: . Re: Issue with http_chunks.c

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 20 Jul 2014 22:39:09 +0200 (CEST)

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 ?

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-07-20