#!./perl
# Check for presence and correctness of .ph files; for now,
# just socket.ph and pals.
# -- Kurt Starsinic <kstar@isinet.com>
BEGIN {
chdir 't' if -d 't';
}
# All the constants which Socket.pm tries to make available:
);
# The libraries which I'm going to require:
# These are defined by Socket.pm even if the C header files don't define them:
my %ok_to_miss = (
INADDR_NONE => 1,
INADDR_LOOPBACK => 1,
);
my $i = 0;
print "1..$total_tests\n";
foreach (@libs) {
$i++;
if (eval "require $_" ) {
print "ok $i\n";
} else {
print "# Skipping tests; $_ may be missing\n";
exit;
}
}
$i++;
else { print "not ok $i\n" }
next;
print "not ok $i\n";
next;
}
# Socket.pm converts these to network byte order, so we convert the
# socket.ph version to match; note that these cases skip the following
# `elsif', which is only applied to _numeric_ values, not literal
# bitmasks.
}
# they could return functionally equivalent bitmaps with different numeric
# interpretations (due to sign extension). The only apparent case of this
# is SO_DONTLINGER (only on Solaris, and deprecated, at that):
}
else { print "not ok $i\n" }
}