[project @ 1999-01-15 12:57:49 by simonm]
authorsimonm <unknown>
Fri, 15 Jan 1999 12:57:51 +0000 (12:57 +0000)
committersimonm <unknown>
Fri, 15 Jan 1999 12:57:51 +0000 (12:57 +0000)
H98 changes for non-cygwin targets.

ghc/lib/misc/BSD.lhs
ghc/lib/misc/SocketPrim.lhs

index c63d7df..e7fbecf 100644 (file)
@@ -188,7 +188,7 @@ getServiceEntry = do
 
 setServiceEntry        :: Bool -> IO ()
 setServiceEntry flg = _ccall_ setservent stayOpen
- where stayOpen = if flg then 1 else 0
+ where stayOpen = (if flg then 1 else 0) :: Int
 
 endServiceEntry        :: IO ()
 endServiceEntry = _ccall_ endservent
@@ -252,7 +252,7 @@ getProtocolEntry = do
 
 --setProtocolEntry :: Bool -> IO ()    -- Keep DB Open ?
 setProtocolEntry flg = _ccall_ setprotoent v
- where v = if flg then 1 else 0
+ where v = (if flg then 1 else 0) :: Int
 
 --endProtocolEntry :: IO ()
 endProtocolEntry = _ccall_ endprotoent
@@ -294,7 +294,7 @@ getHostEntry = do
 
 setHostEntry :: Bool -> IO ()
 setHostEntry flg = _ccall_ sethostent v
- where v = if flg then 1 else 0
+ where v = (if flg then 1 else 0) :: Int
 
 endHostEntry :: IO ()
 endHostEntry = _ccall_ endhostent
@@ -352,7 +352,7 @@ getNetworkEntry = do
 
 setNetworkEntry :: Bool -> IO ()
 setNetworkEntry flg = _ccall_ setnetent v
- where v = if flg then 1 else 0
+ where v = (if flg then 1 else 0) :: Int
 
 endNetworkEntry :: IO ()
 endNetworkEntry = _ccall_ endnetent
index 7f1472e..1d2f9c8 100644 (file)
@@ -267,7 +267,7 @@ bindSocket :: Socket        -- Unconnected Socket
 
 bindSocket (MkSocket s _family _stype _protocol socketStatus) addr = do
 #ifndef cygwin32_TARGET_OS
- let isDomainSocket = if family == AF_UNIX then 1 else (0::Int)
+ let isDomainSocket = if _family == AF_UNIX then 1 else (0::Int)
 #else
  let isDomainSocket = 0
 #endif
@@ -302,7 +302,7 @@ connect :: Socket   -- Unconnected Socket
 
 connect (MkSocket s _family _stype _protocol socketStatus) addr = do
 #ifndef cygwin32_TARGET_OS
- let isDomainSocket = if family == AF_UNIX then 1 else (0::Int)
+ let isDomainSocket = if _family == AF_UNIX then 1 else (0::Int)
 #else
  let isDomainSocket = 0
 #endif
@@ -1082,7 +1082,7 @@ sIsWritable = sIsReadable -- sort of.
 
 sIsAcceptable :: Socket -> IO Bool
 #ifndef cygwin32_TARGET_OS
-sIsAcceptable (MkSocket _ AF_UNIX Stream _ _) = do
+sIsAcceptable (MkSocket _ AF_UNIX Stream _ status) = do
     value <- readIORef status
     return (value == Connected || value == Bound || value == Listening)
 sIsAcceptable (MkSocket _ AF_UNIX _ _ _) = return False