diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-09-13 23:31:19 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-09-13 23:31:19 +0100 |
commit | 3f39164534af07ddd49d7bd2a1c0e1b171903ce3 (patch) | |
tree | 0cef45708c5ef2d0ff5a87fb4a2888a0ec2cc344 /includes | |
parent | 6e1107b15d4e81f636bc62adb3be09da5fe81d28 (diff) | |
download | haskell-3f39164534af07ddd49d7bd2a1c0e1b171903ce3.tar.gz |
Use intptr_t for offset values in mkDerivedConstants
This means that we get e.g.
pc_OFFSET_stgEagerBlackholeInfo = -24
rather than
pc_OFFSET_stgEagerBlackholeInfo = 18446744073709551592
Diffstat (limited to 'includes')
-rw-r--r-- | includes/mkDerivedConstants.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/mkDerivedConstants.c b/includes/mkDerivedConstants.c index 984044645e..e014d15194 100644 --- a/includes/mkDerivedConstants.c +++ b/includes/mkDerivedConstants.c @@ -26,6 +26,7 @@ #include "Stable.h" #include "Capability.h" +#include <inttypes.h> #include <stdio.h> #include <string.h> @@ -45,7 +46,7 @@ enum Mode { Gen_Haskell_Type, Gen_Haskell_Value, Gen_Haskell_Wrappers, Gen_Haske printf(" , pc_OFFSET_" str " :: Int\n"); \ break; \ case Gen_Haskell_Value: \ - printf(" , pc_OFFSET_" str " = %" FMT_SizeT "\n", (size_t)offset); \ + printf(" , pc_OFFSET_" str " = %" PRIdPTR "\n", (intptr_t)offset); \ break; \ case Gen_Haskell_Wrappers: \ printf("oFFSET_" str " :: DynFlags -> Int\n"); \ @@ -55,7 +56,7 @@ enum Mode { Gen_Haskell_Type, Gen_Haskell_Value, Gen_Haskell_Wrappers, Gen_Haske printf(" oFFSET_" str ",\n"); \ break; \ case Gen_Header: \ - printf("#define OFFSET_" str " %" FMT_SizeT "\n", (size_t)offset); \ + printf("#define OFFSET_" str " %" PRIdPTR "\n", (intptr_t)offset); \ break; \ } |