Craig A. Berry
2009-01-15 19:58:00 UTC
In perl.git, the branch blead has been updated
<http://perl5.git.perl.org/perl.git/commitdiff/98c7875d3485f5c773ff1976f4197e346535dabc?hp=6fb6c61459e9cc9e8f46103f192d73975cf22ea1>
- Log -----------------------------------------------------------------
commit 98c7875d3485f5c773ff1976f4197e346535dabc
Author: Craig A. Berry <***@mac.com>
Date: Thu Jan 15 13:46:02 2009 -0600
Fix handling of DECC$DISABLE_POSIX_ROOT feature on VMS.
The nomenclature is confusing and the CRTL docs even moreso, and
the CRTL implementation seems not to do what the docs say. The
documented default setting is on, which I take to mean that
processing of SYS$POSIX_ROOT is disabled unless you have asked
for it. I've followed this behavior even though the CRTL seems
to report the feature off by default.
Also corrected yet another length error in a related call to
simple_trnlnm.
-----------------------------------------------------------------------
Summary of changes:
vms/vms.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/vms/vms.c b/vms/vms.c
index b8ac795..ba47da4 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -9454,7 +9454,6 @@ void
vms_image_init(int *argcp, char ***argvp)
{
int status;
- char val_str[10];
char eqv[LNM$C_NAMLENGTH+1] = "";
unsigned int len, tabct = 8, tabidx = 0;
unsigned long int *mask, iosb[2], i, rlst[128], rsz;
@@ -9475,16 +9474,18 @@ vms_image_init(int *argcp, char ***argvp)
/* This was moved from the pre-image init handler because on threaded */
/* Perl it was always returning 0 for the default value. */
- status = simple_trnlnm("SYS$POSIX_ROOT", val_str, sizeof(val_str));
+ status = simple_trnlnm("SYS$POSIX_ROOT", eqv, LNM$C_NAMLENGTH);
if (status > 0) {
int s;
s = decc$feature_get_index("DECC$DISABLE_POSIX_ROOT");
if (s > 0) {
int initial;
initial = decc$feature_get_value(s, 4);
- if (initial >= 0) {
- /* initial is -1 if nothing has set the feature */
- /* initial is 1 if the logical name is present */
+ if (initial > 0) {
+ /* initial is: 0 if nothing has set the feature */
+ /* -1 if initialized to default */
+ /* 1 if set by logical name */
+ /* 2 if set by decc$feature_set_value */
decc_disable_posix_root = decc$feature_get_value(s, 1);
/* If the value is not valid, force the feature off */
@@ -9494,7 +9495,7 @@ vms_image_init(int *argcp, char ***argvp)
}
}
else {
- /* Traditionally Perl assumes this is off */
+ /* Nothing has asked for it explicitly, so use our own default. */
decc_disable_posix_root = 1;
decc$feature_set_value(s, 1, 1);
}
--
Perl5 Master Repository
<http://perl5.git.perl.org/perl.git/commitdiff/98c7875d3485f5c773ff1976f4197e346535dabc?hp=6fb6c61459e9cc9e8f46103f192d73975cf22ea1>
- Log -----------------------------------------------------------------
commit 98c7875d3485f5c773ff1976f4197e346535dabc
Author: Craig A. Berry <***@mac.com>
Date: Thu Jan 15 13:46:02 2009 -0600
Fix handling of DECC$DISABLE_POSIX_ROOT feature on VMS.
The nomenclature is confusing and the CRTL docs even moreso, and
the CRTL implementation seems not to do what the docs say. The
documented default setting is on, which I take to mean that
processing of SYS$POSIX_ROOT is disabled unless you have asked
for it. I've followed this behavior even though the CRTL seems
to report the feature off by default.
Also corrected yet another length error in a related call to
simple_trnlnm.
-----------------------------------------------------------------------
Summary of changes:
vms/vms.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/vms/vms.c b/vms/vms.c
index b8ac795..ba47da4 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -9454,7 +9454,6 @@ void
vms_image_init(int *argcp, char ***argvp)
{
int status;
- char val_str[10];
char eqv[LNM$C_NAMLENGTH+1] = "";
unsigned int len, tabct = 8, tabidx = 0;
unsigned long int *mask, iosb[2], i, rlst[128], rsz;
@@ -9475,16 +9474,18 @@ vms_image_init(int *argcp, char ***argvp)
/* This was moved from the pre-image init handler because on threaded */
/* Perl it was always returning 0 for the default value. */
- status = simple_trnlnm("SYS$POSIX_ROOT", val_str, sizeof(val_str));
+ status = simple_trnlnm("SYS$POSIX_ROOT", eqv, LNM$C_NAMLENGTH);
if (status > 0) {
int s;
s = decc$feature_get_index("DECC$DISABLE_POSIX_ROOT");
if (s > 0) {
int initial;
initial = decc$feature_get_value(s, 4);
- if (initial >= 0) {
- /* initial is -1 if nothing has set the feature */
- /* initial is 1 if the logical name is present */
+ if (initial > 0) {
+ /* initial is: 0 if nothing has set the feature */
+ /* -1 if initialized to default */
+ /* 1 if set by logical name */
+ /* 2 if set by decc$feature_set_value */
decc_disable_posix_root = decc$feature_get_value(s, 1);
/* If the value is not valid, force the feature off */
@@ -9494,7 +9495,7 @@ vms_image_init(int *argcp, char ***argvp)
}
}
else {
- /* Traditionally Perl assumes this is off */
+ /* Nothing has asked for it explicitly, so use our own default. */
decc_disable_posix_root = 1;
decc$feature_set_value(s, 1, 1);
}
--
Perl5 Master Repository