From b50bf7a2cea86f53d971460591ac48e29f4f61a0 Mon Sep 17 00:00:00 2001 From: w00t Date: Sat, 15 Aug 2009 05:02:29 +0000 Subject: win: don't define error constants on VS2009, they're defined for us (finally) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11520 e03df62e-2008-0410-955e-edbf42e46eb7 --- win/inspircd_win32wrapper.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'win') diff --git a/win/inspircd_win32wrapper.h b/win/inspircd_win32wrapper.h index 32dc7fea1..718958166 100644 --- a/win/inspircd_win32wrapper.h +++ b/win/inspircd_win32wrapper.h @@ -103,12 +103,14 @@ typedef unsigned __int32 uint32_t; #define popen _popen #define pclose _pclose -/* Error macros need to be redirected to winsock error codes */ -#define ETIMEDOUT WSAETIMEDOUT -#define ECONNREFUSED WSAECONNREFUSED -#define EADDRINUSE WSAEADDRINUSE -#define EINPROGRESS WSAEWOULDBLOCK -#define EADDRNOTAVAIL WSAEADDRNOTAVAIL +/* Error macros need to be redirected to winsock error codes, apart from on VS2010 *SIGH* */ +#if _MSC_VER < 1600 + #define ETIMEDOUT WSAETIMEDOUT + #define ECONNREFUSED WSAECONNREFUSED + #define EADDRINUSE WSAEADDRINUSE + #define EINPROGRESS WSAEWOULDBLOCK + #define EADDRNOTAVAIL WSAEADDRNOTAVAIL +#endif /* Convert formatted (xxx.xxx.xxx.xxx) string to in_addr struct */ CoreExport int insp_inet_pton(int af, const char * src, void * dst); -- cgit v1.2.3