Merge branch 'master' of https://github.com/DigitalPulseSoftware/NazaraEngine
This commit is contained in:
commit
ce2324ea2a
|
|
@ -9,6 +9,15 @@
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <Nazara/Network/Debug.hpp>
|
#include <Nazara/Network/Debug.hpp>
|
||||||
|
|
||||||
|
// some MinGW distributions seem to lack some defines
|
||||||
|
#ifndef ERROR_NOT_ENOUGH_MEMORY
|
||||||
|
#define ERROR_NOT_ENOUGH_MEMORY 8L
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WSA_NOT_ENOUGH_MEMORY
|
||||||
|
#define WSA_NOT_ENOUGH_MEMORY (ERROR_NOT_ENOUGH_MEMORY)
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Nz
|
namespace Nz
|
||||||
{
|
{
|
||||||
namespace Detail
|
namespace Detail
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@
|
||||||
#include <Nazara/Core/MemoryHelper.hpp>
|
#include <Nazara/Core/MemoryHelper.hpp>
|
||||||
#include <Nazara/Network/Win32/IpAddressImpl.hpp>
|
#include <Nazara/Network/Win32/IpAddressImpl.hpp>
|
||||||
|
|
||||||
#if defined(NAZARA_COMPILER_MINGW) && __GNUC__ < 5
|
|
||||||
// Some compilers (olders versions of MinGW) are lacking Mstcpip.h which defines the following struct/#define
|
// Some compilers (olders versions of MinGW) are lacking Mstcpip.h which defines the following struct/#define
|
||||||
|
#if (defined(__has_include) && !__has_include(<Mstcpip.h>)) || (defined(NAZARA_COMPILER_MINGW) && !defined(__has_include))
|
||||||
struct tcp_keepalive
|
struct tcp_keepalive
|
||||||
{
|
{
|
||||||
u_long onoff;
|
u_long onoff;
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ namespace Nz
|
||||||
#if NAZARA_NETWORK_POLL_SUPPORT
|
#if NAZARA_NETWORK_POLL_SUPPORT
|
||||||
return m_readyToReadSockets.count(socket) != 0;
|
return m_readyToReadSockets.count(socket) != 0;
|
||||||
#else
|
#else
|
||||||
return FD_ISSET(socket, &m_readyToReadSockets) != 0;
|
return FD_ISSET(socket, const_cast<fd_set*>(&m_readyToReadSockets)) != 0; //< FD_ISSET is not const-correct
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -46,7 +46,7 @@ namespace Nz
|
||||||
#if NAZARA_NETWORK_POLL_SUPPORT
|
#if NAZARA_NETWORK_POLL_SUPPORT
|
||||||
return m_readyToWriteSockets.count(socket) != 0;
|
return m_readyToWriteSockets.count(socket) != 0;
|
||||||
#else
|
#else
|
||||||
return FD_ISSET(socket, &m_readyToWriteSockets) != 0;
|
return FD_ISSET(socket, const_cast<fd_set*>(&m_readyToWriteSockets)) != 0; //< FD_ISSET is not const-correct
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -55,8 +55,9 @@ namespace Nz
|
||||||
#if NAZARA_NETWORK_POLL_SUPPORT
|
#if NAZARA_NETWORK_POLL_SUPPORT
|
||||||
return m_allSockets.count(socket) != 0;
|
return m_allSockets.count(socket) != 0;
|
||||||
#else
|
#else
|
||||||
return FD_ISSET(socket, &m_readSockets) != 0 ||
|
// FD_ISSET is not const-correct
|
||||||
FD_ISSET(socket, &m_writeSockets) != 0;
|
return FD_ISSET(socket, const_cast<fd_set*>(&m_readSockets)) != 0 ||
|
||||||
|
FD_ISSET(socket, const_cast<fd_set*>(&m_writeSockets)) != 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue