[MLton-commit] r6508

Ville Laurikari ville at mlton.org
Wed Mar 26 00:04:22 PST 2008


On x86/amd64 Solaris already has most of the floating point and setenv
prototypes and functions defined.

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

U   mlton/trunk/runtime/platform/solaris.c
U   mlton/trunk/runtime/platform/solaris.h

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

Modified: mlton/trunk/runtime/platform/solaris.c
===================================================================
--- mlton/trunk/runtime/platform/solaris.c	2008-03-26 08:02:55 UTC (rev 6507)
+++ mlton/trunk/runtime/platform/solaris.c	2008-03-26 08:04:22 UTC (rev 6508)
@@ -12,7 +12,8 @@
 #include "sysconf.c"
 #include "setenv.putenv.c"
 
-int fegetround () {
+#ifdef __sparc__
+int fegetround (void) {
         int mode;
 
         mode = fpgetround ();
@@ -34,6 +35,7 @@
         }
         fpsetround (mode);
 }
+#endif /* __sparc__ */
 
 int fpclassify64 (double d) {
         fpclass_t c;
@@ -41,7 +43,7 @@
         c = fpclass (d);
         switch (c) {
         case FP_SNAN:
-        case FP_QNAN: 
+        case FP_QNAN:
                 return FP_NAN;
         case FP_NINF:
         case FP_PINF:
@@ -64,14 +66,14 @@
 /*                        GC                         */
 /* ------------------------------------------------- */
 
-void GC_displayMem () {
+void GC_displayMem (void) {
         static char buffer[256];
         snprintf (buffer, cardof(buffer), "pmap %d\n", (int)(getpid ()));
         system (buffer);
 }
 
 static void catcher (__attribute__ ((unused)) int sig,
-                     __attribute__ ((unused)) siginfo_t *sip, 
+                     __attribute__ ((unused)) siginfo_t *sip,
                      ucontext_t *ucp) {
         GC_handleSigProf ((code_pointer) ucp->uc_mcontext.gregs[REG_PC]);
 }

Modified: mlton/trunk/runtime/platform/solaris.h
===================================================================
--- mlton/trunk/runtime/platform/solaris.h	2008-03-26 08:02:55 UTC (rev 6507)
+++ mlton/trunk/runtime/platform/solaris.h	2008-03-26 08:04:22 UTC (rev 6508)
@@ -33,8 +33,10 @@
 #include <utime.h>
 
 #include "feround.h"
+#ifdef __sparc__
 #include "float-math.h"
 #include "setenv.h"
+#endif
 
 #define FE_TONEAREST 0
 #define FE_DOWNWARD 1




More information about the MLton-commit mailing list