Fix compilation for CodeBlocks 16.01 ! (Fixes #65)

Former-commit-id: 4cddcf427228260249ac1578283896ee2b7ecbfc [formerly 7bf4124ba228559456f38f4247116ed71a45c227]
Former-commit-id: 2b1a728de56c163627fcb6b59231102708f57513
This commit is contained in:
Lynix 2016-06-09 13:02:02 +02:00
parent be01b9e29b
commit e70b1f57ae
2 changed files with 24 additions and 5 deletions

View File

@ -83,7 +83,7 @@ function NazaraBuild:Execute()
targetsuffix("-s")
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
project(libTable.Name)
@ -900,6 +900,10 @@ function NazaraBuild:Resolve(infoTable)
end
function NazaraBuild:MakeCopyAfterBuild(infoTable)
if (PremakeVersion < 50) then
return
end
if (os.is("windows")) then
configuration({})
postbuildcommands({[[xcopy "%{path.translate(cfg.linktarget.relpath):sub(1, -5) .. ".dll"}" "..\..\..\examples\bin\" /E /Y]]})

View File

@ -6,7 +6,22 @@
#include <Nazara/Core/Error.hpp>
#include <Nazara/Core/Log.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>
namespace Nz