summaryrefslogtreecommitdiff
path: root/vms/vms.c
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2013-02-16 15:25:55 -0600
committerCraig A. Berry <craigberry@mac.com>2013-02-16 15:34:35 -0600
commit25d1c58b20ae91c5d903d37fa8d68b83e2992a05 (patch)
treecae199560762d5376d808dde21b527b1f4d5c5be /vms/vms.c
parentb9214e6514bc71aaa2561a86cfca14d272f97815 (diff)
downloadperl-25d1c58b20ae91c5d903d37fa8d68b83e2992a05.tar.gz
Allow VMS features to differ from Perl's defaults.
Since we now enable some features that are not the CRTL's defaults, we should allow them to be explicitly disabled in the environment if someone wants the old behavior.
Diffstat (limited to 'vms/vms.c')
-rw-r--r--vms/vms.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/vms/vms.c b/vms/vms.c
index 44d72ff193..95c63095bf 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -13898,6 +13898,19 @@ set_feature_default(const char *name, int value)
{
int status;
int index;
+ char val_str[10];
+
+ /* If the feature has been explicitly disabled in the environment,
+ * then don't enable it here.
+ */
+ if (value > 0) {
+ status = simple_trnlnm(name, val_str, sizeof(val_str));
+ if ($VMS_STATUS_SUCCESS(status)) {
+ val_str[0] = _toupper(val_str[0]);
+ if (val_str[0] == 'D' || val_str[0] == '0' || val_str[0] == 'F')
+ return 0;
+ }
+ }
index = decc$feature_get_index(name);