Repository : ssh://darcs.haskell.org//srv/darcs/packages/unix

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/28a7a416f55bcc6440766cd073b69e47f66fbc63

>---------------------------------------------------------------

commit 28a7a416f55bcc6440766cd073b69e47f66fbc63
Author: David Terei <[email protected]>
Date:   Thu Jan 5 19:02:27 2012 -0800

    Fix validation error

>---------------------------------------------------------------

 System/Posix/Temp.hsc            |    4 +++-
 System/Posix/Temp/ByteString.hsc |    6 ++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/System/Posix/Temp.hsc b/System/Posix/Temp.hsc
index bfbfee1..9989ca0 100644
--- a/System/Posix/Temp.hsc
+++ b/System/Posix/Temp.hsc
@@ -25,7 +25,9 @@ module System.Posix.Temp (
 import System.IO
 import System.Posix.IO
 import System.Posix.Types
+#if !defined(__GLASGOW_HASKELL__) && !defined(__HUGS__)
 import System.Posix.Directory (createDirectory)
+#endif
 import Foreign.C
 
 #if __GLASGOW_HASKELL__ > 700
@@ -78,7 +80,7 @@ mkdtemp template' = do
   let template = template' ++ "XXXXXX"
 #if defined(__GLASGOW_HASKELL__) || defined(__HUGS__)
   withFilePath template $ \ ptr -> do
-    throwErrnoIfNull "mkdtemp" (c_mkdtemp ptr)
+    _ <- throwErrnoIfNull "mkdtemp" (c_mkdtemp ptr)
     name <- peekFilePath ptr
     return name
 #else
diff --git a/System/Posix/Temp/ByteString.hsc b/System/Posix/Temp/ByteString.hsc
index 7479614..a13e45a 100644
--- a/System/Posix/Temp/ByteString.hsc
+++ b/System/Posix/Temp/ByteString.hsc
@@ -22,10 +22,12 @@ module System.Posix.Temp.ByteString (
 
 #include "HsUnix.h"
 
-import System.IO ( Handle, openFile, IOMode(..) )
+import System.IO
 import System.Posix.IO
 import System.Posix.Types
+#if !defined(__GLASGOW_HASKELL__) && !defined(__HUGS__)
 import System.Posix.Directory (createDirectory)
+#endif
 
 import Foreign.C
 
@@ -69,7 +71,7 @@ mkdtemp template' = do
   let template = template' `B.append` (BC.pack "XXXXXX")
 #if defined(__GLASGOW_HASKELL__) || defined(__HUGS__)
   withFilePath template $ \ ptr -> do
-    throwErrnoIfNull "mkdtemp" (c_mkdtemp ptr)
+    _ <- throwErrnoIfNull "mkdtemp" (c_mkdtemp ptr)
     name <- peekFilePath ptr
     return name
 #else



_______________________________________________
Cvs-libraries mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to