From e94a62fa4c5e9c7b64fd0db38ca874a2c1a3cd32 Mon Sep 17 00:00:00 2001 From: rrt Date: Fri, 17 Aug 2001 11:13:04 +0000 Subject: [PATCH] [project @ 2001-08-17 11:13:04 by rrt] Add a dummy function _ErrorHdrHook to return the address of ErrorHdrHook. Dunno how this ever compiled before. Maybe this is just a special Friday effect. Maybe I shouldn't be committing stuff today. Maybe I should just give up now. --- ghc/lib/std/PrelTopHandler.lhs | 4 ++-- ghc/lib/std/cbits/ilxstubs.c | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ghc/lib/std/PrelTopHandler.lhs b/ghc/lib/std/PrelTopHandler.lhs index 6fb55ed..30c9884 100644 --- a/ghc/lib/std/PrelTopHandler.lhs +++ b/ghc/lib/std/PrelTopHandler.lhs @@ -1,5 +1,5 @@ -- ----------------------------------------------------------------------------- --- $Id: PrelTopHandler.lhs,v 1.4 2001/08/15 09:24:19 rrt Exp $ +-- $Id: PrelTopHandler.lhs,v 1.5 2001/08/17 11:13:04 rrt Exp $ -- -- (c) The University of Glasgow, 2001 -- @@ -70,7 +70,7 @@ reportError bombOut str = do #ifndef ILX foreign label "ErrorHdrHook" errorHdrHook :: Ptr () #else -foreign import "ErrorHdrHook" errorHdrHook :: Ptr () +foreign import "_ErrorHdrHook" errorHdrHook :: Ptr () #endif foreign import ccall "writeErrString__" unsafe diff --git a/ghc/lib/std/cbits/ilxstubs.c b/ghc/lib/std/cbits/ilxstubs.c index 3f0aac8..1f45e3a 100644 --- a/ghc/lib/std/cbits/ilxstubs.c +++ b/ghc/lib/std/cbits/ilxstubs.c @@ -1,7 +1,7 @@ /* * (c) The GHC Team 2001 * - * $Id: ilxstubs.c,v 1.4 2001/08/15 10:16:46 rrt Exp $ + * $Id: ilxstubs.c,v 1.5 2001/08/17 11:13:04 rrt Exp $ * * ILX stubs for external function calls */ @@ -59,8 +59,14 @@ stackOverflow(void) { } +void * +_ErrorHdrHook(void) +{ + return &ErrorHdrHook; +} + void -ErrorHdrHook (long fd) +ErrorHdrHook(long fd) { const char msg[] = "\nFail: "; write(fd, msg, sizeof(msg)-1); -- 1.7.10.4