The attached patch makes VMS piggyback on the Win32 code that uses ioctl
with FIONBIO to twiddle the non-blocking mode of a socket. (The FIONBIO
value for VMS is the same as for Win32.) After the patch (which depends
on yesterday's patch to get ioctl working on VMS), 190_alarm.t and
450_service.t now pass. These failures often went unnoticed because many
VMS systems have echo disabled so the Net::Ping tests are skipped. With
this, Net::Ping is now fully functional on VMS systems that do have echo
running.
--- lib/Net/Ping.pm;-0 Fri Jul 4 09:31:18 2003
+++ lib/Net/Ping.pm Mon Jul 21 19:15:42 2003
@@ -316,9 +316,9 @@
# set the non-blocking mode (set O_NONBLOCK)
my $flags;
- if ($^O eq 'MSWin32') {
- # FIONBIO enables non-blocking sockets on windows.
- # FIONBIO is (0x80000000|(4<<16)|(ord('f')<<8)|126), as per winsock.h.
+ if ($^O eq 'MSWin32' || $^O eq 'VMS') {
+ # FIONBIO enables non-blocking sockets on windows and vms.
+ # FIONBIO is (0x80000000|(4<<16)|(ord('f')<<8)|126), as per winsock.h, ioctl.h
my $f = 0x8004667e;
my $v = pack("L", $block ? 0 : 1);
ioctl($fh, $f, $v) or croak("ioctl failed: $!");