diff --git a/include/SDL_stdinc.h b/include/SDL_stdinc.h index bc5b2b695..c47ea4c3e 100644 --- a/include/SDL_stdinc.h +++ b/include/SDL_stdinc.h @@ -165,6 +165,23 @@ typedef uint64_t Uint64; /* @} *//* Basic data types */ +/* Make sure we have macros for printing 64 bit values. + * should define these but this is not true all platforms. + * (for example win32) */ +#ifndef PRIs64 +#ifdef __WIN32__ +#define PRIs64 "I64" +#else +#define PRIs64 "lld" +#endif +#endif +#ifndef PRIu64 +#ifdef __WIN32__ +#define PRIu64 "I64u" +#else +#define PRIu64 "llu" +#endif +#endif /* Annotations to help code analysis tools */ #ifdef SDL_DISABLE_ANALYZE_MACROS diff --git a/test/testgesture.c b/test/testgesture.c index 5a0d33337..89f5f368c 100644 --- a/test/testgesture.c +++ b/test/testgesture.c @@ -22,28 +22,6 @@ #include "SDL_touch.h" #include "SDL_gesture.h" -/* Make sure we have good macros for printing 32 and 64 bit values */ -#ifndef PRIs32 -#define PRIs32 "d" -#endif -#ifndef PRIu32 -#define PRIu32 "u" -#endif -#ifndef PRIs64 -#ifdef __WIN32__ -#define PRIs64 "I64" -#else -#define PRIs64 "lld" -#endif -#endif -#ifndef PRIu64 -#ifdef __WIN32__ -#define PRIu64 "I64u" -#else -#define PRIu64 "llu" -#endif -#endif - #define WIDTH 640 #define HEIGHT 480 #define BPP 4