diff options
author | sewardj <unknown> | 2001-05-15 15:01:48 +0000 |
---|---|---|
committer | sewardj <unknown> | 2001-05-15 15:01:48 +0000 |
commit | 9e41f44aba21e28fc905c482dcaba4642a2a8d67 (patch) | |
tree | 3f8f216c4cdaee6c2cdaf2d52b9e3ea5804db41e | |
parent | 7e8d0a0b6ab5e8e328db0ee2c67f6bb9f043b40e (diff) | |
download | haskell-9e41f44aba21e28fc905c482dcaba4642a2a8d67.tar.gz |
[project @ 2001-05-15 15:01:48 by sewardj]
Handle leading underscores correctly, for ghci on Win32.
-rw-r--r-- | ghc/compiler/ghci/Linker.lhs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ghc/compiler/ghci/Linker.lhs b/ghc/compiler/ghci/Linker.lhs index 8b0d15a31e..1d3e7b7604 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 |