projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ef120d
)
fix Hugs implementation of openTempFile
author
Ross Paterson
<ross@soi.city.ac.uk>
Tue, 24 Jul 2007 11:40:03 +0000
(11:40 +0000)
committer
Ross Paterson
<ross@soi.city.ac.uk>
Tue, 24 Jul 2007 11:40:03 +0000
(11:40 +0000)
System/IO.hs
patch
|
blob
|
history
diff --git
a/System/IO.hs
b/System/IO.hs
index
c8b0f92
..
a5b9d7d
100644
(file)
--- a/
System/IO.hs
+++ b/
System/IO.hs
@@
-155,7
+155,7
@@
module System.IO (
hGetBufNonBlocking, -- :: Handle -> Ptr a -> Int -> IO Int
#endif
- -- * Temporary files (not portable: GHC only)
+ -- * Temporary files
openTempFile,
openBinaryTempFile,
@@
-464,6
+464,9
@@
openTempFile' loc tmp_dir template binary = do
where
filename = prefix ++ show x ++ suffix
filepath = tmp_dir ++ [pathSeparator] ++ filename
+#if __HUGS__
+ fdToHandle fd = openFd (fromIntegral fd) False ReadWriteMode binary
+#endif
-- XXX Should use filepath library
pathSeparator :: Char