summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-04-05 23:21:47 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-04-08 03:01:53 -0400
commitc32c4db60307b1f64369d2c63ccee331c9f33f11 (patch)
tree77e2c0888497a1d31f77f3c23b09577cc7823d61
parent64ac20a72dfda1f6122d5c6dd5077796cd94f124 (diff)
downloadhaskell-c32c4db60307b1f64369d2c63ccee331c9f33f11.tar.gz
rts: Move __USE_MINGW_ANSI_STDIO definition to PosixSource.h
It's easier to ensure that this is included first than Rts.h
-rw-r--r--rts/include/rts/PosixSource.h12
-rw-r--r--rts/include/stg/Types.h12
2 files changed, 12 insertions, 12 deletions
diff --git a/rts/include/rts/PosixSource.h b/rts/include/rts/PosixSource.h
index 13fd7b0ff5..be6c8ecca1 100644
--- a/rts/include/rts/PosixSource.h
+++ b/rts/include/rts/PosixSource.h
@@ -36,3 +36,15 @@
#define _POSIX_C_SOURCE 200809L
#define _XOPEN_SOURCE 700
#endif
+
+#if defined(mingw32_HOST_OS)
+# if defined(__USE_MINGW_ANSI_STDIO)
+# if __USE_MINGW_ANSI_STDIO != 1
+# warning "Mismatch between __USE_MINGW_ANSI_STDIO definitions. \
+If using PosixSource.h make sure it is the first header included."
+# endif
+# else
+/* Inform mingw we want the ISO rather than Windows printf format specifiers. */
+# define __USE_MINGW_ANSI_STDIO 1
+#endif
+#endif
diff --git a/rts/include/stg/Types.h b/rts/include/stg/Types.h
index 05dec27f0c..1a9b1685fa 100644
--- a/rts/include/stg/Types.h
+++ b/rts/include/stg/Types.h
@@ -20,18 +20,6 @@
#pragma once
-#if defined(mingw32_HOST_OS)
-# if defined(__USE_MINGW_ANSI_STDIO)
-# if __USE_MINGW_ANSI_STDIO != 1
-# warning "Mismatch between __USE_MINGW_ANSI_STDIO definitions. \
-If using Rts.h make sure it is the first header included."
-# endif
-# else
-/* Inform mingw we want the ISO rather than Windows printf format specifiers. */
-# define __USE_MINGW_ANSI_STDIO 1
-#endif
-#endif
-
/* ISO C 99 says:
* "C++ implementations should define these macros only when
* __STDC_LIMIT_MACROS is defined before <stdint.h> is included."