]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sound/soundmgr_openal.cxx
I don't understand why FreeBSD doesn't see isnan() after including math.h
[simgear.git] / simgear / sound / soundmgr_openal.cxx
index 1966259aeee97ee155d9df5078232fbc4cf3c5f3..0785edb5a63c7193a8fe74ca15cd4ab5ae468041 100644 (file)
@@ -35,7 +35,7 @@
 # include <AL/alc.h>
 #endif
 
-#if defined (__APPLE__) 
+#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); }
@@ -46,6 +46,10 @@ inline int (isnan)(double r) { return isnan(r); }
 #define isnan(x) _isnan(x)
 #endif
 
+#if defined (__FreeBSD__)
+inline int isnan(double r) { return !(r < 0 || r > 0); }
+#endif
+
 #include STL_IOSTREAM
 
 #include <simgear/debug/logstream.hxx>