From: ehofman Date: Wed, 17 Mar 2004 10:31:34 +0000 (+0000) Subject: Attempt to fix the Cygwin build problem for once and for all X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=aadff3301196676a14cb55ed2624c76882c03644;p=simgear.git Attempt to fix the Cygwin build problem for once and for all --- diff --git a/simgear/screen/GLBitmaps.cxx b/simgear/screen/GLBitmaps.cxx index f8b13702..7caba76d 100755 --- a/simgear/screen/GLBitmaps.cxx +++ b/simgear/screen/GLBitmaps.cxx @@ -2,8 +2,12 @@ # include #endif -#ifdef HAVE_WINDOWS_H -# include +#if defined(__CYGWIN__) /* && !defined(USING_X) */ +#define WIN32 +#endif + +#if defined(WIN32) /* MINGW and MSC predefine WIN32 */ +# include #endif #include diff --git a/simgear/screen/extensions.hxx b/simgear/screen/extensions.hxx index c6d6480a..cb761679 100644 --- a/simgear/screen/extensions.hxx +++ b/simgear/screen/extensions.hxx @@ -24,12 +24,18 @@ #ifndef __SG_EXTENSIONS_HXX #define __SG_EXTENSIONS_HXX 1 -#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__) -# include -#else +#if !defined(WIN32) # include #endif +#if defined(__CYGWIN__) /* && !defined(USING_X) */ +#define WIN32 +#endif + +#if defined(WIN32) /* MINGW and MSC predefine WIN32 */ +# include +#endif + #include diff --git a/simgear/screen/screen-dump.cxx b/simgear/screen/screen-dump.cxx index 862fbdd1..d6a62ba0 100644 --- a/simgear/screen/screen-dump.cxx +++ b/simgear/screen/screen-dump.cxx @@ -24,8 +24,12 @@ # include #endif -#ifdef HAVE_WINDOWS_H -# include +#if defined(__CYGWIN__) /* && !defined(USING_X) */ +#define WIN32 +#endif + +#if defined(WIN32) /* MINGW and MSC predefine WIN32 */ +# include #endif #include diff --git a/simgear/xgl/xgl.c b/simgear/xgl/xgl.c index ae7a91f1..2e711957 100644 --- a/simgear/xgl/xgl.c +++ b/simgear/xgl/xgl.c @@ -2,10 +2,6 @@ # include #endif -#ifdef HAVE_WINDOWS_H -# include -#endif - #include "xgl.h" #ifdef USING_GLUT diff --git a/simgear/xgl/xgl.h b/simgear/xgl/xgl.h index 366cf479..40a14fbf 100644 --- a/simgear/xgl/xgl.h +++ b/simgear/xgl/xgl.h @@ -6,8 +6,12 @@ # include #endif -#ifdef HAVE_WINDOWS_H -# include +#if defined(__CYGWIN__) /* && !defined(USING_X) */ +#define WIN32 +#endif + +#if defined(WIN32) /* MINGW and MSC predefine WIN32 */ +# include #endif #include