mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
priv: Add ssize_t if not available with MSVC
Fixes T113 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Tested-by: Wolf Wolfswinkel <wolf.wolfswinkel@objectplus.nl>
This commit is contained in:
@@ -29,6 +29,7 @@
|
|||||||
#ifndef _LIBSSH_PRIV_H
|
#ifndef _LIBSSH_PRIV_H
|
||||||
#define _LIBSSH_PRIV_H
|
#define _LIBSSH_PRIV_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@@ -128,6 +129,13 @@ char *strndup(const char *s, size_t n);
|
|||||||
# endif /* HAVE__VSNPRINTF */
|
# endif /* HAVE__VSNPRINTF */
|
||||||
# endif /* HAVE__VSNPRINTF_S */
|
# endif /* HAVE__VSNPRINTF_S */
|
||||||
|
|
||||||
|
# ifndef _SSIZE_T_DEFINED
|
||||||
|
# undef ssize_t
|
||||||
|
# include <BaseTsd.h>
|
||||||
|
typedef _W64 SSIZE_T ssize_t;
|
||||||
|
# define _SSIZE_T_DEFINED
|
||||||
|
# endif /* _SSIZE_T_DEFINED */
|
||||||
|
|
||||||
# endif /* _MSC_VER */
|
# endif /* _MSC_VER */
|
||||||
|
|
||||||
struct timeval;
|
struct timeval;
|
||||||
|
|||||||
@@ -53,9 +53,14 @@ extern "C" {
|
|||||||
typedef uint32_t gid_t;
|
typedef uint32_t gid_t;
|
||||||
#endif /* gid_t */
|
#endif /* gid_t */
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#ifndef ssize_t
|
|
||||||
typedef _W64 SSIZE_T ssize_t;
|
# ifndef _SSIZE_T_DEFINED
|
||||||
#endif /* ssize_t */
|
# undef ssize_t
|
||||||
|
# include <BaseTsd.h>
|
||||||
|
typedef _W64 SSIZE_T ssize_t;
|
||||||
|
# define _SSIZE_T_DEFINED
|
||||||
|
# endif /* _SSIZE_T_DEFINED */
|
||||||
|
|
||||||
#endif /* _MSC_VER */
|
#endif /* _MSC_VER */
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user