From 0c8358ae67e218b3cd3a0332bd9d8c7be0521af3 Mon Sep 17 00:00:00 2001 From: durk Date: Mon, 15 Oct 2007 18:49:50 +0000 Subject: [PATCH] - 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. --- simgear/math/SGVec2.hxx | 4 ++++ simgear/scene/material/matlib.cxx | 4 ++++ simgear/scene/sky/sphere.cxx | 3 +++ simgear/scene/sky/stars.cxx | 4 ++++ simgear/structure/SGAtomic.hxx | 2 +- 5 files changed, 16 insertions(+), 1 deletion(-) 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 -- 2.39.5