summaryrefslogtreecommitdiff
path: root/ghc/lib/misc/cbits/shutdownSocket.c
diff options
context:
space:
mode:
authorsof <unknown>1998-08-14 10:17:45 +0000
committersof <unknown>1998-08-14 10:17:45 +0000
commit19a4b25b9ecd4a05e784110e9429e67d5643f2c2 (patch)
treef1fa1e9c492b1c5d45a03bf03f2ac491fa9b3fc2 /ghc/lib/misc/cbits/shutdownSocket.c
parent2a62415d5fb5e094a99e77f9562866b227fa4b33 (diff)
downloadhaskell-19a4b25b9ecd4a05e784110e9429e67d5643f2c2.tar.gz
[project @ 1998-08-14 10:17:35 by sof]
Added stubs for getsockopt() and setsockopt(), removed redundant ghc_errno switches, use stdErrno() instead.
Diffstat (limited to 'ghc/lib/misc/cbits/shutdownSocket.c')
-rw-r--r--ghc/lib/misc/cbits/shutdownSocket.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/ghc/lib/misc/cbits/shutdownSocket.c b/ghc/lib/misc/cbits/shutdownSocket.c
index b378b2d5cb..f5332bf793 100644
--- a/ghc/lib/misc/cbits/shutdownSocket.c
+++ b/ghc/lib/misc/cbits/shutdownSocket.c
@@ -19,23 +19,7 @@ shutdownSocket(I_ sockfd, I_ how)
while ((rc = shutdown((int) sockfd, (int) how)) < 0) {
if (errno != EINTR) {
cvtErrno();
- switch (ghc_errno) {
- default:
- stdErrno();
- break;
- case GHC_EBADF:
- ghc_errtype = ERR_INVALIDARGUMENT;
- ghc_errstr = "Not a valid write descriptor";
- break;
- case GHC_ENOTCONN:
- ghc_errtype = ERR_INVALIDARGUMENT;
- ghc_errstr = "Socket not connected";
- break;
- case GHC_ENOTSOCK:
- ghc_errtype = ERR_INVALIDARGUMENT;
- ghc_errstr = "Descriptor is not a socket";
- break;
- }
+ stdErrno();
return -1;
}
}