[MLton-commit] r4141

Stephen Weeks MLton@mlton.org
Thu, 3 Nov 2005 10:29:22 -0800


Used #ifndef to protect some #defines.  This is necessary on some
platforms, like Solaris 10, that define fpclassify and associated
constants, but where we say that HAS_FPCLASSIFY = FALSE (because
Solaris 8 doesn't have fpclassify).

We really should use autoconf.


----------------------------------------------------------------------

U   mlton/trunk/runtime/platform.h

----------------------------------------------------------------------

Modified: mlton/trunk/runtime/platform.h
===================================================================
--- mlton/trunk/runtime/platform.h	2005-11-03 18:21:46 UTC (rev 4140)
+++ mlton/trunk/runtime/platform.h	2005-11-03 18:29:18 UTC (rev 4141)
@@ -166,18 +166,33 @@
 #define EXECVE execve
 #endif
 
-#if not HAS_FEROUND
+#ifndef FE_TONEAREST
 #define FE_TONEAREST 0
+#endif
+#ifndef FE_DOWNWARD
 #define FE_DOWNWARD 1
+#endif
+#ifndef FE_UPWARD
 #define FE_UPWARD 2
+#endif
+#ifndef FE_TOWARDZERO
 #define FE_TOWARDZERO 3
 #endif
 
-#if not HAS_FPCLASSIFY
+
+#ifndef FP_INFINITE
 #define FP_INFINITE 1
+#endif
+#ifndef FP_NAN
 #define FP_NAN 0
+#endif
+#ifndef FP_NORMAL
 #define FP_NORMAL 4
+#endif
+#ifndef FP_SUBNORMAL
 #define FP_SUBNORMAL 3
+#endif
+#ifndef FP_ZERO
 #define FP_ZERO 2
 #endif