mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-07 02:39:48 +09:00
Fixed building libssh with MSVC.
Thanks to Carlo Segato for the patch.
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
typedef uint32_t mode_t;
|
||||
#else /* _MSC_VER */
|
||||
#include <unistd.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
@@ -34,6 +34,10 @@
|
||||
#define snprintf _snprintf
|
||||
/** Imitate define of inttypes.h */
|
||||
#define PRIdS "Id"
|
||||
#define strcasecmp _stricmp
|
||||
#define strncasecmp _strnicmp
|
||||
#define strtoull _strtoui64
|
||||
#define isblank(ch) ((ch) == ' ' || (ch) == '\t' || (ch) == '\n' || (ch) == '\r')
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#define PRIdS "zd"
|
||||
|
||||
@@ -61,9 +61,6 @@ extern "C" {
|
||||
typedef uint32_t gid_t;
|
||||
#endif /* gid_t */
|
||||
#ifdef _MSC_VER
|
||||
#ifndef mode_t
|
||||
typedef uint32_t mode_t;
|
||||
#endif /* mode_t */
|
||||
#ifndef ssize_t
|
||||
typedef _W64 signed int ssize_t;
|
||||
#endif /* ssize_t */
|
||||
|
||||
Reference in New Issue
Block a user