]> git.mxchange.org Git - flightgear.git/commitdiff
MINGW patch by Csaba Halasz, reworked by me to avoid breaking MSVC or Cygwin build
authorfredb <fredb>
Sun, 28 Sep 2008 08:27:32 +0000 (08:27 +0000)
committerfredb <fredb>
Sun, 28 Sep 2008 08:27:32 +0000 (08:27 +0000)
src/GUI/gui_funcs.cxx
src/Input/fgjs.cxx
src/Main/bootstrap.cxx
src/Main/fg_init.cxx
src/Network/native_ctrls.cxx
src/Network/native_fdm.cxx
utils/GPSsmooth/UGear_main.cxx

index 0428f7304a88e1b64820866dddcf5388ad6e5bf6..6b4e86933da08ef7446775ef6cc726f9c763b387 100644 (file)
@@ -54,7 +54,9 @@
 #  include <simgear/screen/win32-printer.h>
 #  include <simgear/screen/GlBitmaps.h>
 #endif
-
+#ifdef __MINGW32__
+#include <shellapi.h>
+#endif
 #include "gui.h"
 
 using std::string;
index 918d9df5d3232c7d39b6e9cf883459cfd19d14bb..73eed92a93aa58b19625e304ea57dda2e133f096 100644 (file)
@@ -28,8 +28,8 @@
 
 #include <simgear/compiler.h>
 
-#ifdef _MSC_VER
-#include <Winsock2.h>
+#if defined( _MSC_VER ) || defined( __MINGW32__ )
+#  include <Winsock2.h>
 #endif
 
 #include <math.h>
index d0871fb0a76163cfe797f30908fbb28a43ad8d3e..734f998c0978fde2e8954ea7bacdad2a1d92225c 100644 (file)
@@ -141,7 +141,7 @@ int main ( int argc, char **argv ) {
     // Ignore floating-point exceptions on FreeBSD
     signal(SIGFPE, SIG_IGN);
 #endif
-#ifndef _MSC_VER
+#if !defined( _MSC_VER ) && !defined( __MINGW32__ )
     signal(SIGPIPE, SIG_IGN);
 #endif
 
index 26a9425028d2dde692d95037856787739b750880..08f315a427d1ad2248870fab8d6b9af940a2760d 100644 (file)
@@ -581,7 +581,7 @@ bool fgInitConfig ( int argc, char **argv ) {
     }
 
     SGPropertyNode autosave;
-#ifdef _MSC_VER
+#if defined( _MSC_VER ) || defined( __MINGW32__ )
     char *envp = ::getenv( "APPDATA" );
     if (envp != NULL ) {
         SGPath config( envp );
index b79d711fb3a612ac81fafed4317e2ff444523521..a5816052c92e7084dc0f5e4af3bf74bb5e8f7d72 100644 (file)
 #include "native_ctrls.hxx"
 
 // FreeBSD works better with this included last ... (?)
-#if defined(WIN32) && !defined(__CYGWIN__)
+#if defined( _MSC_VER )
 #  include <windows.h>
+#elif defined( __MINGW32__ )
+#  include <Winsock2.h>
 #else
 #  include <netinet/in.h>      // htonl() ntohl()
 #endif
index 0d499b4e988541fa8b9be5dbd46b98e7c96b89bd..16b57d0624a378d17ad5c44004142011ff5975a2 100644 (file)
 #include "native_fdm.hxx"
 
 // FreeBSD works better with this included last ... (?)
-#if defined(WIN32) && !defined(__CYGWIN__)
+#if defined( _MSC_VER )
 #  include <windows.h>
+#elif defined( __MINGW32__ )
+#  include <Winsock2.h>
 #else
 #  include <netinet/in.h>      // htonl() ntohl()
 #endif
index 66c6cad424da4595ec4894b75d3479028fbccdd1..697d17a6c6154cedc3c0fa64161c02753ee4f824 100644 (file)
@@ -2,7 +2,7 @@
 #  include <config.h>
 #endif
 
-#ifndef _MSC_VER
+#if !defined( _MSC_VER ) && !defined( __MINGW32__ )
 #  include <strings.h>         // for bzero()
 #else
 #  define bzero(a,b) memset(a,0,b)