[commit: ghc] wip/ghc710-aix: On AIX we need -D_BSD defined in <Stg.h> (bac953b)

git at git.haskell.org git at git.haskell.org
Tue Nov 17 22:28:59 UTC 2015


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

On branch  : wip/ghc710-aix
Link       : http://ghc.haskell.org/trac/ghc/changeset/bac953b23611fc2fb58a79bd2e432a947668c1b6/ghc

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

commit bac953b23611fc2fb58a79bd2e432a947668c1b6
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Mon Nov 16 09:41:27 2015 +0100

    On AIX we need -D_BSD defined in <Stg.h>
    
    otherwise <math.h> includes <stdlib.h> which breaks compilation
    of .hc files


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

bac953b23611fc2fb58a79bd2e432a947668c1b6
 includes/Stg.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/includes/Stg.h b/includes/Stg.h
index f09fc00..35855b5 100644
--- a/includes/Stg.h
+++ b/includes/Stg.h
@@ -48,6 +48,11 @@
 // on Linux
 # define _BSD_SOURCE
 
+//# if aix_HOST_OS
+// On AIX we need _BSD defined, otherwise <math.h> includes <stdlib.h>
+#  define _BSD
+//# endif
+
 // '_BSD_SOURCE' is deprecated since glibc-2.20
 // in favour of '_DEFAULT_SOURCE'
 # define _DEFAULT_SOURCE



More information about the ghc-commits mailing list