commit 9e211e646f9d51dc1372c9f3c8f47a78caf4f2a5
authorSam Lantinga <slouken@libsdl.org>
Sat, 21 Jun 2014 11:24:06 -0700
changeset 8883 0700ef83072a
parent 8882 4fc9e98413c3
child 8884 a13802298fdd
commit 9e211e646f9d51dc1372c9f3c8f47a78caf4f2a5 Author: Sam Clegg <sbc@chromium.org> Date: Fri Jun 20 12:52:11 2014 Fix win32 build which was failing due to missing PRIs64. This change adds definitions for the C99 PRIs16 and PRIu64 which are missing from <stdint.h> on at last win32 and possibly other platforms. These already existed in testgesture.c so I removed them from there also.
include/SDL_stdinc.h
test/testgesture.c
--- a/include/SDL_stdinc.h	Sat Jun 21 11:16:26 2014 -0700
+++ b/include/SDL_stdinc.h	Sat Jun 21 11:24:06 2014 -0700
@@ -165,6 +165,23 @@
 
 /* @} *//* Basic data types */
 
+/* Make sure we have macros for printing 64 bit values.
+ * <stdint.h> 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
--- a/test/testgesture.c	Sat Jun 21 11:16:26 2014 -0700
+++ b/test/testgesture.c	Sat Jun 21 11:24:06 2014 -0700
@@ -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