summaryrefslogtreecommitdiff
path: root/ghc/rts/Disassembler.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/Disassembler.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/Disassembler.c')
-rw-r--r--ghc/rts/Disassembler.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ghc/rts/Disassembler.c b/ghc/rts/Disassembler.c
index 574f0a8c43..0063a65e05 100644
--- a/ghc/rts/Disassembler.c
+++ b/ghc/rts/Disassembler.c
@@ -5,12 +5,13 @@
* Copyright (c) 1994-1998.
*
* $RCSfile: Disassembler.c,v $
- * $Revision: 1.23 $
- * $Date: 2001/08/09 11:19:16 $
+ * $Revision: 1.24 $
+ * $Date: 2001/08/14 13:40:09 $
* ---------------------------------------------------------------------------*/
#ifdef DEBUG
+#include "PosixSource.h"
#include "Rts.h"
#include "RtsAPI.h"
#include "RtsUtils.h"