summaryrefslogtreecommitdiff
path: root/includes/rts/Messages.h
diff options
context:
space:
mode:
Diffstat (limited to 'includes/rts/Messages.h')
-rw-r--r--includes/rts/Messages.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/includes/rts/Messages.h b/includes/rts/Messages.h
index 6f59d1dc3e..d3dabde3a9 100644
--- a/includes/rts/Messages.h
+++ b/includes/rts/Messages.h
@@ -19,6 +19,15 @@
#include <stdarg.h>
+#if defined(mingw32_HOST_OS)
+/* On Win64, if we say "printf" then gcc thinks we are going to use
+ MS format specifiers like %I64d rather than %llu */
+#define PRINTF gnu_printf
+#else
+/* However, on OS X, "gnu_printf" isn't recognised */
+#define PRINTF printf
+#endif
+
/* -----------------------------------------------------------------------------
* Message generation
* -------------------------------------------------------------------------- */
@@ -48,7 +57,7 @@ void vbarf(const char *s, va_list ap)
* errorBelch() invokes (*errorMsgFn)().
*/
void errorBelch(const char *s, ...)
- GNUC3_ATTRIBUTE(format (printf, 1, 2));
+ GNUC3_ATTRIBUTE(format (PRINTF, 1, 2));
void verrorBelch(const char *s, va_list ap);
@@ -62,7 +71,7 @@ void verrorBelch(const char *s, va_list ap);
* sysErrorBelch() invokes (*sysErrorMsgFn)().
*/
void sysErrorBelch(const char *s, ...)
- GNUC3_ATTRIBUTE(format (printf, 1, 2));
+ GNUC3_ATTRIBUTE(format (PRINTF, 1, 2));
void vsysErrorBelch(const char *s, va_list ap);
@@ -74,7 +83,7 @@ void vsysErrorBelch(const char *s, va_list ap);
* debugBelch() invokes (*debugMsgFn)().
*/
void debugBelch(const char *s, ...)
- GNUC3_ATTRIBUTE(format (printf, 1, 2));
+ GNUC3_ATTRIBUTE(format (PRINTF, 1, 2));
void vdebugBelch(const char *s, va_list ap);