summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-11-05 18:45:10 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-11-07 21:25:36 -0500
commitae431cf4f3bf4ee46098f4dfad1d9f2ccbc7a251 (patch)
tree9d1c635d24449bda6f2711acaac337ca7c01e588 /rts
parentb1c158c9654d033dfe39bb042ec5d4d39a272298 (diff)
downloadhaskell-ae431cf4f3bf4ee46098f4dfad1d9f2ccbc7a251.tar.gz
rts: Ensure that Rts.h is always included first
In general this is the convention that we use in the RTS. On Windows things actually fail if we break it. For instance, you see things like: includes\stg\Types.h:26:9: error: warning: #warning "Mismatch between __USE_MINGW_ANSI_STDIO definitions. If using Rts.h make sure it is the first header included." [-Wcpp]
Diffstat (limited to 'rts')
-rw-r--r--rts/linker/elf_got.c2
-rw-r--r--rts/linker/elf_plt.c4
-rw-r--r--rts/linker/elf_plt_aarch64.c4
-rw-r--r--rts/linker/elf_plt_arm.c5
-rw-r--r--rts/linker/elf_reloc.c1
-rw-r--r--rts/linker/elf_reloc_aarch64.c7
-rw-r--r--rts/linker/elf_util.c1
7 files changed, 18 insertions, 6 deletions
diff --git a/rts/linker/elf_got.c b/rts/linker/elf_got.c
index 27e0f818a0..991c6a9f91 100644
--- a/rts/linker/elf_got.c
+++ b/rts/linker/elf_got.c
@@ -1,4 +1,6 @@
+#include "Rts.h"
#include "elf_got.h"
+
#include <string.h>
#if defined(OBJFORMAT_ELF)
diff --git a/rts/linker/elf_plt.c b/rts/linker/elf_plt.c
index 69a9f0782a..9cd42efff2 100644
--- a/rts/linker/elf_plt.c
+++ b/rts/linker/elf_plt.c
@@ -1,7 +1,9 @@
+#include "Rts.h"
+#include "elf_plt.h"
+
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
-#include "elf_plt.h"
#if defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH)
#if defined(OBJFORMAT_ELF)
diff --git a/rts/linker/elf_plt_aarch64.c b/rts/linker/elf_plt_aarch64.c
index 85c7a9b0c1..6a9d1ddd94 100644
--- a/rts/linker/elf_plt_aarch64.c
+++ b/rts/linker/elf_plt_aarch64.c
@@ -1,7 +1,9 @@
-#include <stdlib.h>
+#include "Rts.h"
#include "elf_compat.h"
#include "elf_plt_aarch64.h"
+#include <stdlib.h>
+
#if defined(aarch64_HOST_ARCH)
#if defined(OBJFORMAT_ELF)
diff --git a/rts/linker/elf_plt_arm.c b/rts/linker/elf_plt_arm.c
index 4fa9a28b19..bd21243ec4 100644
--- a/rts/linker/elf_plt_arm.c
+++ b/rts/linker/elf_plt_arm.c
@@ -1,8 +1,9 @@
+#include "Rts.h"
+#include "elf_compat.h"
+
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
-#include "elf_compat.h"
-#include "ghcplatform.h"
#if defined(arm_HOST_ARCH)
diff --git a/rts/linker/elf_reloc.c b/rts/linker/elf_reloc.c
index e1421d2269..410a23607b 100644
--- a/rts/linker/elf_reloc.c
+++ b/rts/linker/elf_reloc.c
@@ -1,3 +1,4 @@
+#include "Rts.h"
#include "elf_reloc.h"
#include "elf_plt.h"
diff --git a/rts/linker/elf_reloc_aarch64.c b/rts/linker/elf_reloc_aarch64.c
index bb15576d06..c2df14b06e 100644
--- a/rts/linker/elf_reloc_aarch64.c
+++ b/rts/linker/elf_reloc_aarch64.c
@@ -1,11 +1,14 @@
-#include <stdlib.h>
-#include <assert.h>
+#include "Rts.h"
#include "elf_compat.h"
#include "elf_reloc_aarch64.h"
#include "util.h"
#include "elf_util.h"
#include "elf_plt.h"
+#include <stdlib.h>
+#include <assert.h>
+
+
#if defined(aarch64_HOST_ARCH)
#if defined(OBJFORMAT_ELF)
diff --git a/rts/linker/elf_util.c b/rts/linker/elf_util.c
index 052b2d9cae..fe7e2c35a4 100644
--- a/rts/linker/elf_util.c
+++ b/rts/linker/elf_util.c
@@ -1,3 +1,4 @@
+#include "Rts.h"
#include "linker/elf_util.h"
#if defined(OBJFORMAT_ELF)