PACK should be defined different for Win32 based on whether

we compile with Mingw or MSVC
This commit is contained in:
twinaphex 2017-08-30 19:53:26 +02:00
parent 157d04b2a5
commit 553c7083ca

View File

@ -51,7 +51,6 @@ class PointerWrap;
#include <errno.h>
#endif
#ifdef _WIN32
#define PACK
#undef errno
#undef ECONNABORTED
#undef ECONNRESET
@ -73,10 +72,17 @@ inline bool connectInProgress(int errcode){ return (errcode == WSAEWOULDBLOCK ||
#define INVALID_SOCKET -1
#define SOCKET_ERROR -1
#define closesocket close
#define PACK __attribute__((packed))
inline bool connectInProgress(int errcode){ return (errcode == EINPROGRESS || errcode == EALREADY); }
#endif
#ifdef _WIN32
#ifdef _MSC_VER
#define PACK
#else
#define PACK __attribute__((packed))
#endif
#endif
#ifndef POLL_ERR
#define POLL_ERR 0x008 /* Error condition. */
#endif