[commit: ghc] master: Minor reordering of `#include`s fixing compilation on AIX (0d975a6)

git at git.haskell.org git at git.haskell.org
Sun Apr 23 13:32:36 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/0d975a623d6ad51ceb34bdb218a2d0f4a0448de6/ghc

>---------------------------------------------------------------

commit 0d975a623d6ad51ceb34bdb218a2d0f4a0448de6
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.


>---------------------------------------------------------------

0d975a623d6ad51ceb34bdb218a2d0f4a0448de6
 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 c83b3ba..006d63d 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