[MLton-commit] r4301

Matthew Fluet MLton@mlton.org
Mon, 9 Jan 2006 14:47:30 -0800


Cygwin errors
----------------------------------------------------------------------

U   mlton/branches/on-20050822-x86_64-branch/runtime/basis/IntInf.c
U   mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c
U   mlton/branches/on-20050822-x86_64-branch/runtime/platform/cygwin.c
U   mlton/branches/on-20050822-x86_64-branch/runtime/platform/windows.c

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

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/IntInf.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/IntInf.c	2006-01-06 23:19:20 UTC (rev 4300)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/IntInf.c	2006-01-09 22:47:28 UTC (rev 4301)
@@ -279,14 +279,16 @@
         return answer (&resmpz, bytes);
 }
 
-pointer IntInf_arshift(pointer arg, uint shift, size_t bytes) {
+pointer IntInf_arshift(pointer arg, Word shift_w, size_t bytes) {
+        uint shift = (uint)shift_w;
         if (DEBUG_INT_INF)
                 fprintf (stderr, "IntInf_arshift ("FMTPTR", %u, %zu)\n",
                                 (uintptr_t)arg, shift, bytes);
         return shary(arg, shift, bytes, &mpz_fdiv_q_2exp);
 }
 
-pointer IntInf_lshift(pointer arg, uint shift, size_t bytes) {
+pointer IntInf_lshift(pointer arg, Word shift_w, size_t bytes) {
+        uint shift = (uint)shift_w;
         if (DEBUG_INT_INF)
                 fprintf (stderr, "IntInf_lshift ("FMTPTR", %u, %zu)\n",
                                 (uintptr_t)arg, shift, bytes);

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c	2006-01-06 23:19:20 UTC (rev 4300)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c	2006-01-09 22:47:28 UTC (rev 4301)
@@ -177,6 +177,7 @@
   writeNewline (fd);
   writeString (fd, "/* C99 */");
   writeNewline (fd);
+  systype(_Bool, "Word", "C_Bool");
   systype(intmax_t, "Int", "C_Intmax");
   systype(uintmax_t, "Word", "C_Uintmax");
   systype(intptr_t, "Int", "C_Intptr");
@@ -195,7 +196,7 @@
   systype(off_t, "Int", "C_Off");
   systype(pid_t, "Int", "C_PId");
   systype(ssize_t, "Int", "C_SSize");
-  systype(suseconds_t, "Int", "C_SUSeconds");
+  // systype(suseconds_t, "Int", "C_SUSeconds");
   chknumsystype(time_t, "C_Time");
   chkintsystype(uid_t, "C_UId");
   systype(useconds_t, "Word", "C_USeconds");

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/cygwin.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/cygwin.c	2006-01-06 23:19:20 UTC (rev 4300)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/cygwin.c	2006-01-09 22:47:28 UTC (rev 4301)
@@ -2,33 +2,32 @@
 
 #include "platform.h"
 
-#include "getrusage.c"
 #include "mkdir2.c"
 #include "mmap.c"
-#include "totalRam.sysconf.c"
+#include "sysconf.c"
 #include "windows.c"
 
-void decommit (void *base, size_t length) {
+HANDLE fileDesHandle (int fd) {
+        return (HANDLE)(get_osfhandle (fd));
+}
+
+void GC_decommit (void *base, size_t length) {
         if (MLton_Platform_CygwinUseMmap)
-                smunmap (base, length);
+                munmap_safe (base, length);
         else
                 Windows_decommit (base, length);
 }
 
-HANDLE fileDesHandle (int fd) {
-        return (HANDLE)(get_osfhandle (fd));
-}
-
-void *mmapAnon (void *start, size_t length) {
+void *GC_mmapAnon (void *start, size_t length) {
         if (MLton_Platform_CygwinUseMmap)
-                return mmapAnonMmap (start, length);
+                return mmapAnon (start, length);
         else
                 return Windows_mmapAnon (start, length);
 }
 
-void release (void *base, size_t length) {
+void GC_release (void *base, size_t length) {
         if (MLton_Platform_CygwinUseMmap)
-                smunmap (base, length);
+                munmap_safe (base, length);
         else
                 Windows_release (base);
 }

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/windows.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/windows.c	2006-01-06 23:19:20 UTC (rev 4300)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/windows.c	2006-01-09 22:47:28 UTC (rev 4301)
@@ -1,6 +1,6 @@
 HANDLE fileDesHandle (int fd);
 
-static void showMaps () {
+static void displayMaps () {
         MEMORY_BASIC_INFORMATION buf;
         LPCVOID lpAddress;
         char *state = "<unset>";
@@ -60,7 +60,7 @@
         }
 }
 
-void showMem () {
+void GC_displayMem () {
         MEMORYSTATUS ms; 
 
         ms.dwLength = sizeof (MEMORYSTATUS);