diff options
-rw-r--r-- | includes/mkDerivedConstants.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/includes/mkDerivedConstants.c b/includes/mkDerivedConstants.c index f87db37deb..2fe99b6ba5 100644 --- a/includes/mkDerivedConstants.c +++ b/includes/mkDerivedConstants.c @@ -33,12 +33,18 @@ #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 " = %zd::Int\n", offset); + printf("oFFSET_" str " = %" SIZET_FMT "::Int\n", offset); #else #define def_offset(str, offset) \ - printf("#define OFFSET_" str " %zd\n", offset); + printf("#define OFFSET_" str " %" SIZET_FMT "\n", offset); #endif #if defined(GEN_HASKELL) |