Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
b5cfaf64
Commit
b5cfaf64
authored
Nov 26, 2001
by
sof
Browse files
[project @ 2001-11-26 23:55:27 by sof]
make it work on non-mingw platforms
parent
9746e23a
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/lib/std/PrelHandle.hs
View file @
b5cfaf64
...
...
@@ -4,7 +4,7 @@
#
undef
DEBUG
-- -----------------------------------------------------------------------------
-- $Id: PrelHandle.hs,v 1.
4
2001/11/26 2
0:04:00
sof Exp $
-- $Id: PrelHandle.hs,v 1.
5
2001/11/26 2
3:55:27
sof Exp $
--
-- (c) The University of Glasgow, 1994-2001
--
...
...
@@ -310,9 +310,9 @@ handleFinalizer m = do
-- ToDo: closesocket() for a WINSOCK socket?
when
(
fd
/=
-
1
)
#
ifdef
mingw32_TARGET_OS
(
c_
close
fd
>>
return
()
)
(
close
Fd
(
haIsStream
handle_
)
fd
>>
return
()
)
#
else
(
close
Fd
(
haIsStream
handle_
fd
>>
return
()
)
(
c_
close
fd
>>
return
()
)
#
endif
return
()
...
...
@@ -769,7 +769,12 @@ hClose_help handle_ =
-- close the file descriptor, but not when this is the read side
-- of a duplex handle.
case
haOtherSide
handle_
of
Nothing
->
throwErrnoIfMinus1Retry_
"hClose"
(
closeFd
(
haIsStream
handle_
)
fd
)
Nothing
->
throwErrnoIfMinus1Retry_
"hClose"
#
ifdef
mingw32_TARGET_OS
(
closeFd
(
haIsStream
handle_
)
fd
)
#
else
(
c_close
fd
)
#
endif
Just
_
->
return
()
-- free the spare buffers
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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