[patch@34600] vms.c setup_cmddsc

[email protected] ("John E. Malmberg")
Newsgroups perl.perl5.porters,perl.vmsperl
Message-ID <[email protected]>
This is part of the patch previously submitted as part of a multi-part 
patch.

This removes a trailing "." that results in ODS-5 mode when converting a 
Unix "foo/bar" specification to be "[.foo]bar.".

This is incompatible with having setup_cmddsc searching for the 
resulting binary by appending ".exe" or "." to the specification.

This allows the [.vms]test.com program to be run in the GNV/Unix 
compatible mode in order to start validating Perl for it.

-John
[email protected]
Personal Opinion Only
vms_c_setup_cmddsc.gdiff (text/plain, 762 B)
--- /rsync_root/perl/vms/vms.c	Wed Oct 22 19:26:20 2008
+++ vms/vms.c	Wed Oct 29 21:52:12 2008
@@ -9892,6 +9892,19 @@
     *cp2 = '\0';
     if (do_tovmsspec(resspec,cp,0,NULL)) { 
       s = vmsspec;
+
+      /* When a UNIX spec with no file type is translated to VMS, */
+      /* A trailing '.' is appended under ODS-5 rules.            */
+      /* Here we do not want that trailing "." as it prevents     */
+      /* Looking for a implied ".exe" type. */
+      if (decc_efs_charset) {
+          int i;
+          i = strlen(vmsspec);
+          if (vmsspec[i-1] == '.') {
+              vmsspec[i-1] = '\0';
+          }
+      }
+
       if (*rest) {
         for (cp2 = vmsspec + strlen(vmsspec);
              *rest && cp2 - vmsspec < sizeof vmsspec;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.