Commit 3f391645 authored by ian@well-typed.com's avatar ian@well-typed.com
Browse files

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
parent 6e1107b1
......@@ -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; \
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment