]> git.mxchange.org Git - simgear.git/commitdiff
Fixed mingw build.
authorJames Goppert <james.goppert@gmail.com>
Thu, 15 Mar 2012 22:29:06 +0000 (18:29 -0400)
committerThorstenB <brehmt@gmail.com>
Fri, 16 Mar 2012 22:04:24 +0000 (23:04 +0100)
.gitignore
CMakeLists.txt
simgear/io/test_binobj.cxx
simgear/misc/sg_dir.cxx

index e681133a9dc8b33143adae52bb73206677d56ab1..2a207a99ea473bda328e728129b5488b4ef207a8 100644 (file)
@@ -12,5 +12,5 @@ CPackSourceConfig.cmake
 cmake_uninstall.cmake
 CTestTestfile.cmake
 install_manifest.txt
-build
+build*
 Build
index 281b366f5c3a984bfb5c161622cf25d527061566..4b3c0e10d326536e777ed4775c9cb6a208b32100 100644 (file)
@@ -201,6 +201,10 @@ endif(CMAKE_COMPILER_IS_GNUCXX)
 
 if(WIN32)
 
+    if(MINGW)
+        add_definitions(-D_WIN32_WINNT=0x501)
+    endif()
+
     if(MSVC)
         # turn off various warnings
         # foreach(warning 4244 4251 4267 4275 4290 4786 4305 4996)
index 50d60913eeb5da25e540b9bb5e4306f8a535ff59..2ca1edf149bdd02e474fb1e210b94ed8e2d22194 100644 (file)
@@ -9,7 +9,7 @@
 #include <cstdlib>
 #include <cstdio>
 
-#ifdef _MSC_VER
+#if defined _MSC_VER || defined _WIN32_WINNT
 #   define  random  rand
 #endif
 
index a9969e07089cf8e37581eaa274f317d95093266f..7d26025b05c97f6e20c66052415eca4bf182f557 100644 (file)
@@ -23,6 +23,8 @@
 #endif
 
 #include <simgear/misc/sg_dir.hxx>
+#include <math.h>
+#include <stdlib.h>
 
 #ifdef _WIN32
 #  define WIN32_LEAN_AND_MEAN