summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-04-05 23:21:47 -0400
committerBen Gamari <ben@smart-cactus.org>2022-04-06 15:30:56 -0400
commitbfb796974fa0bfcaa9fc18c5deedca6889e4bdf2 (patch)
treefe42790f0d9a9d64d4109119c9e708136219d71c
parent88d610317a707eb33fe8f1a1a8ab6456279861f2 (diff)
downloadhaskell-bfb796974fa0bfcaa9fc18c5deedca6889e4bdf2.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."