diff --git a/include/libssh2.h b/include/libssh2.h index 93574e1..432588b 100644 --- a/include/libssh2.h +++ b/include/libssh2.h @@ -73,13 +73,16 @@ typedef unsigned char uint8_t; typedef unsigned int uint32_t; #endif -#if defined(LIBSSH2_WIN32) && defined(_MSC_VER) && (_MSC_VER <= 1400) +#if defined(LIBSSH2_WIN32) && defined(_MSC_VER) +typedef unsigned char uint8_t; +typedef unsigned int uint32_t; +# ifndef _SSIZE_T_DEFINED +typedef int ssize_t; +# define _SSIZE_T_DEFINED +# if (_MSC_VER <= 1400) typedef unsigned __int64 libssh2_uint64_t; typedef __int64 libssh2_int64_t; -typedef unsigned int uint32_t; -#ifndef _SSIZE_T_DEFINED -typedef int ssize_t; -#define _SSIZE_T_DEFINED +# endif #endif #else typedef unsigned long long libssh2_uint64_t; diff --git a/src/libssh2_priv.h b/src/libssh2_priv.h index ba0f883..fd570e4 100644 --- a/src/libssh2_priv.h +++ b/src/libssh2_priv.h @@ -40,13 +40,6 @@ #ifndef LIBSSH2_PRIV_H #define LIBSSH2_PRIV_H 1 -#ifdef _MSC_VER - typedef unsigned __int8 uint8_t; - #ifndef _CRT_SECURE_NO_DEPRECATE - #define _CRT_SECURE_NO_DEPRECATE 1 - #endif /* _CRT_SECURE_NO_DEPRECATE */ -#endif /* _MSC_VER */ - #define LIBSSH2_LIBRARY #include "libssh2_config.h" diff --git a/win32/libssh2_config.h b/win32/libssh2_config.h index 4fce0e3..2e5c5d1 100644 --- a/win32/libssh2_config.h +++ b/win32/libssh2_config.h @@ -19,12 +19,12 @@ #define HAVE_SELECT #ifdef _MSC_VER +#ifndef _CRT_SECURE_NO_DEPRECATE +#define _CRT_SECURE_NO_DEPRECATE 1 +#endif /* _CRT_SECURE_NO_DEPRECATE */ #define snprintf _snprintf #if _MSC_VER < 1500 #define vsnprintf _vsnprintf -#else -#define ssize_t SSIZE_T -#define uint32_t UINT32 #endif #define strncasecmp _strnicmp #define strcasecmp _stricmp @@ -41,4 +41,3 @@ #endif /* LIBSSH2_CONFIG_H */ -