[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36
John Goerzen
jgoerzen at complete.org
Fri Apr 23 14:59:19 UTC 2010
The following commit has been merged in the master branch:
commit 7fd66fe2ed8780236fbe7d972abc52b36269ecf6
Author: John Goerzen <jgoerzen at complete.org>
Date: Thu Jul 21 20:36:00 2005 +0100
Fix Network.hs to not use Unix domain sockets on Windows
diff --git a/MissingH/Network.hs b/MissingH/Network.hs
index 23f478a..9fb8e74 100644
--- a/MissingH/Network.hs
+++ b/MissingH/Network.hs
@@ -55,10 +55,13 @@ Example:
niceSocketsDo :: IO a -> IO a
niceSocketsDo func = do
+#ifndef mingw32_HOST_OS
+ -- No signals on Windows anyway
System.Posix.Signals.installHandler
System.Posix.Signals.sigPIPE
System.Posix.Signals.Ignore
Nothing
+#endif
withSocketsDo func
connectTCP :: HostName -> PortNumber -> IO Socket
@@ -82,7 +85,9 @@ listenTCPAddr addr queuelen = do
return s
showSockAddr :: SockAddr -> IO String
+#ifndef mingw32_HOST_OS
showSockAddr (SockAddrUnix x) = return $ "UNIX socket at " ++ x
+#endif
showSockAddr (SockAddrInet port host) =
do h <- inet_ntoa host
return $ "IPv4 host " ++ h ++ ", port " ++ (show port)
--
haskell-testpack
More information about the Pkg-haskell-commits
mailing list