From: sewardj Date: Tue, 15 May 2001 15:01:48 +0000 (+0000) Subject: [project @ 2001-05-15 15:01:48 by sewardj] X-Git-Tag: Approximately_9120_patches~1954 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=9e41f44aba21e28fc905c482dcaba4642a2a8d67;p=ghc-hetmet.git [project @ 2001-05-15 15:01:48 by sewardj] Handle leading underscores correctly, for ghci on Win32. --- diff --git a/ghc/compiler/ghci/Linker.lhs b/ghc/compiler/ghci/Linker.lhs index 8b0d15a..1d3e7b7 100644 --- a/ghc/compiler/ghci/Linker.lhs +++ b/ghc/compiler/ghci/Linker.lhs @@ -5,6 +5,10 @@ \begin{code} {-# OPTIONS -#include "Linker.h" #-} + +-- so that we can see defn of LEADING_UNDERSCORE +#include "../includes/config.h" + module Linker ( initLinker, -- :: IO () loadObj, -- :: String -> IO () @@ -24,7 +28,12 @@ import Panic ( panic ) -- RTS Linker Interface -- --------------------------------------------------------------------------- -lookupSymbol str = do +lookupSymbol str_in = do +# ifdef LEADING_UNDERSCORE + let str = '_':str_in +# else + let str = str_in +# endif addr <- c_lookupSymbol (packString str) if addr == nullPtr then return Nothing