Commit 2f986c6f authored by Simon Marlow's avatar Simon Marlow
Browse files

avoid using non-standard %zd format specifier (#3804)

parent aa2e8180
......@@ -31,19 +31,13 @@
#define OFFSET(s_type, field) ((size_t)&(((s_type*)0)->field))
#ifdef mingw32_HOST_OS
#define SIZET_FMT "d"
#else
#define SIZET_FMT "zd"
#endif
#if defined(GEN_HASKELL)
#define def_offset(str, offset) \
printf("oFFSET_" str " :: Int\n"); \
printf("oFFSET_" str " = %" SIZET_FMT "\n", offset);
printf("oFFSET_" str " = %lu\n", (unsigned long)offset);
#else
#define def_offset(str, offset) \
printf("#define OFFSET_" str " %" SIZET_FMT "\n", offset);
printf("#define OFFSET_" str " %lu\n", (unsigned long)offset);
#endif
#if defined(GEN_HASKELL)
......
Supports Markdown
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