[commit: ghc] ghc-8.2: Minor reordering of `#include`s fixing compilation on AIX (fe80c31)
git at git.haskell.org
git at git.haskell.org
Thu Apr 27 20:09:54 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.2
Link : http://ghc.haskell.org/trac/ghc/changeset/fe80c3128bb0ccf861e355f60bf332469320f210/ghc
>---------------------------------------------------------------
commit fe80c3128bb0ccf861e355f60bf332469320f210
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date: Sun Apr 23 15:28:52 2017 +0200
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.
(cherry picked from commit 0d975a623d6ad51ceb34bdb218a2d0f4a0448de6)
>---------------------------------------------------------------
fe80c3128bb0ccf861e355f60bf332469320f210
rts/PathUtils.c | 6 +++---
rts/linker/LoadArchive.c | 5 ++---
rts/sm/CNF.c | 3 ++-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/rts/PathUtils.c b/rts/PathUtils.c
index f27e03f..1b0b729 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 f9997cf..4d6b2fe 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 624dba3..ed9460e 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
More information about the ghc-commits
mailing list