summaryrefslogtreecommitdiff
path: root/ext/IO
diff options
context:
space:
mode:
Diffstat (limited to 'ext/IO')
-rw-r--r--ext/IO/IO.xs3
-rw-r--r--ext/IO/lib/IO/Socket.pm8
2 files changed, 3 insertions, 8 deletions
diff --git a/ext/IO/IO.xs b/ext/IO/IO.xs
index be84f73268..4a93c03192 100644
--- a/ext/IO/IO.xs
+++ b/ext/IO/IO.xs
@@ -462,7 +462,4 @@ BOOT:
* constant subs for IO
*/
stash = gv_stashpvn("IO", 2, TRUE);
-#ifdef EINPROGRESS
- newCONSTSUB(stash,"EINPROGRESS", newSViv(EINPROGRESS));
-#endif
}
diff --git a/ext/IO/lib/IO/Socket.pm b/ext/IO/lib/IO/Socket.pm
index 2981516efc..2b51dee41e 100644
--- a/ext/IO/lib/IO/Socket.pm
+++ b/ext/IO/lib/IO/Socket.pm
@@ -106,7 +106,7 @@ sub connect {
$blocking = $sock->blocking(0) if $timeout;
if (!connect($sock, $addr)) {
- if ($timeout && exists &IO::EINPROGRESS && ($! == &IO::EINPROGRESS)) {
+ if ($timeout && $!{EINPROGRESS}) {
require IO::Select;
my $sel = new IO::Select $sock;
@@ -116,10 +116,8 @@ sub connect {
$@ = "connect: timeout";
}
elsif(!connect($sock,$addr) && not $!{EISCONN}) {
- # Some systems (e.g. Digital UNIX/Tru64) fail to
- # re-connect() to an already open socket and set
- # errno to EISCONN (Socket is already connected)
- # for such an attempt.
+ # Some systems refuse to re-connect() to
+ # an already open socket and set errno to EISCONN.
$err = $!;
$@ = "connect: $!";
}