projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e6ab8ea
)
Fix building with GHC 6.6
author
Ian Lynagh
<igloo@earth.li>
Sat, 20 Sep 2008 16:29:18 +0000
(16:29 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Sat, 20 Sep 2008 16:29:18 +0000
(16:29 +0000)
utils/ghc-pkg/Main.hs
patch
|
blob
|
history
diff --git
a/utils/ghc-pkg/Main.hs
b/utils/ghc-pkg/Main.hs
index
49ac435
..
344a21e
100644
(file)
--- a/
utils/ghc-pkg/Main.hs
+++ b/
utils/ghc-pkg/Main.hs
@@
-1243,7
+1243,13
@@
openNewFile dir template = do
-- XXX We want to tell fdToHandle what the filepath is,
-- as any exceptions etc will only be able to report the
-- fd currently
-- XXX We want to tell fdToHandle what the filepath is,
-- as any exceptions etc will only be able to report the
-- fd currently
- h <- fdToHandle fd `onException` c_close fd
+ h <-
+#if __GLASGOW_HASKELL__ >= 609
+ fdToHandle fd
+#else
+ fdToHandle (fromIntegral fd)
+#endif
+ `onException` c_close fd
return (filepath, h)
where
filename = prefix ++ show x ++ suffix
return (filepath, h)
where
filename = prefix ++ show x ++ suffix