Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/0377f8f187b4d636daeb7ec1d195a1aa334054ba

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

commit 0377f8f187b4d636daeb7ec1d195a1aa334054ba
Author: Ian Lynagh <[email protected]>
Date:   Thu Apr 26 20:46:00 2012 +0100

    Fix build on OSX: Use the 'z' format specifier modifier when possible
    
    On Win32 it's not recognised, so we unfortunately can't use it
    unconditionally.

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

 includes/Rts.h |   24 +++++++++---------------
 1 files changed, 9 insertions(+), 15 deletions(-)

diff --git a/includes/Rts.h b/includes/Rts.h
index 24e4c88..297297a 100644
--- a/includes/Rts.h
+++ b/includes/Rts.h
@@ -144,27 +144,21 @@ void _assertFail(const char *filename, unsigned int 
linenum)
 #endif
 
 #if SIZEOF_VOID_P == 8
-# if SIZEOF_LONG == 8
-#  define FMT_SizeT    "lu"
-#  define FMT_HexSizeT "lx"
-#  define FMT_Word     "lu"
-#  define FMT_Int      "ld"
-# elif SIZEOF_LONG_LONG == 8
-#  define FMT_SizeT    "llu"
-#  define FMT_HexSizeT "llx"
-#  define FMT_Word     "llu"
-#  define FMT_Int      "lld"
-# else
-#  error Cannot find format specifier for size_t size type
-# endif
+# define FMT_SizeT    "zu"
+# define FMT_HexSizeT "zx"
+# define FMT_Word     "zu"
+# define FMT_Int      "zd"
 #elif SIZEOF_VOID_P == 4
-# if SIZEOF_INT == 4
+# if defined(mingw32_HOST_OS)
 #  define FMT_SizeT    "u"
 #  define FMT_HexSizeT "x"
 #  define FMT_Word     "u"
 #  define FMT_Int      "d"
 # else
-#  error Cannot find format specifier for size_t size type
+#  define FMT_SizeT    "zu"
+#  define FMT_HexSizeT "zx"
+#  define FMT_Word     "zu"
+#  define FMT_Int      "zd"
 # endif
 #else
 # error Cannot handle this word size



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to