Commit 6024e9e9 authored by Ian Lynagh's avatar Ian Lynagh

Merge branch 'master' of http://darcs.haskell.org/ghc

parents 6b6b25ae c01a23d3
......@@ -36,7 +36,11 @@ import Control.Monad ( when )
import Foreign.C
import Foreign ( nullPtr )
import GHC.Exts ( Ptr(..) )
import GHC.IO.Encoding ( fileSystemEncoding )
#if __GLASGOW_HASKELL__ >= 703
import GHC.IO.Encoding (getFileSystemEncoding)
#else
import GHC.IO.Encoding (TextEncoding, fileSystemEncoding)
#endif
import qualified GHC.Foreign as GHC
import System.FilePath ( dropExtension )
......@@ -45,9 +49,16 @@ import System.FilePath ( dropExtension )
-- RTS Linker Interface
-- ---------------------------------------------------------------------------
#if __GLASGOW_HASKELL__ < 703
getFileSystemEncoding :: IO TextEncoding
getFileSystemEncoding = return fileSystemEncoding
#endif
-- UNICODE FIXME: Unicode object/archive/DLL file names on Windows will only work in the right code page
withFileCString :: FilePath -> (CString -> IO a) -> IO a
withFileCString = GHC.withCString fileSystemEncoding
withFileCString fp f = do
enc <- getFileSystemEncoding
GHC.withCString enc fp f
insertSymbol :: String -> String -> Ptr a -> IO ()
insertSymbol obj_name key symbol
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment