summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-02-24 17:46:45 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-02-24 17:46:45 +0000
commit0994c4d08152f97e3d70c5ce59ee93b0aa88684c (patch)
tree5fcc3ca38de1159018ec3f9ff41d5db1edce58d1
parentcb64dba4c7358c2e02c1ac7a571173423f71980f (diff)
downloadperl-0994c4d08152f97e3d70c5ce59ee93b0aa88684c.tar.gz
MPE/ix patches from Mark Bixby.
p4raw-id: //depot/cfgperl@5239
-rw-r--r--pp_sys.c12
-rwxr-xr-xt/io/pipe.t35
-rwxr-xr-xt/lib/glob-basic.t2
-rwxr-xr-xt/lib/io_poll.t5
-rwxr-xr-xt/lib/io_sock.t30
-rwxr-xr-xt/op/die_exit.t6
-rwxr-xr-xt/op/exec.t8
-rwxr-xr-xt/op/fork.t5
-rwxr-xr-xt/op/stat.t2
9 files changed, 71 insertions, 34 deletions
diff --git a/pp_sys.c b/pp_sys.c
index d5c5426945..572da79028 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -4728,7 +4728,7 @@ PP(pp_gpwuid)
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;
@@ -4742,7 +4742,11 @@ PP(pp_gpwent)
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) {
@@ -4894,7 +4898,7 @@ PP(pp_ggrgid)
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;
@@ -4906,7 +4910,11 @@ PP(pp_ggrent)
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) {
diff --git a/t/io/pipe.t b/t/io/pipe.t
index 826cf7434a..ae890c0402 100755
--- a/t/io/pipe.t
+++ b/t/io/pipe.t
@@ -132,22 +132,27 @@ else {
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
diff --git a/t/lib/glob-basic.t b/t/lib/glob-basic.t
index a2479ac8c1..ac3abf56e4 100755
--- a/t/lib/glob-basic.t
+++ b/t/lib/glob-basic.t
@@ -72,7 +72,7 @@ print "ok 5\n";
# 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 {
diff --git a/t/lib/io_poll.t b/t/lib/io_poll.t
index c179ce96fb..68ad7b74cb 100755
--- a/t/lib/io_poll.t
+++ b/t/lib/io_poll.t
@@ -7,6 +7,11 @@ BEGIN {
}
}
+if ($^O eq 'mpeix') {
+ print "1..0 # Skip: broken on MPE/iX\n";
+ exit 0;
+}
+
select(STDERR); $| = 1;
select(STDOUT); $| = 1;
diff --git a/t/lib/io_sock.t b/t/lib/io_sock.t
index 782f2554c8..e03e2235ba 100755
--- a/t/lib/io_sock.t
+++ b/t/lib/io_sock.t
@@ -169,20 +169,24 @@ $server = IO::Socket->new(Domain => AF_INET,
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;
diff --git a/t/op/die_exit.t b/t/op/die_exit.t
index 7808d9d7c5..cb0478b9b2 100755
--- a/t/op/die_exit.t
+++ b/t/op/die_exit.t
@@ -9,6 +9,12 @@ BEGIN {
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;
diff --git a/t/op/exec.t b/t/op/exec.t
index 5d014369ba..23e9ec1cec 100755
--- a/t/op/exec.t
+++ b/t/op/exec.t
@@ -25,8 +25,12 @@ print "not ok 3\n" if system "echo", "ok", "3"; # directly called
# 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
diff --git a/t/op/fork.t b/t/op/fork.t
index d82c04ff79..80c0b723b6 100755
--- a/t/op/fork.t
+++ b/t/op/fork.t
@@ -16,6 +16,11 @@ BEGIN {
$ENV{PERL5LIB} = "../lib";
}
+if ($^O eq 'mpeix') {
+ print "1..0 # Skip: fork/status problems on MPE/iX\n";
+ exit 0;
+}
+
$|=1;
undef $/;
diff --git a/t/op/stat.t b/t/op/stat.t
index 37237f0bdf..40f8f1f5d5 100755
--- a/t/op/stat.t
+++ b/t/op/stat.t
@@ -164,7 +164,7 @@ else
{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;
}