Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
71df002e
Commit
71df002e
authored
Jan 15, 1999
by
simonm
Browse files
[project @ 1999-01-15 12:57:49 by simonm]
H98 changes for non-cygwin targets.
parent
f77b5a62
Changes
2
Hide whitespace changes
Inline
Side-by-side
ghc/lib/misc/BSD.lhs
View file @
71df002e
...
...
@@ -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
...
...
ghc/lib/misc/SocketPrim.lhs
View file @
71df002e
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment