From fc06ae58b221ce820930e915d1b18077344f47f0 Mon Sep 17 00:00:00 2001 From: ehofman Date: Thu, 10 Mar 2005 08:58:48 +0000 Subject: [PATCH] Ima Sudonim: I have (hopefully) generated a patch for a previously mentioned simgear problem for a hang condition in mac os x. Mentioned in --- simgear/sound/soundmgr_openal.cxx | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/simgear/sound/soundmgr_openal.cxx b/simgear/sound/soundmgr_openal.cxx index de6a987f..9b88e3d0 100644 --- a/simgear/sound/soundmgr_openal.cxx +++ b/simgear/sound/soundmgr_openal.cxx @@ -34,10 +34,22 @@ #endif #if defined (__APPLE__) -// any C++ header file undefines isinf and isnan -// so this should be included before -inline int (isinf)(double r) { return isinf(r); } -inline int (isnan)(double r) { return isnan(r); } +# ifdef __GNUC__ +# if ( __GNUC__ >= 3 ) && ( __GNUC_MINOR__ >= 3 ) +// # include +extern "C" int isnan (double); +extern "C" int isinf (double); +# else + // any C++ header file undefines isinf and isnan + // so this should be included before + // the functions are STILL in libm (libSystem on mac os x) +extern "C" int isnan (double); +extern "C" int isinf (double); +# endif +# else +// inline int (isinf)(double r) { return isinf(r); } +// inline int (isnan)(double r) { return isnan(r); } +# endif #endif #if defined (__FreeBSD__) -- 2.39.2