summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2017-04-23 15:28:52 +0200
committerHerbert Valerio Riedel <hvr@gnu.org>2017-04-23 15:31:44 +0200
commit0d975a623d6ad51ceb34bdb218a2d0f4a0448de6 (patch)
tree860ceee4038363dba65fb74b7f1304fbdf64c0cc
parent745032dd02da511067c2939259ed212852187e0f (diff)
downloadhaskell-0d975a623d6ad51ceb34bdb218a2d0f4a0448de6.tar.gz
Minor reordering of `#include`s fixing compilation on AIX
This helps ensure that system includes on some more fragile platforms (like e.g. AIX) see a more consistent set of CPP defines, and consequently reduce the risk of conflicting typdefs/prototypes being exposed.
-rw-r--r--rts/PathUtils.c6
-rw-r--r--rts/linker/LoadArchive.c5
-rw-r--r--rts/sm/CNF.c3
3 files changed, 7 insertions, 7 deletions
diff --git a/rts/PathUtils.c b/rts/PathUtils.c
index f27e03ff79..1b0b729f07 100644
--- a/rts/PathUtils.c
+++ b/rts/PathUtils.c
@@ -1,10 +1,10 @@
-#include <string.h>
-#include <stddef.h>
-
#include <Rts.h>
#include "RtsUtils.h"
#include "PathUtils.h"
+#include <string.h>
+#include <stddef.h>
+
#include <libgen.h>
#include <ctype.h>
diff --git a/rts/linker/LoadArchive.c b/rts/linker/LoadArchive.c
index c83b3baf25..006d63d3b5 100644
--- a/rts/linker/LoadArchive.c
+++ b/rts/linker/LoadArchive.c
@@ -1,6 +1,3 @@
-#include <string.h>
-#include <stddef.h>
-
#include <Rts.h>
#include "PathUtils.h"
@@ -20,6 +17,8 @@
# include <mach-o/fat.h>
#endif
+#include <string.h>
+#include <stddef.h>
#include <ctype.h>
#define FAIL(...) do {\
diff --git a/rts/sm/CNF.c b/rts/sm/CNF.c
index 624dba30b2..ed9460e678 100644
--- a/rts/sm/CNF.c
+++ b/rts/sm/CNF.c
@@ -11,7 +11,6 @@
#define _GNU_SOURCE
#include "PosixSource.h"
-#include <string.h>
#include "Rts.h"
#include "RtsUtils.h"
@@ -25,6 +24,8 @@
#include "Trace.h"
#include "sm/ShouldCompact.h"
+#include <string.h>
+
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif