1
1

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.
Этот коммит содержится в:
Pierre Joye 2010-12-29 23:22:00 +01:00 коммит произвёл Daniel Stenberg
родитель 326f741a52
Коммит 306929ee80

Просмотреть файл

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