From: sewardj Date: Tue, 14 Aug 2001 13:40:11 +0000 (+0000) Subject: [project @ 2001-08-14 13:40:07 by sewardj] X-Git-Tag: Approximately_9120_patches~1263 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=bc5c802181b513216bc88f0d1ec9574157ee05fe;p=ghc-hetmet.git [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. --- diff --git a/configure.in b/configure.in index cafba55..27447f3 100644 --- a/configure.in +++ b/configure.in @@ -626,7 +626,7 @@ dnl ** check for full ANSI header (.h) files AC_HEADER_STDC dnl ** check for specific header (.h) files that we are interested in -AC_CHECK_HEADERS(Files.h arpa/inet.h assert.h console.h ctype.h dirent.h errno.h fcntl.h float.h ftw.h grp.h ieee754.h inttypes.h malloc.h memory.h nlist.h pascal.h pwd.h sgtty.h siginfo.h signal.h stat.h stdint.h stdlib.h stdarg.h string.h sys/fault.h sys/file.h sys/ioctl.h sys/limits.h sys/mman.h sys/param.h sys/procfs.h sys/resource.h sys/signal.h sys/socket.h netdb.h netinet/in.h netinet/tcp.h sys/stat.h sys/syscall.h sys/time.h sys/timeb.h sys/timers.h sys/times.h sys/types.h sys/un.h sys/utsname.h sys/vadvise.h sys/wait.h termio.h termios.h time.h types.h unistd.h utime.h values.h vfork.h bfd.h winsock.h) +AC_CHECK_HEADERS(Files.h arpa/inet.h assert.h console.h ctype.h dirent.h errno.h fcntl.h float.h ftw.h grp.h ieee754.h inttypes.h limits.h malloc.h memory.h nlist.h pascal.h pwd.h sgtty.h siginfo.h signal.h stat.h stdint.h stdlib.h stdarg.h string.h sys/fault.h sys/file.h sys/ioctl.h sys/limits.h sys/mman.h sys/param.h sys/procfs.h sys/resource.h sys/signal.h sys/socket.h netdb.h netinet/in.h netinet/tcp.h sys/stat.h sys/syscall.h sys/time.h sys/timeb.h sys/timers.h sys/times.h sys/types.h sys/un.h sys/utsname.h sys/vadvise.h sys/wait.h termio.h termios.h time.h types.h unistd.h utime.h values.h vfork.h bfd.h winsock.h) AC_CHECK_HEADER(readline/readline.h, HaveReadlineReadlineH=YES, HaveReadlineReadlineH=NO) AC_CHECK_HEADER(readline/history.h, HaveReadlineHistoryH=YES, HaveReadlineHistoryH=NO) diff --git a/ghc/compiler/ghci/ByteCodeItbls.lhs b/ghc/compiler/ghci/ByteCodeItbls.lhs index 7a42b8d..ae1f35b 100644 --- a/ghc/compiler/ghci/ByteCodeItbls.lhs +++ b/ghc/compiler/ghci/ByteCodeItbls.lhs @@ -4,6 +4,9 @@ \section[ByteCodeItbls]{Generate infotables for interpreter-made bytecodes} \begin{code} + +{-# OPTIONS -optc-DNON_POSIX_SOURCE #-} + module ByteCodeItbls ( ItblEnv, ItblPtr, mkITbls ) where #include "HsVersions.h" diff --git a/ghc/compiler/ghci/ByteCodeLink.lhs b/ghc/compiler/ghci/ByteCodeLink.lhs index 70727f4..73ccb95 100644 --- a/ghc/compiler/ghci/ByteCodeLink.lhs +++ b/ghc/compiler/ghci/ByteCodeLink.lhs @@ -4,6 +4,9 @@ \section[ByteCodeLink]{Bytecode assembler and linker} \begin{code} + +{-# OPTIONS -optc-DNON_POSIX_SOURCE #-} + module ByteCodeLink ( UnlinkedBCO, UnlinkedBCOExpr, assembleBCO, ClosureEnv, HValue, filterNameMap, linkIModules, linkIExpr, diff --git a/ghc/compiler/main/DriverState.hs b/ghc/compiler/main/DriverState.hs index e9b6282..e45dcd0 100644 --- a/ghc/compiler/main/DriverState.hs +++ b/ghc/compiler/main/DriverState.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: DriverState.hs,v 1.53 2001/08/13 15:49:38 simonmar Exp $ +-- $Id: DriverState.hs,v 1.54 2001/08/14 13:40:08 sewardj Exp $ -- -- Settings for the driver -- @@ -146,7 +146,7 @@ GLOBAL_VAR(v_minus_o2_for_C, False, Bool) GLOBAL_VAR(v_MaxSimplifierIterations, 4, Int) GLOBAL_VAR(v_StgStats, False, Bool) GLOBAL_VAR(v_UsageSPInf, False, Bool) -- Off by default -GLOBAL_VAR(v_Strictness, True, Bool) +GLOBAL_VAR(v_Strictness, False{-True-}, Bool) GLOBAL_VAR(v_CPR, True, Bool) GLOBAL_VAR(v_CSE, True, Bool) diff --git a/ghc/compiler/main/Main.hs b/ghc/compiler/main/Main.hs index 0ecb6d2..b11326c 100644 --- a/ghc/compiler/main/Main.hs +++ b/ghc/compiler/main/Main.hs @@ -1,6 +1,7 @@ -{-# OPTIONS -fno-warn-incomplete-patterns #-} +{-# OPTIONS -fno-warn-incomplete-patterns -optc-DNON_POSIX_SOURCE #-} + ----------------------------------------------------------------------------- --- $Id: Main.hs,v 1.86 2001/08/13 15:49:38 simonmar Exp $ +-- $Id: Main.hs,v 1.87 2001/08/14 13:40:08 sewardj Exp $ -- -- GHC Driver program -- diff --git a/ghc/compiler/prelude/PrelRules.lhs b/ghc/compiler/prelude/PrelRules.lhs index bf3549e..7b944ed 100644 --- a/ghc/compiler/prelude/PrelRules.lhs +++ b/ghc/compiler/prelude/PrelRules.lhs @@ -12,6 +12,9 @@ ToDo: (i1 + i2) only if it results in a valid Float. \begin{code} + +{-# OPTIONS -optc-DNON_POSIX_SOURCE #-} + module PrelRules ( primOpRule, builtinRules ) where #include "HsVersions.h" diff --git a/ghc/compiler/utils/PrimPacked.lhs b/ghc/compiler/utils/PrimPacked.lhs index d6b25c4..286cf12 100644 --- a/ghc/compiler/utils/PrimPacked.lhs +++ b/ghc/compiler/utils/PrimPacked.lhs @@ -8,7 +8,7 @@ of bytes (character strings). Used by the interface lexer input subsystem, mostly. \begin{code} -{-# OPTIONS -fvia-C -monly-3-regs #-} +{-# OPTIONS -monly-3-regs -optc-DNON_POSIX_SOURCE #-} module PrimPacked ( strLength, -- :: _Addr -> Int diff --git a/ghc/compiler/utils/StringBuffer.lhs b/ghc/compiler/utils/StringBuffer.lhs index 8853ed7..dfe061e 100644 --- a/ghc/compiler/utils/StringBuffer.lhs +++ b/ghc/compiler/utils/StringBuffer.lhs @@ -7,7 +7,7 @@ Buffers for scanning string input stored in external arrays. \begin{code} -{-# OPTIONS -fvia-C #-} +{-# OPTIONS -optc-DNON_POSIX_SOURCE #-} module StringBuffer ( diff --git a/ghc/includes/PosixSource.h b/ghc/includes/PosixSource.h new file mode 100644 index 0000000..5ccff75 --- /dev/null +++ b/ghc/includes/PosixSource.h @@ -0,0 +1,19 @@ +/* ----------------------------------------------------------------------------- + * $Id: PosixSource.h,v 1.1 2001/08/14 13:40:08 sewardj Exp $ + * + * (c) The GHC Team, 1998-2001 + * + * Include this file into sources which should not need any non-Posix services. + * That includes most RTS C sources. + * ---------------------------------------------------------------------------*/ + +#ifndef POSIXSOURCE_H +#define POSIXSOURCE_H + +#define _POSIX_SOURCE 1 +#define _POSIX_C_SOURCE 199309L +#define _ISOC9X_SOURCE + +/* Let's be ISO C9X too... */ + +#endif diff --git a/ghc/includes/Stg.h b/ghc/includes/Stg.h index 8908cf3..b046847 100644 --- a/ghc/includes/Stg.h +++ b/ghc/includes/Stg.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Stg.h,v 1.36 2001/03/01 12:25:32 rrt Exp $ + * $Id: Stg.h,v 1.37 2001/08/14 13:40:08 sewardj Exp $ * * (c) The GHC Team, 1998-1999 * @@ -12,13 +12,6 @@ #ifndef STG_H #define STG_H -#ifndef NON_POSIX_SOURCE -#define _POSIX_SOURCE 1 -#define _POSIX_C_SOURCE 199309L -#define _ISOC9X_SOURCE -#endif - -/* Let's be ISO C9X too... */ /* If we include "Stg.h" directly, we're in STG code, and we therefore * get all the global register variables, macros etc. that go along diff --git a/ghc/lib/std/PrelPosix.hsc b/ghc/lib/std/PrelPosix.hsc index 59b953c..6432a29 100644 --- a/ghc/lib/std/PrelPosix.hsc +++ b/ghc/lib/std/PrelPosix.hsc @@ -1,15 +1,18 @@ -{-# OPTIONS -fno-implicit-prelude -optc-DNON_POSIX_SOURCE #-} +{-# OPTIONS -fno-implicit-prelude #-} -- --------------------------------------------------------------------------- --- $Id: PrelPosix.hsc,v 1.10 2001/08/10 11:02:00 simonmar Exp $ +-- $Id: PrelPosix.hsc,v 1.11 2001/08/14 13:40:08 sewardj Exp $ -- -- POSIX support layer for the standard libraries -- --- NON_POSIX_SOURCE needed for the following features: +-- Non-posix compliant in order to support the following features: -- * S_ISSOCK (no sockets in POSIX) module PrelPosix where +-- See above comment for non-Posixness reasons. +-- #include "PosixSource.h" + #include "HsStd.h" import PrelBase diff --git a/ghc/lib/std/Time.hsc b/ghc/lib/std/Time.hsc index fbfc0bd..45d8583 100644 --- a/ghc/lib/std/Time.hsc +++ b/ghc/lib/std/Time.hsc @@ -1,9 +1,6 @@ -{-# OPTIONS -optc-DNON_POSIX_SOURCE #-} --- JRS 010117: we had to say NON_POSIX_SOURCE to get the resulting .hc --- to compile on sparc-solaris. Blargh. -- ----------------------------------------------------------------------------- --- $Id: Time.hsc,v 1.19 2001/07/24 05:53:27 ken Exp $ +-- $Id: Time.hsc,v 1.20 2001/08/14 13:40:08 sewardj Exp $ -- -- (c) The University of Glasgow, 1995-2001 -- diff --git a/ghc/lib/std/cbits/inputReady.c b/ghc/lib/std/cbits/inputReady.c index 5ab2991..69737c5 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" /* diff --git a/ghc/lib/std/cbits/system.c b/ghc/lib/std/cbits/system.c index d077323..b912a48 100644 --- a/ghc/lib/std/cbits/system.c +++ b/ghc/lib/std/cbits/system.c @@ -1,13 +1,13 @@ /* * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998 * - * $Id: system.c,v 1.17 2001/08/07 08:18:15 rrt Exp $ + * $Id: system.c,v 1.18 2001/08/14 13:40:08 sewardj Exp $ * * system Runtime Support */ /* The itimer stuff in this module is non-posix */ -#define NON_POSIX_SOURCE +/* #include "PosixSource.h" */ #include "HsStd.h" diff --git a/ghc/rts/Adjustor.c b/ghc/rts/Adjustor.c index e4a0f03..4d6c223 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" diff --git a/ghc/rts/BlockAlloc.c b/ghc/rts/BlockAlloc.c index 6186671..65205f8 100644 --- a/ghc/rts/BlockAlloc.c +++ b/ghc/rts/BlockAlloc.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: BlockAlloc.c,v 1.9 2001/07/23 17:23:19 simonmar Exp $ + * $Id: BlockAlloc.c,v 1.10 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team 1998-2000 * @@ -16,6 +16,7 @@ * * ---------------------------------------------------------------------------*/ +#include "PosixSource.h" #include "Rts.h" #include "RtsFlags.h" #include "RtsUtils.h" diff --git a/ghc/rts/ClosureFlags.c b/ghc/rts/ClosureFlags.c index b94670b..314d5f5 100644 --- a/ghc/rts/ClosureFlags.c +++ b/ghc/rts/ClosureFlags.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: ClosureFlags.c,v 1.10 2001/07/23 17:23:19 simonmar Exp $ + * $Id: ClosureFlags.c,v 1.11 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team 1998-1999 * @@ -7,6 +7,7 @@ * * ---------------------------------------------------------------------------*/ +#include "PosixSource.h" #include "Rts.h" StgWord16 closure_flags[] = { diff --git a/ghc/rts/Disassembler.c b/ghc/rts/Disassembler.c index 574f0a8..0063a65 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" diff --git a/ghc/rts/FrontPanel.c b/ghc/rts/FrontPanel.c index 5f28103..78675c6 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" diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c index 67d744a..23c835f 100644 --- a/ghc/rts/GC.c +++ b/ghc/rts/GC.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: GC.c,v 1.119 2001/08/10 10:52:12 simonmar Exp $ + * $Id: GC.c,v 1.120 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team 1998-1999 * @@ -7,6 +7,7 @@ * * ---------------------------------------------------------------------------*/ +#include "PosixSource.h" #include "Rts.h" #include "RtsFlags.h" #include "RtsUtils.h" diff --git a/ghc/rts/GCCompact.c b/ghc/rts/GCCompact.c index 8f494f4..3254ba6 100644 --- a/ghc/rts/GCCompact.c +++ b/ghc/rts/GCCompact.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: GCCompact.c,v 1.8 2001/08/10 09:40:11 simonmar Exp $ + * $Id: GCCompact.c,v 1.9 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team 2001 * @@ -7,6 +7,7 @@ * * ---------------------------------------------------------------------------*/ +#include "PosixSource.h" #include "Rts.h" #include "RtsUtils.h" #include "RtsFlags.h" diff --git a/ghc/rts/Hash.c b/ghc/rts/Hash.c index 50fb3bc..9b9e98a 100644 --- a/ghc/rts/Hash.c +++ b/ghc/rts/Hash.c @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------- - * $Id: Hash.c,v 1.5 2001/06/27 11:29:10 sewardj Exp $ + * $Id: Hash.c,v 1.6 2001/08/14 13:40:09 sewardj Exp $ * * (c) The AQUA Project, Glasgow University, 1995-1998 * (c) The GHC Team, 1999 @@ -9,6 +9,7 @@ * pp. 446 -- 457. * -------------------------------------------------------------------------- */ +#include "PosixSource.h" #include "Rts.h" #include "Hash.h" #include "RtsUtils.h" diff --git a/ghc/rts/Interpreter.c b/ghc/rts/Interpreter.c index 68ab9fe..deb42fb 100644 --- a/ghc/rts/Interpreter.c +++ b/ghc/rts/Interpreter.c @@ -5,10 +5,11 @@ * Copyright (c) 1994-2000. * * $RCSfile: Interpreter.c,v $ - * $Revision: 1.29 $ - * $Date: 2001/08/09 11:23:19 $ + * $Revision: 1.30 $ + * $Date: 2001/08/14 13:40:09 $ * ---------------------------------------------------------------------------*/ +#include "PosixSource.h" #include "Rts.h" #include "RtsAPI.h" #include "RtsUtils.h" diff --git a/ghc/rts/Itimer.c b/ghc/rts/Itimer.c index 5b10a5b..1d63adf 100644 --- a/ghc/rts/Itimer.c +++ b/ghc/rts/Itimer.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Itimer.c,v 1.22 2001/03/02 10:52:15 simonmar Exp $ + * $Id: Itimer.c,v 1.23 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team, 1995-1999 * @@ -18,9 +18,8 @@ * to support. So much for standards. */ -#if !defined(_AIX) -# define NON_POSIX_SOURCE -#endif +/* This is not posix compliant. */ +/* #include "PosixSource.h" */ #include "Rts.h" #include "RtsFlags.h" diff --git a/ghc/rts/Linker.c b/ghc/rts/Linker.c index fe6326b..a4f85e1 100644 --- a/ghc/rts/Linker.c +++ b/ghc/rts/Linker.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Linker.c,v 1.56 2001/08/13 14:34:40 simonmar Exp $ + * $Id: Linker.c,v 1.57 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team, 2000 * @@ -7,6 +7,7 @@ * * ---------------------------------------------------------------------------*/ +#include "PosixSource.h" #include "Rts.h" #include "RtsFlags.h" #include "HsFFI.h" diff --git a/ghc/rts/LinkerBasic.c b/ghc/rts/LinkerBasic.c index 391fb92..bd079ef 100644 --- a/ghc/rts/LinkerBasic.c +++ b/ghc/rts/LinkerBasic.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: LinkerBasic.c,v 1.2 2001/02/12 13:03:17 sewardj Exp $ + * $Id: LinkerBasic.c,v 1.3 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team, 2000 * @@ -7,6 +7,7 @@ * * ---------------------------------------------------------------------------*/ +#include "PosixSource.h" #include "Rts.h" #include "Hash.h" #include "StoragePriv.h" diff --git a/ghc/rts/MBlock.c b/ghc/rts/MBlock.c index a1b39dd..4ebbc28 100644 --- a/ghc/rts/MBlock.c +++ b/ghc/rts/MBlock.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: MBlock.c,v 1.22 2001/07/24 06:31:36 ken Exp $ + * $Id: MBlock.c,v 1.23 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team 1998-1999 * @@ -9,7 +9,8 @@ * * ---------------------------------------------------------------------------*/ -#define NON_POSIX_SOURCE +/* This is non-posix compliant. */ +/* #include "PosixSource.h" */ #include "Rts.h" #include "RtsUtils.h" diff --git a/ghc/rts/Main.c b/ghc/rts/Main.c index 41f9d99..11a0027 100644 --- a/ghc/rts/Main.c +++ b/ghc/rts/Main.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Main.c,v 1.29 2001/08/07 20:10:30 ken Exp $ + * $Id: Main.c,v 1.30 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team 1998-2000 * @@ -9,6 +9,7 @@ #define COMPILING_RTS_MAIN +#include "PosixSource.h" #include "Rts.h" #include "RtsAPI.h" #include "SchedAPI.h" diff --git a/ghc/rts/Printer.c b/ghc/rts/Printer.c index e73b3f7..949ca86 100644 --- a/ghc/rts/Printer.c +++ b/ghc/rts/Printer.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Printer.c,v 1.44 2001/08/09 11:19:16 sewardj Exp $ + * $Id: Printer.c,v 1.45 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team, 1994-2000. * @@ -7,6 +7,7 @@ * * ---------------------------------------------------------------------------*/ +#include "PosixSource.h" #include "Rts.h" #include "Printer.h" diff --git a/ghc/rts/ProfHeap.c b/ghc/rts/ProfHeap.c index fb872ea..5597792 100644 --- a/ghc/rts/ProfHeap.c +++ b/ghc/rts/ProfHeap.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: ProfHeap.c,v 1.24 2001/08/07 19:34:01 ken Exp $ + * $Id: ProfHeap.c,v 1.25 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team, 1998-2000 * @@ -15,6 +15,7 @@ #if defined(PROFILING) || defined(DEBUG_HEAP_PROF) +#include "PosixSource.h" #include "Rts.h" #include "RtsUtils.h" #include "RtsFlags.h" diff --git a/ghc/rts/Profiling.c b/ghc/rts/Profiling.c index 23cd5a7..a9d259e 100644 --- a/ghc/rts/Profiling.c +++ b/ghc/rts/Profiling.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Profiling.c,v 1.21 2001/07/23 23:37:35 andy Exp $ + * $Id: Profiling.c,v 1.22 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team, 1998-2000 * @@ -9,6 +9,7 @@ #ifdef PROFILING +#include "PosixSource.h" #include "Rts.h" #include "RtsUtils.h" #include "RtsFlags.h" diff --git a/ghc/rts/Proftimer.c b/ghc/rts/Proftimer.c index ae63670..42766d3 100644 --- a/ghc/rts/Proftimer.c +++ b/ghc/rts/Proftimer.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Proftimer.c,v 1.6 2000/04/03 15:54:49 simonmar Exp $ + * $Id: Proftimer.c,v 1.7 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team, 1998-1999 * @@ -9,6 +9,7 @@ #if defined (PROFILING) +#include "PosixSource.h" #include "Rts.h" #include "Profiling.h" #include "Itimer.h" diff --git a/ghc/rts/RtsAPI.c b/ghc/rts/RtsAPI.c index a8661b7..178d1f6 100644 --- a/ghc/rts/RtsAPI.c +++ b/ghc/rts/RtsAPI.c @@ -1,5 +1,5 @@ /* ---------------------------------------------------------------------------- - * $Id: RtsAPI.c,v 1.27 2001/08/03 16:30:13 sof Exp $ + * $Id: RtsAPI.c,v 1.28 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team, 1998-2001 * @@ -7,6 +7,7 @@ * * --------------------------------------------------------------------------*/ +#include "PosixSource.h" #include "Rts.h" #include "Storage.h" #include "RtsAPI.h" diff --git a/ghc/rts/RtsAPIDeprec.c b/ghc/rts/RtsAPIDeprec.c index 45d9ba2..efed3d7 100644 --- a/ghc/rts/RtsAPIDeprec.c +++ b/ghc/rts/RtsAPIDeprec.c @@ -1,5 +1,5 @@ /* ---------------------------------------------------------------------------- - * $Id: RtsAPIDeprec.c,v 1.1 2001/01/11 17:25:56 simonmar Exp $ + * $Id: RtsAPIDeprec.c,v 1.2 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team, 1998-2001 * @@ -7,6 +7,7 @@ * * --------------------------------------------------------------------------*/ +#include "PosixSource.h" #include "Rts.h" #include "RtsUtils.h" #include "Storage.h" diff --git a/ghc/rts/RtsDllMain.c b/ghc/rts/RtsDllMain.c index 92c4474..bc5cb07 100644 --- a/ghc/rts/RtsDllMain.c +++ b/ghc/rts/RtsDllMain.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsDllMain.c,v 1.2 2000/04/26 17:27:00 rrt Exp $ + * $Id: RtsDllMain.c,v 1.3 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team 1999-2000 * @@ -7,6 +7,7 @@ * * ---------------------------------------------------------------------------*/ +#include "PosixSource.h" #include "Rts.h" #include "RtsAPI.h" diff --git a/ghc/rts/RtsFlags.c b/ghc/rts/RtsFlags.c index b491661..2f975af 100644 --- a/ghc/rts/RtsFlags.c +++ b/ghc/rts/RtsFlags.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsFlags.c,v 1.48 2001/08/13 12:34:37 simonmar Exp $ + * $Id: RtsFlags.c,v 1.49 2001/08/14 13:40:09 sewardj Exp $ * * (c) The AQUA Project, Glasgow University, 1994-1997 * (c) The GHC Team, 1998-1999 @@ -21,6 +21,7 @@ //@node Includes, Constants //@subsection Includes +#include "PosixSource.h" #include "Rts.h" #include "RtsFlags.h" #include "RtsUtils.h" diff --git a/ghc/rts/RtsStartup.c b/ghc/rts/RtsStartup.c index 4f33e59..8732c9a 100644 --- a/ghc/rts/RtsStartup.c +++ b/ghc/rts/RtsStartup.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsStartup.c,v 1.51 2001/05/25 18:33:46 sof Exp $ + * $Id: RtsStartup.c,v 1.52 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team, 1998-2000 * @@ -7,6 +7,7 @@ * * ---------------------------------------------------------------------------*/ +#include "PosixSource.h" #include "Rts.h" #include "RtsAPI.h" #include "RtsUtils.h" diff --git a/ghc/rts/RtsUtils.c b/ghc/rts/RtsUtils.c index 7054f45..1820c79 100644 --- a/ghc/rts/RtsUtils.c +++ b/ghc/rts/RtsUtils.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsUtils.c,v 1.19 2001/07/24 06:31:36 ken Exp $ + * $Id: RtsUtils.c,v 1.20 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team, 1998-1999 * @@ -8,7 +8,7 @@ * ---------------------------------------------------------------------------*/ /* gettimeofday isn't POSIX */ -#define NON_POSIX_SOURCE +/* #include "PosixSource.h" */ #include "Rts.h" #include "RtsTypes.h" diff --git a/ghc/rts/Sanity.c b/ghc/rts/Sanity.c index 4150916..ab2254d 100644 --- a/ghc/rts/Sanity.c +++ b/ghc/rts/Sanity.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Sanity.c,v 1.29 2001/07/24 05:04:59 ken Exp $ + * $Id: Sanity.c,v 1.30 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team, 1998-2001 * @@ -14,6 +14,7 @@ * * ---------------------------------------------------------------------------*/ +#include "PosixSource.h" #include "Rts.h" #ifdef DEBUG /* whole file */ diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index fa26c03..c8a6a94 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -1,5 +1,5 @@ /* --------------------------------------------------------------------------- - * $Id: Schedule.c,v 1.99 2001/07/30 09:47:13 simonmar Exp $ + * $Id: Schedule.c,v 1.100 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team, 1998-2000 * @@ -74,6 +74,7 @@ //@node Includes, Variables and Data structures, Main scheduling code, Main scheduling code //@subsection Includes +#include "PosixSource.h" #include "Rts.h" #include "SchedAPI.h" #include "RtsUtils.h" diff --git a/ghc/rts/Select.c b/ghc/rts/Select.c index 1682481..585fe7b 100644 --- a/ghc/rts/Select.c +++ b/ghc/rts/Select.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Select.c,v 1.16 2001/02/28 14:23:55 sewardj Exp $ + * $Id: Select.c,v 1.17 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team 1995-1999 * @@ -8,7 +8,7 @@ * ---------------------------------------------------------------------------*/ /* we're outside the realms of POSIX here... */ -#define NON_POSIX_SOURCE +/* #include "PosixSource.h" */ #include "Rts.h" #include "Schedule.h" diff --git a/ghc/rts/Signals.c b/ghc/rts/Signals.c index 1adfb04..d476a01 100644 --- a/ghc/rts/Signals.c +++ b/ghc/rts/Signals.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Signals.c,v 1.20 2001/07/26 03:24:01 ken Exp $ + * $Id: Signals.c,v 1.21 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team, 1998-1999 * @@ -7,8 +7,9 @@ * * ---------------------------------------------------------------------------*/ -#define NON_POSIX_SOURCE - +/* This is non=Posix compliant. + #include "PosixSource.h" +*/ #include "Rts.h" #include "SchedAPI.h" #include "Schedule.h" diff --git a/ghc/rts/Sparks.c b/ghc/rts/Sparks.c index 9a37d69..46c3225 100644 --- a/ghc/rts/Sparks.c +++ b/ghc/rts/Sparks.c @@ -1,5 +1,5 @@ /* --------------------------------------------------------------------------- - * $Id: Sparks.c,v 1.3 2001/03/22 03:51:10 hwloidl Exp $ + * $Id: Sparks.c,v 1.4 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team, 2000 * @@ -20,6 +20,7 @@ //@node Includes, GUM code, Spark Management Routines, Spark Management Routines //@subsection Includes +#include "PosixSource.h" #include "Rts.h" #include "Schedule.h" #include "SchedAPI.h" diff --git a/ghc/rts/Stable.c b/ghc/rts/Stable.c index 7082cb3..52876bd 100644 --- a/ghc/rts/Stable.c +++ b/ghc/rts/Stable.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Stable.c,v 1.16 2001/08/08 16:03:47 simonmar Exp $ + * $Id: Stable.c,v 1.17 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team, 1998-1999 * @@ -7,6 +7,7 @@ * * ---------------------------------------------------------------------------*/ +#include "PosixSource.h" #include "Rts.h" #include "Hash.h" #include "StablePriv.h" diff --git a/ghc/rts/Stats.c b/ghc/rts/Stats.c index 70dd866..3c4d6e6 100644 --- a/ghc/rts/Stats.c +++ b/ghc/rts/Stats.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Stats.c,v 1.31 2001/07/23 17:23:20 simonmar Exp $ + * $Id: Stats.c,v 1.32 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team, 1998-1999 * @@ -7,7 +7,9 @@ * * ---------------------------------------------------------------------------*/ -#define NON_POSIX_SOURCE +/* Alas, no. This source is non-posix. + #include "PosixSource.h" +*/ #include "Rts.h" #include "RtsFlags.h" diff --git a/ghc/rts/StgCRun.c b/ghc/rts/StgCRun.c index fc4ca66..46c47fe 100644 --- a/ghc/rts/StgCRun.c +++ b/ghc/rts/StgCRun.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgCRun.c,v 1.25 2001/08/07 20:06:41 ken Exp $ + * $Id: StgCRun.c,v 1.26 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team, 1998-2000 * @@ -33,6 +33,8 @@ * * -------------------------------------------------------------------------- */ +#include "PosixSource.h" + /* * We define the following (unused) global register variables, because for @@ -78,19 +80,6 @@ register double fake_f9 __asm__("$f9"); any architecture (using miniinterpreter) -------------------------------------------------------------------------- */ -/* The static @jmp_environment@ variable allows @miniInterpret@ to - * communicate with @StgReturn@. - * - * Because @StgRun@ may be used recursively, we carefully - * save and restore the whole of @jmp_environment@. - */ -#include -#include /* for memcpy */ - -static jmp_buf jmp_environment; - -#if 1 - extern StgThreadReturnCode StgRun(StgFunPtr f, StgRegTable *basereg) { while (f) { @@ -109,144 +98,6 @@ EXTFUN(StgReturn) return 0; } -#else - -#define CHECK_STACK 0 -#define STACK_DETAILS 0 - -static int enters = 0; - -static void scanStackSeg ( W_* ptr, int nwords ) -{ - W_ w; -#if CHECK_STACK - int nwords0 = nwords; -#if STACK_DETAILS - while (nwords > 0) { - w = *ptr; - if (IS_ARG_TAG(w)) { - fprintf ( stderr, "%d",w ); nwords--; ptr++; - while (w) { fprintf(stderr, "_"); w--; nwords--; ptr++; } - } - else { - fprintf(stderr, "p"); - nwords--; ptr++; - } - } - if (nwords < 0) fprintf(stderr, "erk: nwords < 0\n"); -#endif - checkStackChunk ( ptr, ptr-nwords0 ); -#endif -} - -extern StgFunPtr stg_enterStackTop; -extern StgThreadReturnCode StgRun(StgFunPtr f, StgRegTable *basereg) -{ - char* nm; - while (1) { - -#if CHECK_STACK - { - int i; - StgTSO* tso = basereg->rCurrentTSO; - StgWord* sb = tso->stack + tso->stack_size; - StgWord* sp; - StgWord* su; - int ws; - - if (f == &stg_enterStackTop) { - sp = tso->sp; - su = tso->su; - } else { - sp = basereg->rSp; - su = basereg->rSu; - } - -#if STACK_DETAILS - fprintf(stderr, - "== SB = %p SP = %p(%p) SU = %p SpLim = %p(%p)\n", - sb, sp, tso->sp, su, basereg->rSpLim, tso->stack + RESERVED_STACK_WORDS); -#endif - - if (su >= sb) goto postloop; - if (!sp || !su) goto postloop; - - printStack ( sp, sb, su); - - while (1) { - ws = su - sp; - switch (get_itbl((StgClosure*)su)->type) { - case STOP_FRAME: - scanStackSeg(sp,ws); -#if STACK_DETAILS - fprintf(stderr, "S%d ",ws); - fprintf(stderr, "\n"); -#endif - goto postloop; - case UPDATE_FRAME: - scanStackSeg(sp,ws); -#if STACK_DETAILS - fprintf(stderr,"U%d ",ws); -#endif - sp = su + sizeofW(StgUpdateFrame); - su = ((StgUpdateFrame*)su)->link; - break; - case SEQ_FRAME: - scanStackSeg(sp,ws); -#if STACK_DETAILS - fprintf(stderr,"Q%d ",ws); -#endif - sp = su + sizeofW(StgSeqFrame); - su = ((StgSeqFrame*)su)->link; - break; - case CATCH_FRAME: - scanStackSeg(sp,ws); -#if STACK_DETAILS - fprintf(stderr,"C%d ",ws); -#endif - sp = su + sizeofW(StgCatchFrame); - su = ((StgCatchFrame*)su)->link; - break; - default: - fprintf(stderr, "?\nweird record on stack\n"); - assert(0); - goto postloop; - } - } - postloop: - } -#endif -#if STACK_DETAILS - fprintf(stderr,"\n"); -#endif -#if 1 - fprintf(stderr,"-- enter %p ", f); - nm = nameFromOPtr ( f ); - if (nm) fprintf(stderr, "%s", nm); else - printPtr((P_)f); - fprintf ( stderr, "\n"); -#endif -#if STACK_DETAILS - fprintf(stderr,"\n"); -#endif - zzz: - if (enters % 1000 == 0) fprintf(stderr, "%d enters\n",enters); - enters++; - f = (StgFunPtr) (f)(); - if (!f) break; - } - fprintf (stderr, "miniInterpreter: bye!\n\n" ); - return (StgThreadReturnCode)R1.i; -} - -EXTFUN(StgReturn) -{ - return 0; -} -#endif - - - #else /* !USE_MINIINTERPRETER */ #ifdef LEADING_UNDERSCORE diff --git a/ghc/rts/StgPrimFloat.c b/ghc/rts/StgPrimFloat.c index 7928fcb..1be9995 100644 --- a/ghc/rts/StgPrimFloat.c +++ b/ghc/rts/StgPrimFloat.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgPrimFloat.c,v 1.7 2001/07/23 23:29:47 ken Exp $ + * $Id: StgPrimFloat.c,v 1.8 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team, 1998-2000 * @@ -7,6 +7,7 @@ * * ---------------------------------------------------------------------------*/ +#include "PosixSource.h" #include "Rts.h" /* diff --git a/ghc/rts/Storage.c b/ghc/rts/Storage.c index feff59c..a2c111b 100644 --- a/ghc/rts/Storage.c +++ b/ghc/rts/Storage.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Storage.c,v 1.48 2001/08/09 12:46:06 sewardj Exp $ + * $Id: Storage.c,v 1.49 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team, 1998-1999 * @@ -7,6 +7,7 @@ * * ---------------------------------------------------------------------------*/ +#include "PosixSource.h" #include "Rts.h" #include "RtsUtils.h" #include "RtsFlags.h" diff --git a/ghc/rts/StrHash.c b/ghc/rts/StrHash.c index 7b6e66b..f49610a 100644 --- a/ghc/rts/StrHash.c +++ b/ghc/rts/StrHash.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StrHash.c,v 1.2 2000/08/07 23:37:23 qrczak Exp $ + * $Id: StrHash.c,v 1.3 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team, 1994-2000 * @@ -12,6 +12,7 @@ * * ---------------------------------------------------------------------------*/ +#include "PosixSource.h" #include "Rts.h" #include "StrHash.h" diff --git a/ghc/rts/Ticky.c b/ghc/rts/Ticky.c index c8ccdbb..a24e7d0 100644 --- a/ghc/rts/Ticky.c +++ b/ghc/rts/Ticky.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Ticky.c,v 1.12 1999/11/11 17:50:48 simonpj Exp $ + * $Id: Ticky.c,v 1.13 2001/08/14 13:40:09 sewardj Exp $ * * (c) The AQUA project, Glasgow University, 1992-1997 * (c) The GHC Team, 1998-1999 @@ -10,6 +10,7 @@ #if defined(TICKY_TICKY) #define TICKY_C /* define those variables */ +#include "PosixSource.h" #include "Rts.h" #include "RtsFlags.h" #include "Ticky.h" diff --git a/ghc/rts/VisCallbacks.c b/ghc/rts/VisCallbacks.c index 928ed60..dbcc847 100644 --- a/ghc/rts/VisCallbacks.c +++ b/ghc/rts/VisCallbacks.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: VisCallbacks.c,v 1.1 2000/11/01 11:41:47 simonmar Exp $ + * $Id: VisCallbacks.c,v 1.2 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team 2000 * @@ -9,8 +9,6 @@ #ifdef RTS_GTK_FRONTPANEL -#define NON_POSIX_SOURCE - #include "Rts.h" #include diff --git a/ghc/rts/Weak.c b/ghc/rts/Weak.c index 91a2fc0..1c03e69 100644 --- a/ghc/rts/Weak.c +++ b/ghc/rts/Weak.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Weak.c,v 1.17 2000/12/04 12:31:22 simonmar Exp $ + * $Id: Weak.c,v 1.18 2001/08/14 13:40:09 sewardj Exp $ * * (c) The GHC Team, 1998-1999 * @@ -7,6 +7,7 @@ * * ---------------------------------------------------------------------------*/ +#include "PosixSource.h" #include "Rts.h" #include "RtsAPI.h" #include "SchedAPI.h" diff --git a/ghc/rts/parallel/HLComms.c b/ghc/rts/parallel/HLComms.c index 889892a..9435536 100644 --- a/ghc/rts/parallel/HLComms.c +++ b/ghc/rts/parallel/HLComms.c @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * Time-stamp: - * $Id: HLComms.c,v 1.5 2001/05/28 07:13:54 sof Exp $ + * $Id: HLComms.c,v 1.6 2001/08/14 13:40:10 sewardj Exp $ * * High Level Communications Routines (HLComms.lc) * @@ -31,9 +31,8 @@ //@node Macros etc, Includes, High Level Communications Routines, High Level Communications Routines //@subsection Macros etc -# ifndef _AIX -# define NON_POSIX_SOURCE /* so says Solaris */ -# endif +/* Evidently not Posix */ +/* #include "PosixSource.h" */ //@node Includes, GUM Message Sending and Unpacking Functions, Macros etc, High Level Communications Routines //@subsection Includes diff --git a/ghc/rts/parallel/LLComms.c b/ghc/rts/parallel/LLComms.c index 84f5ff9..db56bc6 100644 --- a/ghc/rts/parallel/LLComms.c +++ b/ghc/rts/parallel/LLComms.c @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * Time-stamp: - * $Id: LLComms.c,v 1.4 2001/03/22 03:51:11 hwloidl Exp $ + * $Id: LLComms.c,v 1.5 2001/08/14 13:40:10 sewardj Exp $ * * GUM Low-Level Inter-Task Communication * @@ -43,7 +43,9 @@ //@node Macros etc, Includes, GUM Low-Level Inter-Task Communication, GUM Low-Level Inter-Task Communication //@subsection Macros etc -#define NON_POSIX_SOURCE /* so says Solaris */ +/* Evidently not Posix */ +/* #include "PosixSource.h" */ + #define UNUSED /* nothing */ //@node Includes, Auxiliary functions, Macros etc, GUM Low-Level Inter-Task Communication diff --git a/ghc/rts/parallel/ParInit.c b/ghc/rts/parallel/ParInit.c index 917b658..f77564c 100644 --- a/ghc/rts/parallel/ParInit.c +++ b/ghc/rts/parallel/ParInit.c @@ -1,6 +1,6 @@ /* -------------------------------------------------------------------------- Time-stamp: - $Id: ParInit.c,v 1.4 2001/03/22 03:51:11 hwloidl Exp $ + $Id: ParInit.c,v 1.5 2001/08/14 13:40:10 sewardj Exp $ Initialising the parallel RTS @@ -14,8 +14,6 @@ #ifdef PAR /* whole file */ -#define NON_POSIX_SOURCE /* so says Solaris */ - //@menu //* Includes:: //* Global variables:: @@ -25,6 +23,9 @@ //@node Includes, Global variables //@subsection Includes +/* Evidently not Posix */ +/* #include "PosixSource.h" */ + #include #include "Rts.h" #include "RtsFlags.h" diff --git a/ghc/rts/parallel/SysMan.c b/ghc/rts/parallel/SysMan.c index 9f82bc4..ea27228 100644 --- a/ghc/rts/parallel/SysMan.c +++ b/ghc/rts/parallel/SysMan.c @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- Time-stamp: - $Id: SysMan.c,v 1.4 2001/03/22 03:51:12 hwloidl Exp $ + $Id: SysMan.c,v 1.5 2001/08/14 13:40:10 sewardj Exp $ GUM System Manager Program Handles startup, shutdown and global synchronisation of the parallel system. @@ -99,6 +99,9 @@ o Begins execution. //@node Includes, Macros etc, General docu, GUM System Manager Program //@subsection Includes +/* Evidently not Posix */ +/* #include "PosixSource.h" */ + #include "Rts.h" #include "ParTypes.h" #include "LLC.h" @@ -108,8 +111,6 @@ o Begins execution. //@node Macros etc, Variables, Includes, GUM System Manager Program //@subsection Macros etc -#define NON_POSIX_SOURCE /* so says Solaris */ - /* SysMan is put on top of the GHC routine that does the RtsFlags handling. So, we cannot use the standard macros. For the time being we use a macro that is fixed at compile time. @@ -294,7 +295,7 @@ main (int argc, char **argv) { IF_PAR_DEBUG(verbose, fprintf(stderr, - "==== RFP: GdH enabled SysMan reporting for duty ($Revision: 1.4 $)\n")); + "==== RFP: GdH enabled SysMan reporting for duty ($Revision: 1.5 $)\n")); if (argc > 1) { if (*argv[1] == '-') { diff --git a/ghc/tests/codeGen/should_run/cg035.hs b/ghc/tests/codeGen/should_run/cg035.hs index 7b7b7d0..487b8b4 100644 --- a/ghc/tests/codeGen/should_run/cg035.hs +++ b/ghc/tests/codeGen/should_run/cg035.hs @@ -1,8 +1,3 @@ -{-# OPTIONS -optc-DNON_POSIX_SOURCE #-} - --- The above option is required because 'erf' isn't a POSIX function, and we --- need a prototype for it in order to compile the following code correctly. --- Defining NON_POSIX_SOURCE tells the RTS not to define _POSIX_SOURCE. module Main (main) where diff --git a/mk/config.h.in b/mk/config.h.in index f6567d8..0b2308f 100644 --- a/mk/config.h.in +++ b/mk/config.h.in @@ -794,6 +794,9 @@ /* Define if you have the header file. */ #undef HAVE_IO_H +/* Define if you have the header file. */ +#undef HAVE_LIMITS_H + /* Define if you have the header file. */ #undef HAVE_MALLOC_H