1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-03 22:13:11 +03:00

Define INVALID_SOCKET and use it instead of SOCKET_BAD.

Revert the part of previous commit that defines SOCKET_BAD library wide.
This commit is contained in:
Daiki Ueno
2009-12-25 10:04:34 +09:00
parent 8436e45ea6
commit d00e97a7f1
2 changed files with 7 additions and 5 deletions

View File

@@ -151,10 +151,8 @@ static inline int writev(int sock, struct iovec *iov, int nvecs)
#ifdef WIN32
typedef SOCKET libssh2_socket_t;
#define SOCKET_BAD ~0
#else /* !WIN32 */
typedef int libssh2_socket_t;
#define SOCKET_BAD -1
#endif /* WIN32 */
/* RFC4253 section 6.1 Maximum Packet Length says: