PP(pp_gpwent)
{
djSP;
-#if defined(HAS_PASSWD) && defined(HAS_GETPWENT)
+#ifdef HAS_PASSWD
I32 which = PL_op->op_type;
register SV *sv;
struct passwd *pwent;
else if (which == OP_GPWUID)
pwent = getpwuid(POPi);
else
+#ifdef HAS_GETPWENT
pwent = (struct passwd *)getpwent();
+#else
+ DIE(aTHX_ PL_no_func, "getpwent");
+#endif
#ifdef HAS_GETSPNAM
if (which == OP_GPWNAM) {
PP(pp_ggrent)
{
djSP;
-#if defined(HAS_GROUP) && defined(HAS_GETGRENT)
+#ifdef HAS_GROUP
I32 which = PL_op->op_type;
register char **elem;
register SV *sv;
else if (which == OP_GGRGID)
grent = (struct group *)getgrgid(POPi);
else
+#ifdef HAS_GETGRENT
grent = (struct group *)getgrent();
+#else
+ DIE(aTHX_ PL_no_func, "getgrent");
+#endif
EXTEND(SP, 4);
if (GIMME != G_ARRAY) {
print "ok 10\n";
}
-# check that status for the correct process is collected
-my $zombie = fork or exit 37;
-my $pipe = open *FH, "sleep 2;exit 13|" or die "Open: $!\n";
-$SIG{ALRM} = sub { return };
-alarm(1);
-my $close = close FH;
-if ($? == 13*256 && ! length $close && ! $!) {
- print "ok 11\n";
-} else {
- print "not ok 11\n# close $close\$?=$? \$!=", $!+0, ":$!\n";
-};
-my $wait = wait;
-if ($? == 37*256 && $wait == $zombie && ! $!) {
- print "ok 12\n";
+if ($^O eq 'mpeix') {
+ print "ok 11 # skipped\n";
+ print "ok 12 # skipped\n";
} else {
- print "not ok 12\n# pid=$wait first=$pid pipe=$pipe zombie=$zombie me=$$ \$?=$? \$!=", $!+0, ":$!\n";
+ # check that status for the correct process is collected
+ my $zombie = fork or exit 37;
+ my $pipe = open *FH, "sleep 2;exit 13|" or die "Open: $!\n";
+ $SIG{ALRM} = sub { return };
+ alarm(1);
+ my $close = close FH;
+ if ($? == 13*256 && ! length $close && ! $!) {
+ print "ok 11\n";
+ } else {
+ print "not ok 11\n# close $close\$?=$? \$!=", $!+0, ":$!\n";
+ };
+ my $wait = wait;
+ if ($? == 37*256 && $wait == $zombie && ! $!) {
+ print "ok 12\n";
+ } else {
+ print "not ok 12\n# pid=$wait first=$pid pipe=$pipe zombie=$zombie me=$$ \$?=$? \$!=", $!+0, ":$!\n";
+ }
}
# Test new semantics for missing command in piped open
# check bad protections
# should return an empty list, and set ERROR
-if ($^O eq 'MSWin32' or $^O eq 'os2' or not $>) {
+if ($^O eq 'mpeix' or $^O eq 'MSWin32' or $^O eq 'os2' or not $>) {
print "ok 6 # skipped\n";
}
else {
}
}
+if ($^O eq 'mpeix') {
+ print "1..0 # Skip: broken on MPE/iX\n";
+ exit 0;
+}
+
select(STDERR); $| = 1;
select(STDOUT); $| = 1;
LocalAddr => 'localhost');
$port = $server->sockport;
-if ($pid = fork()) {
- my $buf;
- $server->recv($buf, 100);
- print $buf;
-} elsif (defined($pid)) {
- #child
- $sock = IO::Socket::INET->new(Proto => 'udp',
- PeerAddr => "localhost:$port");
- $sock->send("ok 12\n");
- sleep(1);
- $sock->send("ok 12\n"); # send another one to be sure
- exit;
+if ($^O eq 'mpeix') {
+ print("ok 12 # skipped\n")
} else {
- die;
+ if ($pid = fork()) {
+ my $buf;
+ $server->recv($buf, 100);
+ print $buf;
+ } elsif (defined($pid)) {
+ #child
+ $sock = IO::Socket::INET->new(Proto => 'udp',
+ PeerAddr => "localhost:$port");
+ $sock->send("ok 12\n");
+ sleep(1);
+ $sock->send("ok 12\n"); # send another one to be sure
+ exit;
+ } else {
+ die;
+ }
}
print "not " unless $server->blocking;
chdir 't' if -d 't';
unshift @INC, '../lib' if -e '../lib';
}
+
+if ($^O eq 'mpeix') {
+ print "1..0 # Skip: broken on MPE/iX\n";
+ exit 0;
+}
+
my $perl = -e '../perl' ? '../perl' : -e './perl' ? './perl' : 'perl';
use strict;
# these should probably be rewritten to match the examples in perlfunc.pod
if (system "true") {print "not ok 4\n";} else {print "ok 4\n";}
-if ((system "/bin/sh -c 'exit 1'") != 256) { print "not "; }
-print "ok 5\n";
+if ($^O eq 'mpeix') {
+ print "ok 5 # skipped: status broken on MPE/iX\n";
+} else {
+ if ((system "/bin/sh -c 'exit 1'") != 256) { print "not "; }
+ print "ok 5\n";
+}
$rc = system "lskdfj";
if ($rc == 255 << 8 or $rc == -1 and
$ENV{PERL5LIB} = "../lib";
}
+if ($^O eq 'mpeix') {
+ print "1..0 # Skip: fork/status problems on MPE/iX\n";
+ exit 0;
+}
+
$|=1;
undef $/;
{print "not ok 33\n";}
if (! -b '.') {print "ok 34\n";} else {print "not ok 34\n";}
-if ($^O eq 'amigaos' or $Is_Dosish or $Is_Cygwin) {
+if ($^O eq 'mpeix' or $^O eq 'amigaos' or $Is_Dosish or $Is_Cygwin) {
print "ok 35 # skipped: no -u\n"; goto tty_test;
}