mirror of
https://github.com/libssh2/libssh2.git
synced 2025-07-28 01:41:49 +03:00
delete redundant HAVE_WINSOCK2_H
`libssh2.h` required `winsock2.h` for `_WIN32` since81d53de4dc
(2011-06-04). Apply that to the whole codebase. This makes it unnecessary to detect `HAVE_WINSOCK2_H` and allows to drop all its uses. Completes TODO fromb66d7317ca
TODO: Straighten out the use a mixture of `HAVE_WINDOWS_H`, `WIN32`, `_WIN32` to detect Windows.
This commit is contained in:
committed by
Viktor Szakats
parent
ba53142e0e
commit
eb236329c4
@ -17,8 +17,9 @@
|
||||
#include <libssh2.h>
|
||||
#include <libssh2_sftp.h>
|
||||
|
||||
#ifdef HAVE_WINSOCK2_H
|
||||
#ifdef WIN32
|
||||
# include <winsock2.h>
|
||||
# define write(f, b, c) write((f), (b), (unsigned int)(c))
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
@ -49,10 +50,6 @@
|
||||
#pragma warning(disable:4127)
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#define write(f, b, c) write((f), (b), (unsigned int)(c))
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GETTIMEOFDAY
|
||||
/* diff in ms */
|
||||
static long tvdiff(struct timeval newer, struct timeval older)
|
||||
|
Reference in New Issue
Block a user