diff options
Diffstat (limited to 'src/compat.h')
-rw-r--r-- | src/compat.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/compat.h b/src/compat.h index 706221692b..c910f01cb4 100644 --- a/src/compat.h +++ b/src/compat.h @@ -1,19 +1,24 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2009-2012 The Bitcoin developers +// Copyright (c) 2009-2013 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef _BITCOIN_COMPAT_H -#define _BITCOIN_COMPAT_H 1 +#define _BITCOIN_COMPAT_H #ifdef WIN32 +#ifdef _WIN32_WINNT +#undef _WIN32_WINNT +#endif #define _WIN32_WINNT 0x0501 #define WIN32_LEAN_AND_MEAN 1 #ifndef NOMINMAX #define NOMINMAX #endif +#ifdef FD_SETSIZE +#undef FD_SETSIZE // prevent redefinition compiler warning +#endif #define FD_SETSIZE 1024 // max number of fds in fd_set #include <winsock2.h> -#include <mswsock.h> #include <ws2tcpip.h> #else #include <sys/types.h> @@ -26,12 +31,10 @@ #include <ifaddrs.h> #endif -typedef u_int SOCKET; #ifdef WIN32 -#define MSG_NOSIGNAL 0 #define MSG_DONTWAIT 0 -typedef int socklen_t; #else +typedef u_int SOCKET; #include "errno.h" #define WSAGetLastError() errno #define WSAEINVAL EINVAL |