From ab0e1611e737e65c406134372e6d433e64c8935f Mon Sep 17 00:00:00 2001 From: Alcaro Date: Mon, 27 Nov 2017 16:57:15 +0100 Subject: [PATCH] fix #5497 close #5802 according to https://github.com/libretro/RetroArch/issues/5497#issuecomment-336640951, this header exists on everything we care about except various microsoft platforms, and all of them have constant printf strings --- libretro-common/include/retro_common_api.h | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/libretro-common/include/retro_common_api.h b/libretro-common/include/retro_common_api.h index 659f90d76e..6967d31adb 100644 --- a/libretro-common/include/retro_common_api.h +++ b/libretro-common/include/retro_common_api.h @@ -75,19 +75,16 @@ typedef int ssize_t; #include #endif -#ifdef _WIN32 -#define STRING_REP_INT64 "%I64d" -#define STRING_REP_UINT64 "%I64u" -#define STRING_REP_USIZE "%Iu" -#elif defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L && !defined(VITA) && !defined(WIIU) -#define STRING_REP_INT64 "%lld" -#define STRING_REP_UINT64 "%llu" -#define STRING_REP_USIZE "%zu" +#ifndef _WIN32 +#include #else -#define STRING_REP_INT64 "%lld" -#define STRING_REP_UINT64 "%llu" -#define STRING_REP_USIZE "%lu" +#define PRId64 "%I64d" +#define PRIu64 "%I64u" +#define PRIuPTR "%Iu" #endif +#define STRING_REP_INT64 PRId64 +#define STRING_REP_UINT64 PRIu64 +#define STRING_REP_USIZE PRIuPTR /* I would like to see retro_inline.h moved in here; possibly boolean too.