always define PRI?64 using 'I64' when targeting windows
avoids -Wformat warnings from mingw toolchains -- e.g.: src/test/SDL_test_harness.c:581:37: warning: unknown conversion type character 'l' in format [-Wformat=]
This commit is contained in:
@@ -291,10 +291,10 @@ typedef Sint64 SDL_Time;
|
|||||||
* <stdint.h> should define these but this is not true all platforms.
|
* <stdint.h> should define these but this is not true all platforms.
|
||||||
* (for example win32) */
|
* (for example win32) */
|
||||||
#ifndef SDL_PRIs64
|
#ifndef SDL_PRIs64
|
||||||
#ifdef PRIs64
|
#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
|
||||||
#define SDL_PRIs64 PRIs64
|
|
||||||
#elif defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
|
|
||||||
#define SDL_PRIs64 "I64d"
|
#define SDL_PRIs64 "I64d"
|
||||||
|
#elif defined(PRIs64)
|
||||||
|
#define SDL_PRIs64 PRIs64
|
||||||
#elif defined(__LP64__) && !defined(SDL_PLATFORM_APPLE)
|
#elif defined(__LP64__) && !defined(SDL_PLATFORM_APPLE)
|
||||||
#define SDL_PRIs64 "ld"
|
#define SDL_PRIs64 "ld"
|
||||||
#else
|
#else
|
||||||
@@ -302,10 +302,10 @@ typedef Sint64 SDL_Time;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifndef SDL_PRIu64
|
#ifndef SDL_PRIu64
|
||||||
#ifdef PRIu64
|
#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
|
||||||
#define SDL_PRIu64 PRIu64
|
|
||||||
#elif defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
|
|
||||||
#define SDL_PRIu64 "I64u"
|
#define SDL_PRIu64 "I64u"
|
||||||
|
#elif defined(PRIu64)
|
||||||
|
#define SDL_PRIu64 PRIu64
|
||||||
#elif defined(__LP64__) && !defined(SDL_PLATFORM_APPLE)
|
#elif defined(__LP64__) && !defined(SDL_PLATFORM_APPLE)
|
||||||
#define SDL_PRIu64 "lu"
|
#define SDL_PRIu64 "lu"
|
||||||
#else
|
#else
|
||||||
@@ -313,10 +313,10 @@ typedef Sint64 SDL_Time;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifndef SDL_PRIx64
|
#ifndef SDL_PRIx64
|
||||||
#ifdef PRIx64
|
#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
|
||||||
#define SDL_PRIx64 PRIx64
|
|
||||||
#elif defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
|
|
||||||
#define SDL_PRIx64 "I64x"
|
#define SDL_PRIx64 "I64x"
|
||||||
|
#elif defined(PRIx64)
|
||||||
|
#define SDL_PRIx64 PRIx64
|
||||||
#elif defined(__LP64__) && !defined(SDL_PLATFORM_APPLE)
|
#elif defined(__LP64__) && !defined(SDL_PLATFORM_APPLE)
|
||||||
#define SDL_PRIx64 "lx"
|
#define SDL_PRIx64 "lx"
|
||||||
#else
|
#else
|
||||||
@@ -324,10 +324,10 @@ typedef Sint64 SDL_Time;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifndef SDL_PRIX64
|
#ifndef SDL_PRIX64
|
||||||
#ifdef PRIX64
|
#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
|
||||||
#define SDL_PRIX64 PRIX64
|
|
||||||
#elif defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
|
|
||||||
#define SDL_PRIX64 "I64X"
|
#define SDL_PRIX64 "I64X"
|
||||||
|
#elif defined(PRIX64)
|
||||||
|
#define SDL_PRIX64 PRIX64
|
||||||
#elif defined(__LP64__) && !defined(SDL_PLATFORM_APPLE)
|
#elif defined(__LP64__) && !defined(SDL_PLATFORM_APPLE)
|
||||||
#define SDL_PRIX64 "lX"
|
#define SDL_PRIX64 "lX"
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user