]> git.mxchange.org Git - simgear.git/blobdiff - simgear/compiler.h
Don't crash when a submodel fails to load.
[simgear.git] / simgear / compiler.h
index eca95fe5274a4139052bf9cc4473b42cefd4ce86..6a9ec5d84587f6ada8228eabfb6b6db83cf1e5ba 100644 (file)
 #  if _MSC_VER >= 1200  // msvc++ 6.0 or greater
 #    define isnan _isnan
 #    define snprintf _snprintf
+#    if _MSC_VER < 1500
+#      define vsnprintf _vsnprintf
+#    endif
 #    define copysign _copysign
+#    define strcasecmp stricmp
+
+#    undef min
+#    undef max
 
 #    pragma warning(disable: 4786) // identifier was truncated to '255' characters
 #    pragma warning(disable: 4244) // conversion from double to float
@@ -147,6 +154,7 @@ inline int (isnan)(double r) { return !(r <= 0 || r >= 0); }
 #endif
 
 #if defined (__FreeBSD__)
+#include <sys/param.h>
 #  if __FreeBSD_version < 500000
      extern "C" {
        inline int isnan(double r) { return !(r <= 0 || r >= 0); }
@@ -158,10 +166,6 @@ inline int (isnan)(double r) { return !(r <= 0 || r >= 0); }
 #  include <ieeefp.h>          // isnan
 #endif
 
-#if defined(__MINGW32__)
-#  define isnan(x) _isnan(x)
-#endif
-
 
 //
 // No user modifiable definitions beyond here.