cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl + libssh2: strange error on Win64 (compiled using VS 2008)

From: Pierre Joye <pierre.php_at_gmail.com>
Date: Wed, 29 Dec 2010 22:32:58 +0100

On Wed, Dec 29, 2010 at 10:20 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Wed, 29 Dec 2010, Pierre Joye wrote:
>
>> I would say SSIZE_T, always on Windows. Both int or __int64 can be wrong.
>
> I don't disagree that SSIZE_T might be the right answer, but I do have two
> questions about that:
>
> A) what header(s) would we need to include to be sure SSIZE_T is typedef'ed
> and will those headers be the same on all known Windows compilers?

BaseTsd.h, patch attached. Mingw should have it too or should have
size_t already defined in sys/types.h, at least any decent version
(after 2008 or so). Some versions of mingw may define it as int, which
is not really a good idea as far as I can tell.

btw, unless I'm mistaken, mingw does not support x644. I won't go down
the way of the alternative mingw posted by Vincent, enough pains
already :)

> B) in which case is both int and __int64 wrong for ssize_t ?

All, there are no guaranties that ssize_t is an integer (or long for
what matters), same for size_t.

Cheers,

-- 
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2010-12-29