core: make sure we use the correct win32 socket errno:s

Modern versions of MinGW and Visual Studio provide socket errno
defines that make no sense (no API sets them). Make sure we
continue to use the old WSAE ones that are actually returned by
Windows' socket API.

Signed-off-by: Pierre Ossman <ossman@cendio.se>
This commit is contained in:
Pierre Ossman 2015-05-29 16:39:45 +02:00 committed by Tanu Kaskinen
parent 1db12f5010
commit d284d90d5f
2 changed files with 90 additions and 12 deletions

View file

@ -7,18 +7,7 @@
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#define ESHUTDOWN WSAESHUTDOWN
#define ECONNRESET WSAECONNRESET
#define ECONNABORTED WSAECONNABORTED
#define ENETRESET WSAENETRESET
#define EINPROGRESS WSAEINPROGRESS
#define EAFNOSUPPORT WSAEAFNOSUPPORT
#define ETIMEDOUT WSAETIMEDOUT
#define ECONNREFUSED WSAECONNREFUSED
#define EHOSTUNREACH WSAEHOSTUNREACH
#define EWOULDBLOCK WSAEWOULDBLOCK
#define EADDRINUSE WSAEADDRINUSE
#include "winerrno.h"
typedef long suseconds_t;