Fix the Windows build
authorThomas Miedema <thomasmiedema@gmail.com>
Fri, 29 Jan 2016 04:32:38 +0000 (05:32 +0100)
committerThomas Miedema <thomasmiedema@gmail.com>
Fri, 29 Jan 2016 04:33:22 +0000 (05:33 +0100)
compiler/ghci/GHCi.hs
rts/ProfHeap.c
rts/Profiling.c

index c54090c..2e2cd35 100644 (file)
@@ -70,6 +70,7 @@ import System.Exit
 import Data.Maybe
 import GHC.IO.Handle.Types (Handle)
 #ifdef mingw32_HOST_OS
+import Foreign.C
 import GHC.IO.Handle.FD (fdToHandle)
 #else
 import System.Posix as Posix
index 187116f..a7ea3eb 100644 (file)
@@ -515,7 +515,7 @@ fprint_ccs(FILE *fp, CostCentreStack *ccs, nat max_length)
         return;
     }
 
-    fprintf(fp, "(%ld)", ccs->ccsID);
+    fprintf(fp, "(%" FMT_Int ")", ccs->ccsID);
 
     p = buf;
     buf_end = buf + max_length + 1;
index c67b081..4f2606c 100644 (file)
@@ -951,7 +951,7 @@ logCCS(CostCentreStack *ccs, nat indent,
                 max_module_len - strlen_utf8(cc->module), "");
 
         fprintf(prof_file,
-                " %*ld %11" FMT_Word64 "  %5.1f  %5.1f   %5.1f  %5.1f",
+                " %*" FMT_Int "%11" FMT_Word64 "  %5.1f  %5.1f   %5.1f  %5.1f",
                 max_id_len, ccs->ccsID, ccs->scc_count,
                 total_prof_ticks == 0 ? 0.0 : ((double)ccs->time_ticks / (double)total_prof_ticks * 100.0),
                 total_alloc == 0 ? 0.0 : ((double)ccs->mem_alloc / (double)total_alloc * 100.0),