This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Preserve filename case on VMS.
authorCraig A. Berry <craigberry@mac.com>
Sun, 11 Nov 2012 14:55:41 +0000 (08:55 -0600)
committerCraig A. Berry <craigberry@mac.com>
Sun, 11 Nov 2012 14:55:41 +0000 (08:55 -0600)
VMS systems of the last decade or so have the ability, when
operating on an ODS-5 volume, to preserve filename case.  In order
for CRTL calls to make use of this capability, the feature setting
DECC$EFS_CASE_PRESERVE must be explicitly enabled.  We now do that
for Perl at start-up time, which depends on latent support that
has been in the core since 5.10 but not quite working until
recently.

Note that case preservation of command-line arguments is not
included in this feature.  That's a different setting and is not
entirely under Perl's control as the command line is parsed by
DCL before the CRTL sees it.

vms/vms.c

index 10e3f79..d88f167 100644 (file)
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -13984,13 +13984,12 @@ vmsperl_set_features(void)
         vms_unlink_all_versions = 0;
     }
 
-    /* Dectect running under GNV Bash or other UNIX like shell */
 #if __CRTL_VER >= 70300000 && !defined(__VAX)
+    /* Detect running under GNV Bash or other UNIX like shell */
     gnv_unix_shell = 0;
     status = simple_trnlnm("GNV$UNIX_SHELL", val_str, sizeof(val_str));
     if ($VMS_STATUS_SUCCESS(status)) {
         gnv_unix_shell = 1;
-        set_feature_default("DECC$EFS_CASE_PRESERVE", 1);
         set_feature_default("DECC$EFS_CHARSET", 1);
         set_feature_default("DECC$FILENAME_UNIX_NO_VERSION", 1);
         set_feature_default("DECC$FILENAME_UNIX_REPORT", 1);
@@ -13999,6 +13998,8 @@ vmsperl_set_features(void)
         vms_unlink_all_versions = 1;
         vms_posix_exit = 1;
     }
+    /* Some reasonable defaults that are not CRTL defaults */
+    set_feature_default("DECC$EFS_CASE_PRESERVE", 1);
 #endif
 
     /* hacks to see if known bugs are still present for testing */