Commit 71df002e authored by simonm's avatar simonm
Browse files

[project @ 1999-01-15 12:57:49 by simonm]

H98 changes for non-cygwin targets.
parent f77b5a62
......@@ -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
......
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment