MINGW patch by Csaba Halasz, reworked by me to avoid breaking MSVC or Cygwin build
This commit is contained in:
parent
0d89cb9073
commit
9ebb9128c8
7 changed files with 14 additions and 8 deletions
|
@ -54,7 +54,9 @@
|
||||||
# include <simgear/screen/win32-printer.h>
|
# include <simgear/screen/win32-printer.h>
|
||||||
# include <simgear/screen/GlBitmaps.h>
|
# include <simgear/screen/GlBitmaps.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
#include <shellapi.h>
|
||||||
|
#endif
|
||||||
#include "gui.h"
|
#include "gui.h"
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#if defined( _MSC_VER ) || defined( __MINGW32__ )
|
||||||
# include <Winsock2.h>
|
# include <Winsock2.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@ int main ( int argc, char **argv ) {
|
||||||
// Ignore floating-point exceptions on FreeBSD
|
// Ignore floating-point exceptions on FreeBSD
|
||||||
signal(SIGFPE, SIG_IGN);
|
signal(SIGFPE, SIG_IGN);
|
||||||
#endif
|
#endif
|
||||||
#ifndef _MSC_VER
|
#if !defined( _MSC_VER ) && !defined( __MINGW32__ )
|
||||||
signal(SIGPIPE, SIG_IGN);
|
signal(SIGPIPE, SIG_IGN);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -581,7 +581,7 @@ bool fgInitConfig ( int argc, char **argv ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
SGPropertyNode autosave;
|
SGPropertyNode autosave;
|
||||||
#ifdef _MSC_VER
|
#if defined( _MSC_VER ) || defined( __MINGW32__ )
|
||||||
char *envp = ::getenv( "APPDATA" );
|
char *envp = ::getenv( "APPDATA" );
|
||||||
if (envp != NULL ) {
|
if (envp != NULL ) {
|
||||||
SGPath config( envp );
|
SGPath config( envp );
|
||||||
|
|
|
@ -36,8 +36,10 @@
|
||||||
#include "native_ctrls.hxx"
|
#include "native_ctrls.hxx"
|
||||||
|
|
||||||
// FreeBSD works better with this included last ... (?)
|
// FreeBSD works better with this included last ... (?)
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#if defined( _MSC_VER )
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
|
#elif defined( __MINGW32__ )
|
||||||
|
# include <Winsock2.h>
|
||||||
#else
|
#else
|
||||||
# include <netinet/in.h> // htonl() ntohl()
|
# include <netinet/in.h> // htonl() ntohl()
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -39,8 +39,10 @@
|
||||||
#include "native_fdm.hxx"
|
#include "native_fdm.hxx"
|
||||||
|
|
||||||
// FreeBSD works better with this included last ... (?)
|
// FreeBSD works better with this included last ... (?)
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#if defined( _MSC_VER )
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
|
#elif defined( __MINGW32__ )
|
||||||
|
# include <Winsock2.h>
|
||||||
#else
|
#else
|
||||||
# include <netinet/in.h> // htonl() ntohl()
|
# include <netinet/in.h> // htonl() ntohl()
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
#if !defined( _MSC_VER ) && !defined( __MINGW32__ )
|
||||||
# include <strings.h> // for bzero()
|
# include <strings.h> // for bzero()
|
||||||
#else
|
#else
|
||||||
# define bzero(a,b) memset(a,0,b)
|
# define bzero(a,b) memset(a,0,b)
|
||||||
|
|
Loading…
Add table
Reference in a new issue