summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-04-27 11:48:37 +0100
committerIan Lynagh <igloo@earth.li>2012-04-27 11:48:37 +0100
commit9aa3a7b650e1147220dec7366c3696edd471ff8c (patch)
treeb4a055d13dc714fcade67871155938cc0122c7c4 /includes
parent35e90394e9cd00fe1c38035af71eeac823963c0f (diff)
downloadhaskell-9aa3a7b650e1147220dec7366c3696edd471ff8c.tar.gz
Fix build on OS X
Diffstat (limited to 'includes')
-rw-r--r--includes/stg/Types.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/includes/stg/Types.h b/includes/stg/Types.h
index 0c71ea4782..839c0641c0 100644
--- a/includes/stg/Types.h
+++ b/includes/stg/Types.h
@@ -57,13 +57,15 @@ typedef unsigned short StgWord16;
#if SIZEOF_INT == 4
typedef signed int StgInt32;
typedef unsigned int StgWord32;
-#define FMT_Word32 "u"
-#define FMT_Int32 "d"
+#define FMT_Word32 "u"
+#define FMT_HexWord32 "x"
+#define FMT_Int32 "d"
#elif SIZEOF_LONG == 4
typedef signed long StgInt32;
typedef unsigned long StgWord32;
-#define FMT_Word32 "lu"
-#define FMT_Int32 "ld"
+#define FMT_Word32 "lu"
+#define FMT_HexWord32 "lx"
+#define FMT_Int32 "ld"
#else
#error GHC untested on this architecture: sizeof(int) != 4
#endif
@@ -71,13 +73,15 @@ typedef unsigned long StgWord32;
#if SIZEOF_LONG == 8
typedef signed long StgInt64;
typedef unsigned long StgWord64;
-#define FMT_Word64 "lu"
-#define FMT_Int64 "ld"
+#define FMT_Word64 "lu"
+#define FMT_HexWord64 "lx"
+#define FMT_Int64 "ld"
#elif SIZEOF_LONG_LONG == 8
typedef signed long long int StgInt64;
typedef unsigned long long int StgWord64;
-#define FMT_Word64 "llu"
-#define FMT_Int64 "lld"
+#define FMT_Word64 "llu"
+#define FMT_HexWord64 "llx"
+#define FMT_Int64 "lld"
#else
#error cannot find a way to define StgInt64
#endif
@@ -99,6 +103,7 @@ typedef StgWord64 StgWord;
typedef StgInt32 StgHalfInt;
typedef StgWord32 StgHalfWord;
#define FMT_Word FMT_Word64
+#define FMT_HexWord FMT_HexWord64
#define FMT_Int FMT_Int64
#else
#if SIZEOF_VOID_P == 4
@@ -107,6 +112,7 @@ typedef StgWord32 StgWord;
typedef StgInt16 StgHalfInt;
typedef StgWord16 StgHalfWord;
#define FMT_Word FMT_Word32
+#define FMT_HexWord FMT_HexWord32
#define FMT_Int FMT_Int32
#else
#error GHC untested on this architecture: sizeof(void *) != 4 or 8