ssize_t: proper typedef with MSVC compilers

As discussed on the mailing list, it was wrong for win64 and using the
VC-provided type is the safest approach instead of second- guessing
which one it should be.
This commit is contained in:
Pierre Joye 2010-12-29 23:22:00 +01:00 committed by Daniel Stenberg
parent 326f741a52
commit 306929ee80

View File

@ -87,6 +87,10 @@
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _MSC_VER
# include <BaseTsd.h>
# include <WinSock2.h>
#endif
#include <stddef.h>
#include <string.h>
@ -121,9 +125,8 @@ typedef unsigned char uint8_t;
typedef unsigned int uint32_t;
typedef unsigned __int64 libssh2_uint64_t;
typedef __int64 libssh2_int64_t;
# ifndef _SSIZE_T_DEFINED
typedef int ssize_t;
# define _SSIZE_T_DEFINED
#ifndef ssize_t
typedef SSIZE_T ssize_t;
#endif
#else
typedef unsigned long long libssh2_uint64_t;