# include <simgear/screen/win32-printer.h>
# include <simgear/screen/GlBitmaps.h>
#endif
-
+#ifdef __MINGW32__
+#include <shellapi.h>
+#endif
#include "gui.h"
using std::string;
#include <simgear/compiler.h>
-#ifdef _MSC_VER
-#include <Winsock2.h>
+#if defined( _MSC_VER ) || defined( __MINGW32__ )
+# include <Winsock2.h>
#endif
#include <math.h>
// 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
}
SGPropertyNode autosave;
-#ifdef _MSC_VER
+#if defined( _MSC_VER ) || defined( __MINGW32__ )
char *envp = ::getenv( "APPDATA" );
if (envp != NULL ) {
SGPath config( envp );
#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
#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
# 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)