diff options
author | Ian Lynagh <igloo@earth.li> | 2007-06-16 19:37:45 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2007-06-16 19:37:45 +0000 |
commit | dd8c6f0e2d58db6f216d7280d69e19088b002a14 (patch) | |
tree | f2d7f10c3a757dca24fac108a67dcbb816b4be11 /includes | |
parent | 9b70ae2db513be48a1c07bad7ee52ebb4b39132e (diff) | |
download | haskell-dd8c6f0e2d58db6f216d7280d69e19088b002a14.tar.gz |
Use %d rather than %zd on Windows
Diffstat (limited to 'includes')
-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) |