summaryrefslogtreecommitdiff
path: root/win/inspircd_win32wrapper.h
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2009-08-15 05:02:29 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2009-08-15 05:02:29 +0000
commitb50bf7a2cea86f53d971460591ac48e29f4f61a0 (patch)
tree4f5c120b7e101bd72f47d83e9289c07611fc2604 /win/inspircd_win32wrapper.h
parentfe97bfba2c13020ff4f5b5a777542fe7a783d510 (diff)
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
Diffstat (limited to 'win/inspircd_win32wrapper.h')
-rw-r--r--win/inspircd_win32wrapper.h14
1 files changed, 8 insertions, 6 deletions
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);