From c2ade861feec6227333269378a435dc192696b9b Mon Sep 17 00:00:00 2001 From: deuce <> Date: Thu, 5 Sep 2013 23:25:45 +0000 Subject: [PATCH] Pretend Borland compilers are Microsoft compilers so that they don't use GCC conventions when using the ws2tcpip.h that comes with Borland (sigh). --- src/xpdev/sockwrap.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/xpdev/sockwrap.h b/src/xpdev/sockwrap.h index f3f2603a15..9877c9e1d2 100644 --- a/src/xpdev/sockwrap.h +++ b/src/xpdev/sockwrap.h @@ -48,7 +48,14 @@ #ifndef _WINSOCKAPI_ #include <winsock2.h> /* socket/bind/etc. */ #include <mswsock.h> /* Microsoft WinSock2 extensions */ +#if defined(__BORLANDC__) +// Borland C++ builder 6 comes with a broken ws2tcpip.h header for GCC. +#define _MSC_VER 7 +#endif #include <ws2tcpip.h> /* More stuff */ +#if defined(__BORLANDC__) +#undef _MSC_VER +#endif #define SOCK_MAXADDRLEN sizeof(SOCKADDR_STORAGE) /* Let's agree on a standard WinSock symbol here, people */ #define _WINSOCKAPI_ -- GitLab