summaryrefslogtreecommitdiff
path: root/ghc/rts/FrontPanel.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/FrontPanel.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/FrontPanel.c')
-rw-r--r--ghc/rts/FrontPanel.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ghc/rts/FrontPanel.c b/ghc/rts/FrontPanel.c
index 5f28103ce0..78675c6665 100644
--- a/ghc/rts/FrontPanel.c
+++ b/ghc/rts/FrontPanel.c
@@ -1,5 +1,5 @@
/* -----------------------------------------------------------------------------
- * $Id: FrontPanel.c,v 1.4 2001/01/19 11:08:05 simonmar Exp $
+ * $Id: FrontPanel.c,v 1.5 2001/08/14 13:40:09 sewardj Exp $
*
* (c) The GHC Team 2000
*
@@ -9,7 +9,8 @@
#ifdef RTS_GTK_FRONTPANEL
-#define NON_POSIX_SOURCE
+/* Alas, not Posix. */
+/* #include "PosixSource.h" */
#include "Rts.h"
#include "RtsUtils.h"