diff options
author | Max Bolingbroke <batterseapower@hotmail.com> | 2011-11-18 17:40:55 +0000 |
---|---|---|
committer | Max Bolingbroke <batterseapower@hotmail.com> | 2011-11-18 17:40:55 +0000 |
commit | b55007757210c1a7dfc06dcea956f4b8d9204783 (patch) | |
tree | 9edd7e5b7baddd35446c47a1759844232499c8f2 /libraries/base/System/Posix/Internals.hs | |
parent | 59ecd68df72cb6245f58cc03a7375c4d6d61aa58 (diff) | |
download | haskell-b55007757210c1a7dfc06dcea956f4b8d9204783.tar.gz |
Make the fileSystemEncoding/localeEncoding/foreignEncoding mutable
Diffstat (limited to 'libraries/base/System/Posix/Internals.hs')
-rw-r--r-- | libraries/base/System/Posix/Internals.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libraries/base/System/Posix/Internals.hs b/libraries/base/System/Posix/Internals.hs index 0f94c386e6..6436953eff 100644 --- a/libraries/base/System/Posix/Internals.hs +++ b/libraries/base/System/Posix/Internals.hs @@ -53,7 +53,7 @@ import GHC.IO.IOMode import GHC.IO.Exception import GHC.IO.Device #ifndef mingw32_HOST_OS -import {-# SOURCE #-} GHC.IO.Encoding (fileSystemEncoding) +import {-# SOURCE #-} GHC.IO.Encoding (getFileSystemEncoding) import qualified GHC.Foreign as GHC #endif #elif __HUGS__ @@ -199,9 +199,9 @@ peekFilePath :: CString -> IO FilePath peekFilePathLen :: CStringLen -> IO FilePath #if __GLASGOW_HASKELL__ -withFilePath = GHC.withCString fileSystemEncoding -peekFilePath = GHC.peekCString fileSystemEncoding -peekFilePathLen = GHC.peekCStringLen fileSystemEncoding +withFilePath fp f = getFileSystemEncoding >>= \enc -> GHC.withCString enc fp f +peekFilePath fp = getFileSystemEncoding >>= \enc -> GHC.peekCString enc fp +peekFilePathLen fp = getFileSystemEncoding >>= \enc -> GHC.peekCStringLen enc fp #else withFilePath = withCString peekFilePath = peekCString |