[commit: ghc] wip/ghc710-aix: On AIX we need -D_BSD defined in <Stg.h> (e64b049)
git at git.haskell.org
git at git.haskell.org
Mon Nov 16 08:44:17 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/ghc710-aix
Link : http://ghc.haskell.org/trac/ghc/changeset/e64b0499020c0d1fca75185174dfbd8b11ccb177/ghc
>---------------------------------------------------------------
commit e64b0499020c0d1fca75185174dfbd8b11ccb177
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
>---------------------------------------------------------------
e64b0499020c0d1fca75185174dfbd8b11ccb177
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