From: Andreas Schneider Date: Tue, 10 Feb 2015 09:53:32 +0000 (+0100) Subject: cmocka: Fix printf integer formats. X-Git-Tag: cmocka-1.1.1~89 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a1bfbd86b20877a20c1e5f70271b3cf3d94a01a0;p=platform%2Fupstream%2Fcmocka.git cmocka: Fix printf integer formats. Signed-off-by: Andreas Schneider --- diff --git a/src/cmocka.c b/src/cmocka.c index 885cf33..c0a1bcf 100644 --- a/src/cmocka.c +++ b/src/cmocka.c @@ -47,21 +47,53 @@ WINBASEAPI BOOL WINAPI IsDebuggerPresent(VOID); #ifndef PRIdS -#define PRIdS "Id" +# define PRIdS "Id" #endif #ifndef PRIu64 -#define PRIu64 "I64u" +# define PRIu64 "I64u" +#endif + +#ifndef PRIuMAX +# define PRIuMAX PRIu64 +#endif + +#ifndef PRIxMAX +#define PRIxMAX "I64x" +#endif + +#ifndef PRIXMAX +#define PRIXMAX "I64X" #endif #else /* _WIN32 */ +#ifndef __PRI64_PREFIX +# if __WORDSIZE == 64 +# define __PRI64_PREFIX "l" +# else +# define __PRI64_PREFIX "ll" +# endif +#endif + #ifndef PRIdS -#define PRIdS "zd" +# define PRIdS "zd" #endif #ifndef PRIu64 -#define PRIu64 "llu" +# define PRIu64 __PRI64_PREFIX "u" +#endif + +#ifndef PRIuMAX +# define PRIuMAX __PRI64_PREFIX "u" +#endif + +#ifndef PRIxMAX +#define PRIxMAX __PRI64_PREFIX "x" +#endif + +#ifndef PRIXMAX +#define PRIXMAX __PRI64_PREFIX "X" #endif #include