Fix compilation for CodeBlocks 16.01 ! (Fixes #65)
Former-commit-id: f49f9b662c6e105d1249f7f7839f8a711be87640 [formerly ab9e2158aebc0583790b52d6397015fe470c0a31] Former-commit-id: d68b86c1319bdfd956b226865831e7c2d0a5ea42
This commit is contained in:
parent
dce978aa51
commit
f74f180044
|
|
@ -83,7 +83,7 @@ function NazaraBuild:Execute()
|
||||||
targetsuffix("-s")
|
targetsuffix("-s")
|
||||||
|
|
||||||
configuration("codeblocks or codelite or gmake or xcode3 or xcode4")
|
configuration("codeblocks or codelite or gmake or xcode3 or xcode4")
|
||||||
buildoptions({"-fPIC", "-std=c++14"})
|
buildoptions({"-fPIC", "-std=c++14", "-U__STRICT_ANSI__"})
|
||||||
|
|
||||||
for k, libTable in ipairs(self.OrderedExtLibs) do
|
for k, libTable in ipairs(self.OrderedExtLibs) do
|
||||||
project(libTable.Name)
|
project(libTable.Name)
|
||||||
|
|
@ -900,6 +900,10 @@ function NazaraBuild:Resolve(infoTable)
|
||||||
end
|
end
|
||||||
|
|
||||||
function NazaraBuild:MakeCopyAfterBuild(infoTable)
|
function NazaraBuild:MakeCopyAfterBuild(infoTable)
|
||||||
|
if (PremakeVersion < 50) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if (os.is("windows")) then
|
if (os.is("windows")) then
|
||||||
configuration({})
|
configuration({})
|
||||||
postbuildcommands({[[xcopy "%{path.translate(cfg.linktarget.relpath):sub(1, -5) .. ".dll"}" "..\..\..\examples\bin\" /E /Y]]})
|
postbuildcommands({[[xcopy "%{path.translate(cfg.linktarget.relpath):sub(1, -5) .. ".dll"}" "..\..\..\examples\bin\" /E /Y]]})
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,22 @@
|
||||||
#include <Nazara/Core/Error.hpp>
|
#include <Nazara/Core/Error.hpp>
|
||||||
#include <Nazara/Core/Log.hpp>
|
#include <Nazara/Core/Log.hpp>
|
||||||
#include <Nazara/Network/Win32/IpAddressImpl.hpp>
|
#include <Nazara/Network/Win32/IpAddressImpl.hpp>
|
||||||
#include <Mstcpip.h>
|
|
||||||
|
#include <Winsock2.h>
|
||||||
|
#ifdef NAZARA_COMPILER_MINGW
|
||||||
|
// MinGW is lacking Mstcpip.h and that's too bad
|
||||||
|
struct tcp_keepalive
|
||||||
|
{
|
||||||
|
u_long onoff;
|
||||||
|
u_long keepalivetime;
|
||||||
|
u_long keepaliveinterval;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)
|
||||||
|
#else
|
||||||
|
#include <Mstcpip.h>
|
||||||
|
#endif // NAZARA_COMPILER_MINGW
|
||||||
|
|
||||||
#include <Nazara/Network/Debug.hpp>
|
#include <Nazara/Network/Debug.hpp>
|
||||||
|
|
||||||
namespace Nz
|
namespace Nz
|
||||||
|
|
@ -93,7 +108,7 @@ namespace Nz
|
||||||
|
|
||||||
IpAddressImpl::SockAddrBuffer nameBuffer;
|
IpAddressImpl::SockAddrBuffer nameBuffer;
|
||||||
int bufferLength = IpAddressImpl::ToSockAddr(address, nameBuffer.data());
|
int bufferLength = IpAddressImpl::ToSockAddr(address, nameBuffer.data());
|
||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
*error = SocketError_NoError;
|
*error = SocketError_NoError;
|
||||||
|
|
||||||
|
|
@ -365,7 +380,7 @@ namespace Nz
|
||||||
|
|
||||||
return IpAddress();
|
return IpAddress();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
*error = SocketError_NoError;
|
*error = SocketError_NoError;
|
||||||
|
|
||||||
|
|
@ -566,7 +581,7 @@ namespace Nz
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SocketImpl::SetBroadcasting(SocketHandle handle, bool broadcasting, SocketError* error)
|
bool SocketImpl::SetBroadcasting(SocketHandle handle, bool broadcasting, SocketError* error)
|
||||||
{
|
{
|
||||||
NazaraAssert(handle != InvalidHandle, "Invalid handle");
|
NazaraAssert(handle != InvalidHandle, "Invalid handle");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue