[commit: ghc] ghc-8.0: Fix the Windows build (53dfaf7)

git at git.haskell.org git at git.haskell.org
Fri Feb 5 13:55:42 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/53dfaf723548001fc4ff0d40793ec1abe5d23dce/ghc

>---------------------------------------------------------------

commit 53dfaf723548001fc4ff0d40793ec1abe5d23dce
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Fri Jan 29 05:32:38 2016 +0100

    Fix the Windows build


>---------------------------------------------------------------

53dfaf723548001fc4ff0d40793ec1abe5d23dce
 compiler/ghci/GHCi.hs | 1 +
 rts/ProfHeap.c        | 2 +-
 rts/Profiling.c       | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/compiler/ghci/GHCi.hs b/compiler/ghci/GHCi.hs
index 9a33c68..80aeccf 100644
--- a/compiler/ghci/GHCi.hs
+++ b/compiler/ghci/GHCi.hs
@@ -75,6 +75,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
diff --git a/rts/ProfHeap.c b/rts/ProfHeap.c
index 23b1f9a..8eea62f 100644
--- a/rts/ProfHeap.c
+++ b/rts/ProfHeap.c
@@ -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;
diff --git a/rts/Profiling.c b/rts/Profiling.c
index c67b081..4f2606c 100644
--- a/rts/Profiling.c
+++ b/rts/Profiling.c
@@ -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),



More information about the ghc-commits mailing list