From: "Jan Dubois" <jand@activestate.com>
Message-ID: <
007901c7bcee$e7b5d400$b7217c00$@com>
p4raw-id: //depot/perl@31529
# Everything loaded fine
ok 1;
-if (($> and $^O ne 'VMS' and $^O ne 'cygwin')
- or ($^O eq 'MSWin32'
+if (($> and $^O ne 'VMS')
+ or (($^O eq 'MSWin32' or $^O eq 'cygwin')
and !IsAdminUser())
or ($^O eq 'VMS'
and (`write sys\$output f\$privilege("SYSPRV")` =~ m/FALSE/))) {
}
sub IsAdminUser {
- return unless $^O eq 'MSWin32';
+ return unless $^O eq 'MSWin32' or $^O eq "cygwin";
return unless eval { require Win32 };
return unless defined &Win32::IsAdminUser;
return Win32::IsAdminUser();