[commit: ghc] master: On AIX we need -D_BSD defined in <Stg.h> (6ef351d)
git at git.haskell.org
git at git.haskell.org
Fri Dec 4 09:43:34 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/6ef351df6172f0795e77323fa2ca45b3ae670502/ghc
>---------------------------------------------------------------
commit 6ef351df6172f0795e77323fa2ca45b3ae670502
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date: Fri Dec 4 10:40:42 2015 +0100
On AIX we need -D_BSD defined in <Stg.h>
As otherwise <math.h> includes <stdlib.h> which breaks compilation
of .hc files
>---------------------------------------------------------------
6ef351df6172f0795e77323fa2ca45b3ae670502
includes/Stg.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/includes/Stg.h b/includes/Stg.h
index f09fc00..899e685 100644
--- a/includes/Stg.h
+++ b/includes/Stg.h
@@ -48,6 +48,11 @@
// on Linux
# define _BSD_SOURCE
+// On AIX we need _BSD defined, otherwise <math.h> includes <stdlib.h>
+# if defined(_AIX)
+# define _BSD 1
+# 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