On Wed, 29 Dec 2010, Pierre Joye wrote:
>> 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).
Right, but it is that "should" part that makes me concerned and what makes me
less reluctant to switch to SSIZE_T like that. It suddenty puts us in a cat
and mouse race where we need to make sure that we include the correct headers
in the correct order for the compilers people want to use.
>> 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.
Sorry, but you can't play that pedantic card on us. Quite clearly *every*
32bit windows installation that ever tried libssh2 or libcurl work fine with
ssize_t set to int. To my knowledge, all win64 installations work fine with
ssize_t set to __int64 (we've used that in libcurl for quite some time
already and I'm not aware of any problems caused by that).
Nobody can on a whim change those types on existing platforms to something
else.
Which Windows systems don't use int or __int64 for ssize_t?
-- / daniel.haxx.se _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-develReceived on 2010-12-29