# On VMS getpwuid(0) may return [$gid,0] UIC info (which may not exist).
# It is better to use the $< uid for testing on VMS instead.
if ( $^O eq 'VMS' ) { $uid = $< ; }
+ if ( $^O eq 'cygwin' ) { $uid = 500 ; }
our @pwent = getpwuid $uid; # This is the function getpwuid.
unless (@pwent) { print "1..0 # Skip: no uid $uid\n"; exit 0 }
}
my $pwent = getpwuid $uid; # This is the OO getpwuid.
my $uid_expect = $uid;
-if ( $^O eq 'cygwin' ) { $uid_expect = 500; } # go figure
-
-print "not " unless $pwent->uid == $uid_expect ;
+if ( $^O eq 'cygwin' ) {
+ print "not " unless ( $pwent->uid == $uid_expect
+ || $pwent->uid == 500 ); # go figure
+}
+else {
+ print "not " unless $pwent->uid == $uid_expect ;
+}
print "ok 2\n";
print "not " unless $pwent->name eq $pwent[0];