1
0
Fork 0

MINGW patch by Csaba Halasz, reworked by me to avoid breaking MSVC or Cygwin build

This commit is contained in:
fredb 2008-09-28 08:27:32 +00:00
parent 0d89cb9073
commit 9ebb9128c8
7 changed files with 14 additions and 8 deletions

View 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;

View 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>

View 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

View 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 );

View file

@ -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

View file

@ -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

View 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)