From 0f21a20fe3c897ed6dfebf5d3f947199a1f78465 Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Mon, 17 May 2021 19:04:02 -0700 Subject: [PATCH] Move errno windows definitions to IXNetSystem.h --- ixwebsocket/IXNetSystem.h | 13 +++++++++++++ ixwebsocket/IXSocket.h | 14 -------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/ixwebsocket/IXNetSystem.h b/ixwebsocket/IXNetSystem.h index 2bd2e38d..ef57c6bc 100644 --- a/ixwebsocket/IXNetSystem.h +++ b/ixwebsocket/IXNetSystem.h @@ -18,6 +18,19 @@ #include #include +#undef EWOULDBLOCK +#undef EAGAIN +#undef EINPROGRESS +#undef EBADF +#undef EINVAL + +// map to WSA error codes +#define EWOULDBLOCK WSAEWOULDBLOCK +#define EAGAIN WSATRY_AGAIN +#define EINPROGRESS WSAEINPROGRESS +#define EBADF WSAEBADF +#define EINVAL WSAEINVAL + // Define our own poll on Windows, as a wrapper on top of select typedef unsigned long int nfds_t; diff --git a/ixwebsocket/IXSocket.h b/ixwebsocket/IXSocket.h index 4538d63b..5604c40d 100644 --- a/ixwebsocket/IXSocket.h +++ b/ixwebsocket/IXSocket.h @@ -15,20 +15,6 @@ #ifdef _WIN32 #include typedef SSIZE_T ssize_t; - -#undef EWOULDBLOCK -#undef EAGAIN -#undef EINPROGRESS -#undef EBADF -#undef EINVAL - -// map to WSA error codes -#define EWOULDBLOCK WSAEWOULDBLOCK -#define EAGAIN WSATRY_AGAIN -#define EINPROGRESS WSAEINPROGRESS -#define EBADF WSAEBADF -#define EINVAL WSAEINVAL - #endif #include "IXCancellationRequest.h"