summaryrefslogtreecommitdiff
path: root/ghc/lib/std/cbits/inputReady.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/lib/std/cbits/inputReady.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/lib/std/cbits/inputReady.c')
-rw-r--r--ghc/lib/std/cbits/inputReady.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/ghc/lib/std/cbits/inputReady.c b/ghc/lib/std/cbits/inputReady.c
index 5ab2991987..69737c583b 100644
--- a/ghc/lib/std/cbits/inputReady.c
+++ b/ghc/lib/std/cbits/inputReady.c
@@ -1,16 +1,13 @@
/*
* (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
*
- * $Id: inputReady.c,v 1.8 2001/07/09 16:30:50 sof Exp $
+ * $Id: inputReady.c,v 1.9 2001/08/14 13:40:08 sewardj Exp $
*
* hReady Runtime Support
*/
-/* select and supporting types is not */
-#ifndef _AIX
-#define NON_POSIX_SOURCE
-#endif
-
+/* select and supporting types is not Posix */
+/* #include "PosixSource.h" */
#include "HsStd.h"
/*