From c34e1d8735d9b7d0dfc8fd08621b141094b0fee1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 7 Oct 2010 15:33:24 +0200 Subject: [PATCH] libssh2_socket_t: now externally visible In preparation for upcominig changes, the libssh2_socket_t type is now typedef'ed in the public header. --- include/libssh2.h | 7 +++++++ src/libssh2_priv.h | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/libssh2.h b/include/libssh2.h index 0c89b524..8c991825 100644 --- a/include/libssh2.h +++ b/include/libssh2.h @@ -130,6 +130,13 @@ typedef unsigned long long libssh2_uint64_t; typedef long long libssh2_int64_t; #endif +#ifdef WIN32 +typedef SOCKET libssh2_socket_t; +#else /* !WIN32 */ +typedef int libssh2_socket_t; +#define INVALID_SOCKET -1 +#endif /* WIN32 */ + /* Part of every banner, user specified or not */ #define LIBSSH2_SSH_BANNER "SSH-2.0-libssh2_" LIBSSH2_VERSION diff --git a/src/libssh2_priv.h b/src/libssh2_priv.h index 037e7810..46df0102 100644 --- a/src/libssh2_priv.h +++ b/src/libssh2_priv.h @@ -145,13 +145,6 @@ static inline int writev(int sock, struct iovec *iov, int nvecs) #endif -#ifdef WIN32 -typedef SOCKET libssh2_socket_t; -#else /* !WIN32 */ -typedef int libssh2_socket_t; -#define INVALID_SOCKET -1 -#endif /* WIN32 */ - /* RFC4253 section 6.1 Maximum Packet Length says: * * "All implementations MUST be able to process packets with