diff options
| -rw-r--r-- | ghc/includes/PrimOps.h | 11 | ||||
| -rw-r--r-- | ghc/includes/RtsFlags.h | 4 | ||||
| -rw-r--r-- | ghc/includes/Stg.h | 18 | ||||
| -rw-r--r-- | ghc/includes/mkNativeHdr.c | 4 | ||||
| -rw-r--r-- | ghc/rts/Arena.c | 4 | ||||
| -rw-r--r-- | ghc/rts/BlockAlloc.c | 4 | ||||
| -rw-r--r-- | ghc/rts/Disassembler.c | 6 | ||||
| -rw-r--r-- | ghc/rts/GC.c | 4 | ||||
| -rw-r--r-- | ghc/rts/Hash.c | 5 | ||||
| -rw-r--r-- | ghc/rts/Itimer.c | 6 | ||||
| -rw-r--r-- | ghc/rts/MBlock.c | 4 | ||||
| -rw-r--r-- | ghc/rts/PrimOps.hc | 8 | ||||
| -rw-r--r-- | ghc/rts/Printer.c | 7 | ||||
| -rw-r--r-- | ghc/rts/RtsFlags.c | 5 | ||||
| -rw-r--r-- | ghc/rts/RtsStartup.c | 4 | ||||
| -rw-r--r-- | ghc/rts/RtsUtils.c | 4 | ||||
| -rw-r--r-- | ghc/rts/Schedule.c | 4 | ||||
| -rw-r--r-- | ghc/rts/Select.c | 7 | ||||
| -rw-r--r-- | ghc/rts/Signals.c | 20 | ||||
| -rw-r--r-- | ghc/rts/StgPrimFloat.c | 4 | ||||
| -rw-r--r-- | ghc/rts/Storage.c | 5 | ||||
| -rw-r--r-- | ghc/rts/ThreadLabels.c | 2 | ||||
| -rw-r--r-- | ghc/rts/hooks/ErrorHdr.c | 6 | ||||
| -rw-r--r-- | ghc/rts/hooks/MallocFail.c | 4 | ||||
| -rw-r--r-- | ghc/rts/hooks/NoRunnableThreads.c | 4 | ||||
| -rw-r--r-- | ghc/rts/hooks/OutOfHeap.c | 3 | ||||
| -rw-r--r-- | ghc/rts/hooks/PatErrorHdr.c | 6 | ||||
| -rw-r--r-- | ghc/rts/hooks/RtsOpts.c | 4 | ||||
| -rw-r--r-- | ghc/rts/hooks/StackOverflow.c | 4 |
29 files changed, 115 insertions, 56 deletions
diff --git a/ghc/includes/PrimOps.h b/ghc/includes/PrimOps.h index 2027cde780..61dcf84c3e 100644 --- a/ghc/includes/PrimOps.h +++ b/ghc/includes/PrimOps.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: PrimOps.h,v 1.95 2002/06/04 16:13:53 sof Exp $ + * $Id: PrimOps.h,v 1.96 2002/07/17 09:21:48 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -326,11 +326,10 @@ EXTFUN_RTS(mkApUpd0zh_fast); #define STG_SIG_ERR (-3) #define STG_SIG_HAN (-4) -extern StgInt stg_sig_install (StgInt, StgInt, StgStablePtr, sigset_t *); -#define stg_sig_default(sig,mask) stg_sig_install(sig,STG_SIG_DFL,0,(sigset_t *)mask) -#define stg_sig_ignore(sig,mask) stg_sig_install(sig,STG_SIG_IGN,0,(sigset_t *)mask) -#define stg_sig_catch(sig,ptr,mask) stg_sig_install(sig,STG_SIG_HAN,ptr,(sigset_t *)mask) - +extern StgInt stg_sig_install (StgInt, StgInt, StgStablePtr, void *); +#define stg_sig_default(sig,mask) stg_sig_install(sig,STG_SIG_DFL,0,(void *)mask) +#define stg_sig_ignore(sig,mask) stg_sig_install(sig,STG_SIG_IGN,0,(void *)mask) +#define stg_sig_catch(sig,ptr,mask) stg_sig_install(sig,STG_SIG_HAN,ptr,(void *)mask) /* ------------------------------------------------------------------------ Parallel PrimOps diff --git a/ghc/includes/RtsFlags.h b/ghc/includes/RtsFlags.h index 9f4bef3d7e..209a0b3123 100644 --- a/ghc/includes/RtsFlags.h +++ b/ghc/includes/RtsFlags.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsFlags.h,v 1.41 2001/12/12 14:58:26 simonmar Exp $ + * $Id: RtsFlags.h,v 1.42 2002/07/17 09:21:49 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -10,6 +10,8 @@ #ifndef RTSFLAGS_H #define RTSFLAGS_H +#include <stdio.h> + /* For defaults, see the @initRtsFlagsDefaults@ routine. */ struct GC_FLAGS { diff --git a/ghc/includes/Stg.h b/ghc/includes/Stg.h index f176700354..f863b55df3 100644 --- a/ghc/includes/Stg.h +++ b/ghc/includes/Stg.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Stg.h,v 1.46 2002/06/03 13:08:41 matthewc Exp $ + * $Id: Stg.h,v 1.47 2002/07/17 09:21:49 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -186,22 +186,6 @@ typedef StgWord64 LW_; /* RTS public interface */ #include "RtsAPI.h" -/* these are all ANSI C headers */ -#include <stdlib.h> -#include <string.h> -#include <math.h> -#include <assert.h> -#include <errno.h> -#include <stdio.h> - -#ifdef HAVE_SIGNAL_H -#include <signal.h> -#endif - -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif - #ifdef SMP #include <pthread.h> #endif diff --git a/ghc/includes/mkNativeHdr.c b/ghc/includes/mkNativeHdr.c index ebc951fbf7..c04d158ff3 100644 --- a/ghc/includes/mkNativeHdr.c +++ b/ghc/includes/mkNativeHdr.c @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- - * $Id: mkNativeHdr.c,v 1.8 2002/01/08 10:36:24 sewardj Exp $ + * $Id: mkNativeHdr.c,v 1.9 2002/07/17 09:21:49 simonmar Exp $ * * (c) The GHC Team, 1992-1998 * @@ -7,6 +7,8 @@ * * ------------------------------------------------------------------------*/ +#include <stdio.h> + #include "Stg.h" #define OFFSET(table, x) ((StgUnion *) &(x) - (StgUnion *) (&table)) diff --git a/ghc/rts/Arena.c b/ghc/rts/Arena.c index f719400c9e..ba6774b393 100644 --- a/ghc/rts/Arena.c +++ b/ghc/rts/Arena.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - $Id: Arena.c,v 1.1 2001/10/18 14:41:01 simonmar Exp $ + $Id: Arena.c,v 1.2 2002/07/17 09:21:49 simonmar Exp $ (c) The University of Glasgow 2001 Arena allocation. Arenas provide fast memory allocation at the @@ -24,6 +24,8 @@ #include "BlockAlloc.h" #include "Arena.h" +#include <stdlib.h> + // Each arena struct is allocated using malloc(). struct _Arena { bdescr *current; diff --git a/ghc/rts/BlockAlloc.c b/ghc/rts/BlockAlloc.c index f33ab86468..9d13719918 100644 --- a/ghc/rts/BlockAlloc.c +++ b/ghc/rts/BlockAlloc.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: BlockAlloc.c,v 1.13 2001/11/08 14:42:11 simonmar Exp $ + * $Id: BlockAlloc.c,v 1.14 2002/07/17 09:21:49 simonmar Exp $ * * (c) The GHC Team 1998-2000 * @@ -23,6 +23,8 @@ #include "BlockAlloc.h" #include "MBlock.h" +#include <string.h> + static void initMBlock(void *mblock); static bdescr *allocMegaGroup(nat mblocks); static void freeMegaGroup(bdescr *bd); diff --git a/ghc/rts/Disassembler.c b/ghc/rts/Disassembler.c index 0063a65e05..8b526c0af5 100644 --- a/ghc/rts/Disassembler.c +++ b/ghc/rts/Disassembler.c @@ -5,8 +5,8 @@ * Copyright (c) 1994-1998. * * $RCSfile: Disassembler.c,v $ - * $Revision: 1.24 $ - * $Date: 2001/08/14 13:40:09 $ + * $Revision: 1.25 $ + * $Date: 2002/07/17 09:21:49 $ * ---------------------------------------------------------------------------*/ #ifdef DEBUG @@ -24,6 +24,8 @@ #include "Disassembler.h" #include "Interpreter.h" +#include <stdio.h> + /* -------------------------------------------------------------------------- * Disassembler * ------------------------------------------------------------------------*/ diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c index 80f7291665..14dc91f1ef 100644 --- a/ghc/rts/GC.c +++ b/ghc/rts/GC.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: GC.c,v 1.136 2002/07/10 09:28:54 simonmar Exp $ + * $Id: GC.c,v 1.137 2002/07/17 09:21:49 simonmar Exp $ * * (c) The GHC Team 1998-1999 * @@ -45,6 +45,8 @@ #include "RetainerProfile.h" #include "LdvProfile.h" +#include <string.h> + /* STATIC OBJECT LIST. * * During GC: diff --git a/ghc/rts/Hash.c b/ghc/rts/Hash.c index 05f2b191b6..38cb65a7eb 100644 --- a/ghc/rts/Hash.c +++ b/ghc/rts/Hash.c @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------- - * $Id: Hash.c,v 1.8 2002/04/09 12:55:11 simonmar Exp $ + * $Id: Hash.c,v 1.9 2002/07/17 09:21:49 simonmar Exp $ * * (c) The AQUA Project, Glasgow University, 1995-1998 * (c) The GHC Team, 1999 @@ -14,6 +14,9 @@ #include "Hash.h" #include "RtsUtils.h" +#include <stdlib.h> +#include <string.h> + #define HSEGSIZE 1024 /* Size of a single hash table segment */ /* Also the minimum size of a hash table */ #define HDIRSIZE 1024 /* Size of the segment directory */ diff --git a/ghc/rts/Itimer.c b/ghc/rts/Itimer.c index 9df937bd64..e40c83dae7 100644 --- a/ghc/rts/Itimer.c +++ b/ghc/rts/Itimer.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Itimer.c,v 1.29 2001/11/27 01:57:59 sof Exp $ + * $Id: Itimer.c,v 1.30 2002/07/17 09:21:49 simonmar Exp $ * * (c) The GHC Team, 1995-1999 * @@ -43,6 +43,10 @@ # include <windows.h> #endif +#ifdef HAVE_SIGNAL_H +# include <signal.h> +#endif + lnat total_ticks = 0; /* ticks left before next pre-emptive context switch */ diff --git a/ghc/rts/MBlock.c b/ghc/rts/MBlock.c index 7bb39d799f..eaf680146a 100644 --- a/ghc/rts/MBlock.c +++ b/ghc/rts/MBlock.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: MBlock.c,v 1.28 2002/04/12 04:00:35 sof Exp $ + * $Id: MBlock.c,v 1.29 2002/07/17 09:21:50 simonmar Exp $ * * (c) The GHC Team 1998-1999 * @@ -40,6 +40,8 @@ #include <windows.h> #endif +#include <errno.h> + lnat mblocks_allocated = 0; void * diff --git a/ghc/rts/PrimOps.hc b/ghc/rts/PrimOps.hc index 44bedf6017..0196e213f8 100644 --- a/ghc/rts/PrimOps.hc +++ b/ghc/rts/PrimOps.hc @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: PrimOps.hc,v 1.99 2002/06/26 08:18:41 stolz Exp $ + * $Id: PrimOps.hc,v 1.100 2002/07/17 09:21:50 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -22,6 +22,12 @@ #include "Itimer.h" #include "Prelude.h" +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif + +#include <stdlib.h> + /* ** temporary ** classes CCallable and CReturnable don't really exist, but the diff --git a/ghc/rts/Printer.c b/ghc/rts/Printer.c index abbc91b465..9277c7245a 100644 --- a/ghc/rts/Printer.c +++ b/ghc/rts/Printer.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Printer.c,v 1.51 2002/02/04 20:26:25 sof Exp $ + * $Id: Printer.c,v 1.52 2002/07/17 09:21:50 simonmar Exp $ * * (c) The GHC Team, 1994-2000. * @@ -11,6 +11,8 @@ #include "Rts.h" #include "Printer.h" +#include <stdio.h> + #ifdef DEBUG #include "RtsUtils.h" @@ -20,7 +22,8 @@ #include "Bytecodes.h" /* for InstrPtr */ #include "Disassembler.h" -#include "Printer.h" +#include <stdlib.h> +#include <string.h> #if defined(GRAN) || defined(PAR) // HWL: explicit fixed header size to make debugging easier diff --git a/ghc/rts/RtsFlags.c b/ghc/rts/RtsFlags.c index f9ddc832f1..00146642d2 100644 --- a/ghc/rts/RtsFlags.c +++ b/ghc/rts/RtsFlags.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsFlags.c,v 1.56 2001/12/12 14:31:43 simonmar Exp $ + * $Id: RtsFlags.c,v 1.57 2002/07/17 09:21:50 simonmar Exp $ * * (c) The AQUA Project, Glasgow University, 1994-1997 * (c) The GHC Team, 1998-1999 @@ -37,6 +37,9 @@ #include <ctype.h> #endif +#include <stdlib.h> +#include <string.h> + extern struct RTS_FLAGS RtsFlags; /* diff --git a/ghc/rts/RtsStartup.c b/ghc/rts/RtsStartup.c index 7b308eabe9..c375426f43 100644 --- a/ghc/rts/RtsStartup.c +++ b/ghc/rts/RtsStartup.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsStartup.c,v 1.64 2002/06/26 08:18:41 stolz Exp $ + * $Id: RtsStartup.c,v 1.65 2002/07/17 09:21:50 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -50,6 +50,8 @@ # include "LLC.h" #endif +#include <stdlib.h> + /* * Flag Structure */ diff --git a/ghc/rts/RtsUtils.c b/ghc/rts/RtsUtils.c index 3ff2f4156e..693531e6c8 100644 --- a/ghc/rts/RtsUtils.c +++ b/ghc/rts/RtsUtils.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsUtils.c,v 1.25 2002/05/18 05:28:14 ken Exp $ + * $Id: RtsUtils.c,v 1.26 2002/07/17 09:21:50 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -31,6 +31,8 @@ #include <sys/time.h> #endif +#include <stdlib.h> +#include <string.h> #include <stdarg.h> /* variable-argument error function. */ diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index 756d476519..9b9f40c8b1 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -1,5 +1,5 @@ /* --------------------------------------------------------------------------- - * $Id: Schedule.c,v 1.147 2002/07/10 09:28:56 simonmar Exp $ + * $Id: Schedule.c,v 1.148 2002/07/17 09:21:50 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -122,6 +122,8 @@ #include <unistd.h> #endif +#include <string.h> +#include <stdlib.h> #include <stdarg.h> //@node Variables and Data structures, Prototypes, Includes, Main scheduling code diff --git a/ghc/rts/Select.c b/ghc/rts/Select.c index 922b15157f..a2c990ec60 100644 --- a/ghc/rts/Select.c +++ b/ghc/rts/Select.c @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- - * $Id: Select.c,v 1.20 2002/07/09 20:44:24 sof Exp $ + * $Id: Select.c,v 1.21 2002/07/17 09:21:51 simonmar Exp $ * - * (c) The GHC Team 1995-1999 + * (c) The GHC Team 1995-2002 * * Support for concurrent non-blocking I/O and thread waiting. * @@ -29,6 +29,9 @@ # include <windows.h> # endif +#include <errno.h> +#include <string.h> + /* last timestamp */ nat timestamp = 0; diff --git a/ghc/rts/Signals.c b/ghc/rts/Signals.c index b94ad6d8e5..40535af046 100644 --- a/ghc/rts/Signals.c +++ b/ghc/rts/Signals.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Signals.c,v 1.25 2002/07/02 12:24:48 simonmar Exp $ + * $Id: Signals.c,v 1.26 2002/07/17 09:21:51 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -19,9 +19,19 @@ #include "StablePriv.h" #ifdef alpha_TARGET_ARCH -#include <machine/fpu.h> +# include <machine/fpu.h> #endif +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif + +#ifdef HAVE_SIGNAL_H +# include <signal.h> +#endif + +#include <stdlib.h> + #ifndef mingw32_TARGET_OS #ifndef PAR @@ -187,7 +197,7 @@ awaitUserSignals(void) * -------------------------------------------------------------------------- */ StgInt -stg_sig_install(StgInt sig, StgInt spi, StgStablePtr handler, sigset_t *mask) +stg_sig_install(StgInt sig, StgInt spi, StgStablePtr handler, void *mask) { sigset_t signals; struct sigaction action; @@ -228,8 +238,8 @@ stg_sig_install(StgInt sig, StgInt spi, StgStablePtr handler, sigset_t *mask) barf("stg_sig_install: bad spi"); } - if (mask != 0) - action.sa_mask = *mask; + if (mask != NULL) + action.sa_mask = *(sigset_t *)mask; else sigemptyset(&action.sa_mask); diff --git a/ghc/rts/StgPrimFloat.c b/ghc/rts/StgPrimFloat.c index 1be99953b1..a0cc95dce5 100644 --- a/ghc/rts/StgPrimFloat.c +++ b/ghc/rts/StgPrimFloat.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgPrimFloat.c,v 1.8 2001/08/14 13:40:09 sewardj Exp $ + * $Id: StgPrimFloat.c,v 1.9 2002/07/17 09:21:51 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -10,6 +10,8 @@ #include "PosixSource.h" #include "Rts.h" +#include <math.h> + /* * Encoding and decoding Doubles. Code based on the HBC code * (lib/fltcode.c). diff --git a/ghc/rts/Storage.c b/ghc/rts/Storage.c index 79c3ef73cb..f7a321d9d5 100644 --- a/ghc/rts/Storage.c +++ b/ghc/rts/Storage.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Storage.c,v 1.66 2002/05/14 08:17:38 matthewc Exp $ + * $Id: Storage.c,v 1.67 2002/07/17 09:21:51 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -26,6 +26,9 @@ #include "RetainerProfile.h" // for counting memory blocks (memInventory) +#include <stdlib.h> +#include <string.h> + #ifdef darwin_TARGET_OS #include <mach-o/getsect.h> unsigned long macho_etext = 0; diff --git a/ghc/rts/ThreadLabels.c b/ghc/rts/ThreadLabels.c index fda40c3f00..79a0a77e65 100644 --- a/ghc/rts/ThreadLabels.c +++ b/ghc/rts/ThreadLabels.c @@ -2,6 +2,8 @@ #include "PosixSource.h" #include "ThreadLabels.h" +#include <stdlib.h> + HashTable * threadLabels = NULL; void diff --git a/ghc/rts/hooks/ErrorHdr.c b/ghc/rts/hooks/ErrorHdr.c index 2797ca4f90..0f253d3aa4 100644 --- a/ghc/rts/hooks/ErrorHdr.c +++ b/ghc/rts/hooks/ErrorHdr.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: ErrorHdr.c,v 1.2 1998/12/02 13:29:11 simonm Exp $ + * $Id: ErrorHdr.c,v 1.3 2002/07/17 09:21:51 simonmar Exp $ * * User-overridable RTS hooks. * @@ -7,6 +7,10 @@ #include "Rts.h" +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + void ErrorHdrHook (long fd) { diff --git a/ghc/rts/hooks/MallocFail.c b/ghc/rts/hooks/MallocFail.c index 01f534e4e7..c4af10a7c0 100644 --- a/ghc/rts/hooks/MallocFail.c +++ b/ghc/rts/hooks/MallocFail.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: MallocFail.c,v 1.2 1998/12/02 13:29:12 simonm Exp $ + * $Id: MallocFail.c,v 1.3 2002/07/17 09:21:51 simonmar Exp $ * * User-overridable RTS hooks. * @@ -7,6 +7,8 @@ #include "Rts.h" +#include <stdio.h> + void MallocFailHook (lnat request_size /* in bytes */, char *msg) { diff --git a/ghc/rts/hooks/NoRunnableThreads.c b/ghc/rts/hooks/NoRunnableThreads.c index 209e465792..c5acd2eff5 100644 --- a/ghc/rts/hooks/NoRunnableThreads.c +++ b/ghc/rts/hooks/NoRunnableThreads.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: NoRunnableThreads.c,v 1.2 1998/12/02 13:29:13 simonm Exp $ + * $Id: NoRunnableThreads.c,v 1.3 2002/07/17 09:21:51 simonmar Exp $ * * User-overridable RTS hooks. * @@ -7,6 +7,8 @@ #include "Rts.h" +#include <stdio.h> + /* Hook to invoke when there's nothing left on the runnable threads queue {\em and} we've got nothing to wait for. The value diff --git a/ghc/rts/hooks/OutOfHeap.c b/ghc/rts/hooks/OutOfHeap.c index b09dbd15dc..ec02a7f2b7 100644 --- a/ghc/rts/hooks/OutOfHeap.c +++ b/ghc/rts/hooks/OutOfHeap.c @@ -1,11 +1,12 @@ /* ----------------------------------------------------------------------------- - * $Id: OutOfHeap.c,v 1.3 1999/06/29 13:06:45 panne Exp $ + * $Id: OutOfHeap.c,v 1.4 2002/07/17 09:21:51 simonmar Exp $ * * User-overridable RTS hooks. * * ---------------------------------------------------------------------------*/ #include "Rts.h" +#include <stdio.h> void OutOfHeapHook (lnat request_size, lnat heap_size) /* both sizes in bytes */ diff --git a/ghc/rts/hooks/PatErrorHdr.c b/ghc/rts/hooks/PatErrorHdr.c index 633a982464..eb39b95995 100644 --- a/ghc/rts/hooks/PatErrorHdr.c +++ b/ghc/rts/hooks/PatErrorHdr.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: PatErrorHdr.c,v 1.2 1998/12/02 13:29:15 simonm Exp $ + * $Id: PatErrorHdr.c,v 1.3 2002/07/17 09:21:51 simonmar Exp $ * * User-overridable RTS hooks. * @@ -7,6 +7,10 @@ #include "Rts.h" +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + void PatErrorHdrHook (long fd) { diff --git a/ghc/rts/hooks/RtsOpts.c b/ghc/rts/hooks/RtsOpts.c index dec0075008..177086d683 100644 --- a/ghc/rts/hooks/RtsOpts.c +++ b/ghc/rts/hooks/RtsOpts.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsOpts.c,v 1.1 2001/10/01 11:36:29 simonmar Exp $ + * $Id: RtsOpts.c,v 1.2 2002/07/17 09:21:51 simonmar Exp $ * * Default RTS options. * @@ -7,6 +7,8 @@ #include "Rts.h" +#include <stdlib.h> + // Default RTS options can be given by providing an alternate // definition for this variable, pointing to a string of RTS options. char *ghc_rts_opts = NULL; diff --git a/ghc/rts/hooks/StackOverflow.c b/ghc/rts/hooks/StackOverflow.c index a46750255f..a14b0698f8 100644 --- a/ghc/rts/hooks/StackOverflow.c +++ b/ghc/rts/hooks/StackOverflow.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StackOverflow.c,v 1.2 1998/12/02 13:29:15 simonm Exp $ + * $Id: StackOverflow.c,v 1.3 2002/07/17 09:21:51 simonmar Exp $ * * User-overridable RTS hooks. * @@ -7,6 +7,8 @@ #include "Rts.h" +#include <stdio.h> + void StackOverflowHook (lnat stack_size) /* in bytes */ { |
