[project @ 1998-08-11 17:31:40 by sof]
authorsof <unknown>
Tue, 11 Aug 1998 17:31:40 +0000 (17:31 +0000)
committersof <unknown>
Tue, 11 Aug 1998 17:31:40 +0000 (17:31 +0000)
iNADDR_ANY: it's a HostAddress, so convert it to network
            byte order.

ghc/lib/misc/SocketPrim.lhs

index 2ed9048..7f5cd6e 100644 (file)
@@ -917,7 +917,9 @@ packSocketType stype = 1 + (index (Stream, Packet) stype)
 
 \begin{code}
 aNY_PORT = 0::Int
-iNADDR_ANY = ``INADDR_ANY''::Word
+iNADDR_ANY :: HostAddress
+iNADDR_ANY = unsafePerformIO (_casm_ `` %r = htonl(INADDR_ANY); '')
+
 sOMAXCONN = ``SOMAXCONN''::Int
 maxListenQueue = sOMAXCONN