Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/d7b57949f3a9e42751f60fd09ddebd299b8762e7 >--------------------------------------------------------------- commit d7b57949f3a9e42751f60fd09ddebd299b8762e7 Author: Ian Lynagh <[email protected]> Date: Fri Apr 27 00:25:17 2012 +0100 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. >--------------------------------------------------------------- includes/Rts.h | 31 ++++--------------------------- 1 files changed, 4 insertions(+), 27 deletions(-) diff --git a/includes/Rts.h b/includes/Rts.h index 297297a..e060e14 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 _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
