Enclosed is a way to get the lib/User/pwent.t test working
on VMS. But I note that the getpwuid(0) call seems to return
data relevant to [$gid,0] where $gid is my UIC group (but my
member number is not 0). Typically SYSTEM is [1,4]
and the [1,*] group is small - in particular it does not contain
a [1,0] entry. Could someone who logs in to a UIC group that
does not have a 0] member defined try running this test?
I note further that hard coding i_pwd to 'undef' seems incorrect:
$ sea configure.com i_pwd
$ WC "i_pwd='undef'"
But I have not yet attempted to rebuild perl with that set to 'define'.
That is currently a work in progress.
Here is the BEGIN block work around specific to VMS that works
with DEC C 6.5, I'd appreciate hearing if folks can get this to
pass all 9 sub tests, particularly those for whom
MCR AUTHORIZE
UAF> sho [*,0]/brief
returns a list that does not include your UIC group. Thanks.
--- lib/user/pwent.t;1 Thu Apr 25 16:56:11 2002
+++ lib/user/pwent.t Tue Apr 30 11:25:40 2002
@@ -12,7 +12,7 @@
unless ($haspw) { print "1..0 # Skip: no getpwuid\n"; exit 0 }
use Config;
$haspw = 0 unless $Config{'i_pwd'} eq 'define';
- unless ($haspw) { print "1..0 # Skip: no pwd.h\n"; exit 0 }
+ unless ($haspw || $^O eq 'VMS') { print "1..0 # Skip: no pwd.h\n"; exit 0 }
}
BEGIN {
@@ -28,8 +28,15 @@
my $pwent = getpwuid 0; # This is the OO getpwuid.
-print "not " unless $pwent->uid == 0 ||
- ($^O eq 'cygwin' && $pwent->uid == 500); # go figure
+my $UIC = 0;
+# On VMS getpwuid(0) returns values for [$gid,0] of UIC group $gid.
+if ($^O eq 'VMS') {
+ $UIC = $pwent[3] * 0x10000;
+}
+if ($^O eq 'cygwin') {
+ $UIC = 500; # go figure
+}
+print "not " unless $pwent->uid == $UIC;
print "ok 2\n";
print "not " unless $pwent->name eq $pwent[0];
End of workaround patch.
Peter Prymmer