From: durk Date: Mon, 15 Oct 2007 18:49:50 +0000 (+0000) Subject: - A few fixes to ensure SimGear compiles again on cygwin. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0c8358ae67e218b3cd3a0332bd9d8c7be0521af3;p=simgear.git - A few fixes to ensure SimGear compiles again on cygwin. * on cygwin, isnan is declared in ieeepf.h * CYGWIN is a special case in that it is windows based, but sometimes folows unix conventions. SGAtomic compilation failed on an illegal volatile type cast without the additional __CYGWIN__ define check. --- diff --git a/simgear/math/SGVec2.hxx b/simgear/math/SGVec2.hxx index 6b49bc61..0409ee44 100644 --- a/simgear/math/SGVec2.hxx +++ b/simgear/math/SGVec2.hxx @@ -18,6 +18,10 @@ #ifndef SGVec2_H #define SGVec2_H +#if defined ( __CYGWIN__ ) +#include +#endif + #include #include diff --git a/simgear/scene/material/matlib.cxx b/simgear/scene/material/matlib.cxx index 9c02cb96..5bf353cb 100644 --- a/simgear/scene/material/matlib.cxx +++ b/simgear/scene/material/matlib.cxx @@ -33,6 +33,10 @@ # include #endif +#if defined ( __CYGWIN__ ) +#include +#endif + #include #include #include diff --git a/simgear/scene/sky/sphere.cxx b/simgear/scene/sky/sphere.cxx index bbd68694..43d20e1c 100644 --- a/simgear/scene/sky/sphere.cxx +++ b/simgear/scene/sky/sphere.cxx @@ -20,6 +20,9 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // // $Id$ +#ifdef __CYGWIN__ +#include +#endif #include diff --git a/simgear/scene/sky/stars.cxx b/simgear/scene/sky/stars.cxx index bd31aedc..55616f68 100644 --- a/simgear/scene/sky/stars.cxx +++ b/simgear/scene/sky/stars.cxx @@ -27,6 +27,10 @@ # include #endif +#ifdef __CYGWIN__ +#include +#endif + #include #include #include diff --git a/simgear/structure/SGAtomic.hxx b/simgear/structure/SGAtomic.hxx index 29c23c25..4029f352 100644 --- a/simgear/structure/SGAtomic.hxx +++ b/simgear/structure/SGAtomic.hxx @@ -28,7 +28,7 @@ #elif defined(__sgi) && defined(_COMPILER_VERSION) && (_COMPILER_VERSION>=730) // No need to include something. Is a Compiler API ... # define SGATOMIC_USE_MIPSPRO_BUILTINS -#elif defined(WIN32) +#elif defined(WIN32) && !defined ( __CYGWIN__ ) # include # define SGATOMIC_USE_WIN32_INTERLOCKED #else