summaryrefslogtreecommitdiff
path: root/includes/Rts.h
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-04-26 20:46:00 +0100
committerIan Lynagh <igloo@earth.li>2012-04-26 20:46:00 +0100
commit0377f8f187b4d636daeb7ec1d195a1aa334054ba (patch)
tree86f65d765fc499f05e0eca7938ee1f1e42e259ed /includes/Rts.h
parentb1eee04d53a59b8cb834b56b58c8830a5b298db4 (diff)
downloadhaskell-0377f8f187b4d636daeb7ec1d195a1aa334054ba.tar.gz
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.
Diffstat (limited to 'includes/Rts.h')
-rw-r--r--includes/Rts.h24
1 files changed, 9 insertions, 15 deletions
diff --git a/includes/Rts.h b/includes/Rts.h
index 24e4c88689..297297a6bd 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