From: ehofman <ehofman>
Date: Thu, 10 Mar 2005 08:58:48 +0000 (+0000)
Subject: Ima Sudonim:
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fc06ae58b221ce820930e915d1b18077344f47f0;p=simgear.git

Ima Sudonim:

I have (hopefully) generated a patch for a previously mentioned simgear  problem for a hang condition in mac os x.  Mentioned in  <http://baron.flightgear.org/pipermail/flightgear-devel/2005-February/ 035004.html>
---

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 <iostream>
-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 <math.h>
+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 <iostream>
+    // 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__)