From: John E. Malmberg Date: Thu, 12 Jun 2008 19:50:01 +0000 (-0500) Subject: [patch@34044] Enable getgrgid on VMS X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=211b0ba37c80f1f135df33dc279414adc3af971d;p=p5sagit%2Fp5-mst-13.2.git [patch@34044] Enable getgrgid on VMS From: "John E. Malmberg" Message-id: <4851C439.8070007@qsl.net> With some revisions. p4raw-id: //depot/perl@34052 --- diff --git a/t/op/groups.t b/t/op/groups.t index 5121ff8..404b8cd 100755 --- a/t/op/groups.t +++ b/t/op/groups.t @@ -1,7 +1,7 @@ #!./perl $ENV{PATH} ="/bin:/usr/bin:/usr/xpg4/bin:/usr/ucb" . - exists $ENV{PATH} ? ":$ENV{PATH}" : ""; + exists $ENV{PATH} ? ":$ENV{PATH}" : "" unless $^O eq 'VMS'; $ENV{LC_ALL} = "C"; # so that external utilities speak English $ENV{LANGUAGE} = 'C'; # GNU locale extension @@ -27,7 +27,8 @@ unless (eval { getgrgid(0); 1 }) { exit 0; } -quit() if (($^O eq 'MSWin32' || $^O eq 'NetWare') or $^O =~ /lynxos/i); +quit() if (($^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'VMS') + or $^O =~ /lynxos/i); # We have to find a command that prints all (effective # and real) group names (not ids). The known commands are: diff --git a/vms/vmsish.h b/vms/vmsish.h index 281d503..2e887e4 100644 --- a/vms/vmsish.h +++ b/vms/vmsish.h @@ -449,7 +449,11 @@ struct interp_intern { * getgrgid() routines are available to get group entries. * The getgrent() has a separate definition, HAS_GETGRENT. */ +#if __CRTL_VER >= 70302000 +#define HAS_GROUP /**/ +#else #undef HAS_GROUP /**/ +#endif /* HAS_PASSWD * This symbol, if defined, indicates that the getpwnam() and