diff options
author | Ian Lynagh <igloo@earth.li> | 2012-04-27 00:25:17 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-04-27 00:25:17 +0100 |
commit | d7b57949f3a9e42751f60fd09ddebd299b8762e7 (patch) | |
tree | 46dcb908ca96bf9e5a40cd6473825ee3ba02d178 /includes/Rts.h | |
parent | 0ff6dbc805c422e262784b49fd983780137e31cd (diff) | |
download | haskell-d7b57949f3a9e42751f60fd09ddebd299b8762e7.tar.gz |
Simplify format specifiers
It turns out that we can use %zu and %llu on Win32, provided we
include PosixSource everywhere we want to use them.
Diffstat (limited to 'includes/Rts.h')
-rw-r--r-- | includes/Rts.h | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/includes/Rts.h b/includes/Rts.h index 297297a6bd..e060e14915 100644 --- a/includes/Rts.h +++ b/includes/Rts.h @@ -143,26 +143,10 @@ void _assertFail(const char *filename, unsigned int linenum) #define USED_IF_NOT_THREADS #endif -#if SIZEOF_VOID_P == 8 -# define FMT_SizeT "zu" -# define FMT_HexSizeT "zx" -# define FMT_Word "zu" -# define FMT_Int "zd" -#elif SIZEOF_VOID_P == 4 -# if defined(mingw32_HOST_OS) -# define FMT_SizeT "u" -# define FMT_HexSizeT "x" -# define FMT_Word "u" -# define FMT_Int "d" -# else -# define FMT_SizeT "zu" -# define FMT_HexSizeT "zx" -# define FMT_Word "zu" -# define FMT_Int "zd" -# endif -#else -# error Cannot handle this word size -#endif +#define FMT_SizeT "zu" +#define FMT_HexSizeT "zx" +#define FMT_Word "zu" +#define FMT_Int "zd" /* * Getting printf formats right for platform-dependent typedefs @@ -171,16 +155,9 @@ void _assertFail(const char *filename, unsigned int linenum) #define FMT_Word64 "lu" #define FMT_Int64 "ld" #else -#if defined(mingw32_HOST_OS) && defined(i386_HOST_ARCH) -/* mingw doesn't understand %llu/%lld - it treats them as 32-bit - rather than 64-bit */ -#define FMT_Word64 "I64u" -#define FMT_Int64 "I64d" -#else #define FMT_Word64 "llu" #define FMT_Int64 "lld" #endif -#endif /* ----------------------------------------------------------------------------- Time values in the RTS |