15 ## Does this OS support sockets?
16 use Socket qw(AF_INET SOCK_STREAM);
17 test (socket SOCK, AF_INET, SOCK_STREAM, 0);
19 ## Does this OS support select()?
20 vec($bitmask='', fileno(SOCK), 1) = 1;
21 eval { $nfound = select($bitmask, '', '', 0) };
24 ## Did select() return a correct value?
25 test (defined($nfound) and ($nfound == 0 or $nfound == 1));
31 ############################ Subroutines #############################
38 if (defined($_[0]) and $_[0]) {
39 print "ok ", ++$testnum, "\n";
42 print "not ok ", ++$testnum, "\n";