From 862e2194433b5d47aaf88261091b35a1ee663482 Mon Sep 17 00:00:00 2001 From: Tycho Date: Wed, 12 Mar 2014 10:34:50 -0700 Subject: Added additional macros to support the MSVC size_t format and changed all formats to use the macros --- src/Globals.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Globals.h') diff --git a/src/Globals.h b/src/Globals.h index faa168c59..08d9e971a 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -43,6 +43,8 @@ // MSVC has its own custom version of zu format #define SIZE_T_FMT "%Iu" + #define SIZE_T_FMT_PRECISION(x) "%" #x "Iu" + #define SIZE_T_FMT_HEX "%Ix" #elif defined(__GNUC__) @@ -65,6 +67,8 @@ #define FORMATSTRING(formatIndex,va_argsIndex) __attribute__((format (printf, formatIndex, va_argsIndex))) #define SIZE_T_FMT "%zu" + #define SIZE_T_FMT_PRECISION(x) "%" #x "zu" + #define SIZE_T_FMT_HEX "%zx" #else -- cgit v1.2.3