summaryrefslogtreecommitdiff
path: root/ghc/rts/Adjustor.c
diff options
context:
space:
mode:
authorsewardj <unknown>2001-08-14 13:40:11 +0000
committersewardj <unknown>2001-08-14 13:40:11 +0000
commitbc5c802181b513216bc88f0d1ec9574157ee05fe (patch)
tree05a8e956456ba134ad7552dc6b3ed01045a7f997 /ghc/rts/Adjustor.c
parentb19d97709b3a5f8a6be04f113525f868cc48ad53 (diff)
downloadhaskell-bc5c802181b513216bc88f0d1ec9574157ee05fe.tar.gz
[project @ 2001-08-14 13:40:07 by sewardj]
Change the story about POSIX headers in C compilation. Until now, all C code in the RTS and library cbits has by default been compiled with settings for POSIXness enabled, that is: #define _POSIX_SOURCE 1 #define _POSIX_C_SOURCE 199309L #define _ISOC9X_SOURCE If you wanted to negate this, you'd have to define NON_POSIX_SOURCE before including headers. This scheme has some bad effects: * It means that ccall-unfoldings exported via interfaces from a module compiled with -DNON_POSIX_SOURCE may not compile when imported into a module which does not -DNON_POSIX_SOURCE. * It overlaps with the feature tests we do with autoconf. * It seems to have caused borkage in the Solaris builds for some considerable period of time. The New Way is: * The default changes to not-being-in-Posix mode. * If you want to force a C file into Posix mode, #include as the **first** include the new file ghc/includes/PosixSource.h. Most of the RTS C sources have this include now. * NON_POSIX_SOURCE is almost totally expunged. Unfortunately we have to retain some vestiges of it in ghc/compiler so that modules compiled via C on Solaris using older compilers don't break.
Diffstat (limited to 'ghc/rts/Adjustor.c')
-rw-r--r--ghc/rts/Adjustor.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ghc/rts/Adjustor.c b/ghc/rts/Adjustor.c
index e4a0f034ec..4d6c223c9b 100644
--- a/ghc/rts/Adjustor.c
+++ b/ghc/rts/Adjustor.c
@@ -36,6 +36,7 @@ and C resources. Failure to do so result in memory leaks on both the C and
Haskell side.
*/
+#include "PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
#include "RtsFlags.h"