summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rts/Stats.c10
-rw-r--r--rts/Stats.h9
-rw-r--r--rts/include/rts/Messages.h2
3 files changed, 12 insertions, 9 deletions
diff --git a/rts/Stats.c b/rts/Stats.c
index ea57f60e70..fb87a6d8e4 100644
--- a/rts/Stats.c
+++ b/rts/Stats.c
@@ -26,6 +26,16 @@
#include <string.h> // for memset
+#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
+
+
#if defined(THREADED_RTS)
// Protects all statistics below
Mutex stats_mutex;
diff --git a/rts/Stats.h b/rts/Stats.h
index 5268c3ae63..ebbb197cf9 100644
--- a/rts/Stats.h
+++ b/rts/Stats.h
@@ -14,15 +14,6 @@
#include "BeginPrivate.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
-
struct gc_thread_;
void stat_startInit(void);
diff --git a/rts/include/rts/Messages.h b/rts/include/rts/Messages.h
index b19c02de3d..f9b3009c20 100644
--- a/rts/include/rts/Messages.h
+++ b/rts/include/rts/Messages.h
@@ -103,3 +103,5 @@ extern RtsMsgFunction rtsFatalInternalErrorFn;
extern RtsMsgFunctionRetLen rtsDebugMsgFn;
extern RtsMsgFunction rtsErrorMsgFn;
extern RtsMsgFunction rtsSysErrorMsgFn;
+
+#undef PRINTF