* constant subs for IO
*/
stash = gv_stashpvn("IO", 2, TRUE);
-#ifdef EINPROGRESS
- newCONSTSUB(stash,"EINPROGRESS", newSViv(EINPROGRESS));
-#endif
}
$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;
$@ = "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: $!";
}