cleaned up MSVC ifdefs which where spreaded over 3 places.
This commit is contained in:
parent
aad74b7fa6
commit
86c935317c
@ -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;
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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 */
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user