Commit bcaf68a9 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Fix size mismatch errors in mkDerivedConstants.c

parent 974d0c01
...@@ -31,14 +31,14 @@ ...@@ -31,14 +31,14 @@
#define str(a,b) #a "_" #b #define str(a,b) #a "_" #b
#define OFFSET(s_type, field) ((unsigned int)&(((s_type*)0)->field)) #define OFFSET(s_type, field) ((size_t)&(((s_type*)0)->field))
#if defined(GEN_HASKELL) #if defined(GEN_HASKELL)
#define def_offset(str, offset) \ #define def_offset(str, offset) \
printf("oFFSET_" str " = %d::Int\n", offset); printf("oFFSET_" str " = %zd::Int\n", offset);
#else #else
#define def_offset(str, offset) \ #define def_offset(str, offset) \
printf("#define OFFSET_" str " %d\n", offset); printf("#define OFFSET_" str " %zd\n", offset);
#endif #endif
#if defined(GEN_HASKELL) #if defined(GEN_HASKELL)
......
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