diff options
author | sof <unknown> | 1999-10-29 14:01:53 +0000 |
---|---|---|
committer | sof <unknown> | 1999-10-29 14:01:53 +0000 |
commit | d0f9dcdf0ffeb4eeada2fb212621f006b126184d (patch) | |
tree | 532982251c4a78d53fb079735a37bf5417566f62 /ghc/lib/misc/cbits | |
parent | 9a2c72c9e65c0e3de8804be22ea04babd8c5aadc (diff) | |
download | haskell-d0f9dcdf0ffeb4eeada2fb212621f006b126184d.tar.gz |
[project @ 1999-10-29 14:01:53 by sof]
Pure Win32 builds doesn't support non-blocking IO
Diffstat (limited to 'ghc/lib/misc/cbits')
-rw-r--r-- | ghc/lib/misc/cbits/connectSocket.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ghc/lib/misc/cbits/connectSocket.c b/ghc/lib/misc/cbits/connectSocket.c index 961b6bbac8..8b89dbe079 100644 --- a/ghc/lib/misc/cbits/connectSocket.c +++ b/ghc/lib/misc/cbits/connectSocket.c @@ -18,11 +18,14 @@ connectSocket(I_ sockfd, A_ servaddr, I_ addrlen, I_ isUnixDomain) int rc; while ((rc = connect((int)sockfd, (struct sockaddr *)servaddr, (int)addrlen)) < 0) { +#if !defined(_WIN32) || defined(__CYGWIN__) || defined(__CYGWIN32__) if (errno == EINPROGRESS) { errno = 0; return FILEOBJ_BLOCKED_WRITE; - } else if (errno != EINTR) { + } else +#endif + if (errno != EINTR) { cvtErrno(); switch (ghc_errno) { default: @@ -33,7 +36,7 @@ connectSocket(I_ sockfd, A_ servaddr, I_ addrlen, I_ isUnixDomain) if (isUnixDomain != 0) ghc_errstr = "For a component of path prefix of path name"; else - ghc_errstr = "Requested address protected, cannot bind socket"; + ghc_errstr = "Requested address protected, cannot bind socket"; break; case GHC_EISCONN: case GHC_EADDRINUSE: |