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/GlBitmaps.h>
|
||||
#endif
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#include <shellapi.h>
|
||||
#endif
|
||||
#include "gui.h"
|
||||
|
||||
using std::string;
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if defined( _MSC_VER ) || defined( __MINGW32__ )
|
||||
# include <Winsock2.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -36,8 +36,10 @@
|
|||
#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
|
||||
|
|
|
@ -39,8 +39,10 @@
|
|||
#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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue