[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libssh and Visual C++ (again)


> Replacing ssize_t by int32_t is an ABI breakage under 64 bits platforms
> Replacing ssize_t by int64_t is an ABI breakage under 32 bits platforms
> 
> The definition of ssize_t is : the same bit count as size_t, but signed.
> 
> Christophe
> 

Hi,

I did not follow the whole thread, but based on your description, why not:
#if (sizeof(size_t)==4)
typedef u_int32_t ssh_ssize_t
#else
typedef u_int64_t ssh_ssize_t
#endif

I also wonder if ssize_t is the appropriate type for the return of such
functions. The libc use int for read(2) for a reason.
When did we introduce them in libssh ? if it's a recent patch we could
simply go back to an int.

Aris

Follow-Ups:
Re: libssh and Visual C++ (again)Andreas Schneider <asn@xxxxxxxxxxxxxx>
Re: libssh and Visual C++ (again)"Bernhard R. Link" <brlink@xxxxxxxxxx>
References:
libssh and Visual C++ (again)Christophe Baribaud <christophe.baribaud@xxxxxxxxx>
Re: libssh and Visual C++ (again)Werner Koch <wk@xxxxxxxxx>
Re: libssh and Visual C++ (again)"Bernhard R. Link" <brlink@xxxxxxxxxx>
Re: libssh and Visual C++ (again)Andreas Schneider <asn@xxxxxxxxxxxxxx>
Re: libssh and Visual C++ (again)Christophe Baribaud <christophe.baribaud@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org