From: Reini Urban (via RT) <perlbug-followup@perl.org>
Message-ID: <rt-3.6.HEAD-1276-
1182381767-470.43273-75-0@perl.org>
p4raw-id: //depot/perl@31435
}
BEGIN {
- our @grent = getgrgid 0; # This is the function getgrgid.
+ our $gid = $^O ne 'cygwin' ? 0 : 18;
+ our @grent = getgrgid $gid; # This is the function getgrgid.
unless (@grent) { plan skip_all => "no gid 0"; }
}
can_ok(__PACKAGE__, 'getgrgid');
-my $grent = getgrgid 0;
+my $grent = getgrgid $gid;
is( $grent->name, $grent[0], 'name matches core getgrgid' );
# 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 }
}