integrate cfgperl and vmsperl contents into mainline
Gurusamy Sarathy [Fri, 3 Mar 2000 15:42:28 +0000 (15:42 +0000)]
p4raw-id: //depot/perl@5486

24 files changed:
configure.com
lib/File/Spec/Mac.pm
lib/File/Spec/Unix.pm
lib/File/Spec/VMS.pm
lib/File/Spec/Win32.pm
perlapi.c [changed mode: 0755->0644]
perlapi.h [changed mode: 0755->0644]
pod/perl.pod
pod/perldelta.pod
pod/pod2usage.PL
pod/podselect.PL
regcomp.c
t/lib/anydbm.t
t/op/filetest.t [changed mode: 0644->0755]
t/op/subst_amp.t [changed mode: 0644->0755]
toke.c
utils/dprofpp.PL
vms/descrip_mms.template
vms/ext/filespec.t
vms/gen_shrfls.pl
vms/perlvms.pod
vms/subconfigure.com
vms/vms.c
vms/vmsish.h

index 5c970e2..a1e87d5 100644 (file)
@@ -999,6 +999,39 @@ $   ENDIF
 $!
 $ ENDIF !%Config-I-VMS, skip remaining "where install" questions
 $!
+$ perl_symbol = "true"
+$ perl_verb = ""
+$ dflt = "y"
+$ IF .NOT.silent 
+$ THEN 
+$   echo ""
+$   echo "%Config-I-VMS, You may choose to write ''packageup'_SETUP.COM to assign a foreign"
+$   echo "-Config-I-VMS, symbol to invoke ''package', which is the usual method."
+$   echO "-Config-I-VMS, If you do not do so then you would need a DCL command verb at the"
+$   echo "-Config-I-VMS, process or the system wide level."
+$ ENDIF
+$ rp = "Invoke perl as a global symbol foreign command [''dflt'] "
+$ GOSUB myread
+$ IF (.NOT.ans).AND.(ans.NES."") THEN perl_symbol = "false"
+$!
+$ IF (.NOT.perl_symbol)
+$ THEN
+$   dflt = "y"
+$   IF .NOT.silent 
+$   THEN 
+$     echo ""
+$     echo "%Config-I-VMS, Since you won't be using a symbol you must choose to put the ''packageup'"
+$     echo "-Config-I-VMS, verb in a per-process table or in the system wide DCLTABLES (which"
+$     echo "-Config-I-VMS, would require write privilege)."
+$   ENDIF
+$   rp = "Invoke perl as a per process command verb [ ''dflt' ] "
+$   GOSUB myread
+$   IF (.NOT.ans).AND.(ans.NES."")
+$   THEN perl_verb = "DCLTABLES"
+$   ELSE perl_verb = "PROCESS"
+$   ENDIF
+$ ENDIF ! (.NOT.perl_symbol)
+$!
 $!: set the base revision
 $ baserev="5"
 $!: get the patchlevel
@@ -2145,6 +2178,28 @@ $ IF f$search("config.msg") .eqs. "" THEN echo "OK."
 $!
 $! %Config-I-VMS, write perl_setup.com here
 $!
+$ IF (.NOT.perl_symbol)
+$ THEN
+$   file_2_find = "[-]''packageup'.cld"
+$   echo ""
+$   echo4 "%Config-I-VMS, The perl.cld file is now being written..."
+$   OPEN/WRITE CONFIG 'file_2_find'
+$   IF (use_vmsdebug_perl)
+$   THEN
+$     WRITE CONFIG "define verb dbgperl"
+$     WRITE CONFIG F$FAO("!_!AS","image ''packageup'_root:[000000]dbgperl''ext'")
+$     WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
+$     WRITE CONFIG ""
+$     WRITE CONFIG "define verb perl"
+$     WRITE CONFIG F$FAO("!_!AS","image ''packageup'_root:[000000]ndbgPerl''ext'")
+$     WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
+$   ELSE
+$     WRITE CONFIG "define verb perl"
+$     WRITE CONFIG F$FAO("!_!AS","image ''packageup'_root:[000000]perl''ext'")
+$     WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
+$   ENDIF
+$   CLOSE CONFIG
+$ ENDIF ! (.NOT.perl_symbol)
 $ echo ""
 $ echo4 "%Config-I-VMS, The perl_setup.com file is now being written..."
 $ file_2_find = "[-]perl_setup.com"
@@ -2162,20 +2217,34 @@ $ prefix = prefix - "000000."
 $ IF F$LOCATE(".]",prefix) .EQ. F$LENGTH(prefix) THEN -
     prefix = prefix - "]" + ".]" 
 $ WRITE CONFIG "$ define/translation=concealed Perl_Root ''prefix'"
-$ write config "$ ext = "".exe"""
-$ if sharedperl .eqs. "Y"
-$ then
+$ WRITE CONFIG "$ ext = "".exe"""
+$ IF sharedperl .EQS. "Y"
+$ THEN
 $   write config "$ if f$getsyi(""ARCH_NAME"") .nes. ""VAX"" then ext = "".AXE"""
-$ endif
-$ IF use_vmsdebug_perl .eqs. "Y"
-$ then
-$   WRITE CONFIG "$ dbgperl :== $Perl_Root:[000000]dbgPerl'ext'"
-$   WRITE CONFIG "$ perl    :== $Perl_Root:[000000]ndbgPerl'ext'"
-$   WRITE CONFIG "$ define dbgPerlShr Perl_Root:[000000]dbgPerlShr'ext'"
-$ else
-$   WRITE CONFIG "$ perl :== $Perl_Root:[000000]Perl'ext'"
-$   WRITE CONFIG "$ define PerlShr Perl_Root:[000000]PerlShr'ext'"
-$ endif
+$ ENDIF
+$ IF (perl_symbol)
+$ THEN
+$   IF (use_vmsdebug_perl)
+$   THEN
+$     WRITE CONFIG "$ dbgperl :== $Perl_Root:[000000]dbgPerl'ext'"
+$     WRITE CONFIG "$ perl    :== $Perl_Root:[000000]ndbgPerl'ext'"
+$     WRITE CONFIG "$ define dbgPerlShr Perl_Root:[000000]dbgPerlShr'ext'"
+$   ELSE
+$     WRITE CONFIG "$ perl :== $Perl_Root:[000000]Perl'ext'"
+$     WRITE CONFIG "$ define PerlShr Perl_Root:[000000]PerlShr'ext'"
+$   ENDIF
+$ ELSE ! .NOT.perl_symbol
+$   IF (use_vmsdebug_perl)
+$   THEN
+$     WRITE CONFIG "$ define dbgPerlShr Perl_Root:[000000]dbgPerlShr'ext'"
+$   ELSE
+$     WRITE CONFIG "$ define PerlShr Perl_Root:[000000]PerlShr'ext'"
+$   ENDIF
+$   IF perl_verb .EQS. "PROCESS"
+$   THEN
+$     WRITE CONFIG "$ set command ''packagup'_ROOT:[000000]''packageup'.CLD"
+$   ENDIF
+$ ENDIF !  perl_symbol
 $ WRITE CONFIG "$ define/nolog pod2text Perl_Root:[lib.pod]pod2text.com"
 $ WRITE CONFIG "$ define/nolog pod2html Perl_Root:[lib.pod]pod2html.com"
 $ WRITE CONFIG "$ define/nolog pod2man  Perl_Root:[lib.pod]pod2man.com"
@@ -2189,14 +2258,40 @@ $ ENDIF
 $ WRITE CONFIG "$!"
 $ WRITE CONFIG "$! Symbols for commonly used scripts:"
 $ WRITE CONFIG "$!"
-$ WRITE CONFIG "$ Perldoc  == ""'"+"'Perl' Perl_Root:[lib.pod]Perldoc.com -t"""
-$ WRITE CONFIG "$ pod2text == ""'"+"'Perl' pod2text"""
-$ WRITE CONFIG "$ pod2html == ""'"+"'Perl' pod2html"""
-$ WRITE CONFIG "$!pod2man  == ""'"+"'Perl' pod2man"""
-$ WRITE CONFIG "$!Perlbug  == ""'"+"'Perl' Perl_Root:[lib]Perlbug.com"""
-$ WRITE CONFIG "$!c2ph == ""'"+"'Perl' c2ph"""
-$ WRITE CONFIG "$!h2ph == ""'"+"'Perl' h2ph"""
-$ WRITE CONFIG "$!h2xs == ""'"+"'Perl' h2xs"""
+$ IF (perl_symbol)
+$ THEN
+$   WRITE CONFIG "$ Perldoc  == ""'"+"'Perl' Perl_Root:[lib.pod]Perldoc.com -t"""
+$   WRITE CONFIG "$ pod2text == ""'"+"'Perl' pod2text"""
+$   WRITE CONFIG "$ pod2html == ""'"+"'Perl' pod2html"""
+$   WRITE CONFIG "$ pod2latex == ""'"+"'Perl' Perl_Root:[lib.pod]pod2latex.com"""
+$   WRITE CONFIG "$!pod2man  == ""'"+"'Perl' pod2man"""
+$   WRITE CONFIG "$!Perlbug  == ""'"+"'Perl' Perl_Root:[lib]Perlbug.com"""
+$   WRITE CONFIG "$ c2ph     == ""'"+"'Perl' Perl_Root:[utils]c2ph.com"""
+$   IF F$LOCATE("Devel::DProf",extensions) .LT. F$LENGTH(extensions)
+$   THEN
+$     WRITE CONFIG "$ dprofpp     == ""'"+"'Perl' Perl_Root:[utils]dprofpp.com"""
+$   ENDIF 
+$   WRITE CONFIG "$ h2ph     == ""'"+"'Perl' Perl_Root:[utils]h2ph.com"""
+$   WRITE CONFIG "$ h2xs     == ""'"+"'Perl' Perl_Root:[utils]h2xs.com"""
+$   WRITE CONFIG "$!perlcc   == ""'"+"'Perl' Perl_Root:[utils]perlcc.com"""
+$   WRITE CONFIG "$ splain   == ""'"+"'Perl' Perl_Root:[utils]splain.com"""
+$ ELSE
+$   WRITE CONFIG "$ Perldoc  == ""Perl Perl_Root:[lib.pod]Perldoc.com -t"""
+$   WRITE CONFIG "$ pod2text == ""Perl pod2text"""
+$   WRITE CONFIG "$ pod2html == ""Perl pod2html"""
+$   WRITE CONFIG "$ pod2latex == ""Perl Perl_Root:[lib.pod]pod2latex.com"""
+$   WRITE CONFIG "$!pod2man  == ""Perl pod2man"""
+$   WRITE CONFIG "$!Perlbug  == ""Perl Perl_Root:[lib]Perlbug.com"""
+$   WRITE CONFIG "$ c2ph     == ""Perl Perl_Root:[utils]c2ph.com"""
+$   IF F$LOCATE("Devel::DProf",extensions) .LT. F$LENGTH(extensions)
+$   THEN
+$     WRITE CONFIG "$ dprofpp     == ""Perl Perl_Root:[utils]dprofpp.com"""
+$   ENDIF 
+$   WRITE CONFIG "$ h2ph     == ""Perl Perl_Root:[utils]h2ph.com"""
+$   WRITE CONFIG "$ h2xs     == ""Perl Perl_Root:[utils]h2xs.com"""
+$   WRITE CONFIG "$!perlcc   == ""Perl Perl_Root:[utils]perlcc.com"""
+$   WRITE CONFIG "$ splain   == ""Perl Perl_Root:[utils]splain.com"""
+$ ENDIF
 $ CLOSE CONFIG
 $!
 $ echo  ""
@@ -2206,6 +2301,20 @@ $ echo  "-Config-I-VMS, Add that file (or an @ call to it) to your [SY]LOGIN.COM
 $ echo  "-Config-I-VMS, when you are satisfied with a successful compilation,"
 $ echo  "-Config-I-VMS, testing, and installation of your perl."
 $ echo  ""
+$ IF ((.NOT.perl_symbol) .AND. (perl_verb .EQS. "DCLTABLES"))
+$ THEN
+$   file_2_find = "[-]''packageup'_install.com"
+$   OPEN/WRITE CONFIG 'file_2_find
+$   WRITE CONFIG "$ set command perl /table=sys$common:[syslib]dcltables.exe -"
+$   WRITE CONFIG "    /output=sys$common:[syslib]dcltables.exe"
+$   WRITE CONFIG "$ install replace sys$common:[syslib]dcltables.exe"
+$   CLOSE CONFIG
+$   echo4 ""
+$   echo4 "%Config-I-VMS, In order to install the ''packageup' verb into DCLTABLES run:"
+$   echo4 "-Config-I-VMS, @ ''F$SEARCH(file_2_find)'"
+$   echo4 "-Config-I-VMS, after a successful build, test, and install.  Do so with CMKRNL privilege."
+$   echo4 ""
+$ ENDIF
 $!
 $!figure out where we "are" by parsing 'vms_default_directory_name' 
 $!
index be9a43c..959e33d 100644 (file)
@@ -343,8 +343,8 @@ sub abs2rel {
 
 Converts a relative path to an absolute path. 
 
-    $abs_path = $File::Spec->rel2abs( $destination ) ;
-    $abs_path = $File::Spec->rel2abs( $destination, $base ) ;
+    $abs_path = File::Spec->rel2abs( $destination ) ;
+    $abs_path = File::Spec->rel2abs( $destination, $base ) ;
 
 If $base is not present or '', then L<cwd()> is used. If $base is relative, 
 then it is converted to absolute form using L</rel2abs()>. This means that it
index f4e9f27..0cbc8c7 100644 (file)
@@ -383,8 +383,8 @@ sub abs2rel {
 
 Converts a relative path to an absolute path. 
 
-    $abs_path = $File::Spec->rel2abs( $destination ) ;
-    $abs_path = $File::Spec->rel2abs( $destination, $base ) ;
+    $abs_path = File::Spec->rel2abs( $destination ) ;
+    $abs_path = File::Spec->rel2abs( $destination, $base ) ;
 
 If $base is not present or '', then L<cwd()> is used. If $base is relative, 
 then it is converted to absolute form using L</rel2abs()>. This means that it
index 52519b9..9514dd7 100644 (file)
@@ -485,12 +485,12 @@ sub abs2rel {
     }
 
     # Figure out the effective $base and clean it up.
-    if ( ! $self->file_name_is_absolute( $base ) ) {
-        $base = $self->rel2abs( $base ) ;
-    }
-    elsif ( !defined( $base ) || $base eq '' ) {
+    if ( !defined( $base ) || $base eq '' ) {
         $base = cwd() ;
     }
+    elsif ( ! $self->file_name_is_absolute( $base ) ) {
+        $base = $self->rel2abs( $base ) ;
+    }
     else {
         $base = $self->canonpath( $base ) ;
     }
index 85a71a2..aa95fbd 100644 (file)
@@ -341,8 +341,8 @@ sub abs2rel {
 
 Converts a relative path to an absolute path. 
 
-    $abs_path = $File::Spec->rel2abs( $destination ) ;
-    $abs_path = $File::Spec->rel2abs( $destination, $base ) ;
+    $abs_path = File::Spec->rel2abs( $destination ) ;
+    $abs_path = File::Spec->rel2abs( $destination, $base ) ;
 
 If $base is not present or '', then L<cwd()> is used. If $base is relative, 
 then it is converted to absolute form using L</rel2abs()>. This means that it
@@ -368,12 +368,12 @@ sub rel2abs($;$;) {
 
     if ( ! $self->file_name_is_absolute( $path ) ) {
 
-        if ( ! $self->file_name_is_absolute( $base ) ) {
-            $base = $self->rel2abs( $base ) ;
-        }
-        elsif ( !defined( $base ) || $base eq '' ) {
+        if ( !defined( $base ) || $base eq '' ) {
             $base = cwd() ;
         }
+        elsif ( ! $self->file_name_is_absolute( $base ) ) {
+            $base = $self->rel2abs( $base ) ;
+        }
         else {
             $base = $self->canonpath( $base ) ;
         }
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index cb627cd..a66e2c8 100644 (file)
@@ -52,6 +52,7 @@ sections:
     perlfork           Perl fork() information
     perlthrtut         Perl threads tutorial
     perllexwarn                Perl warnings and their control
+    perlfilter         Perl source filters
     perldbmfilter      Perl DBM filters
 
     perlcompile                Perl compiler suite intro
index a443ff4..964233c 100644 (file)
@@ -1262,7 +1262,30 @@ This port is still using its own builtin globbing.
 
 =head2 VMS
 
-[TODO - Charles Bailey <bailey@newman.upenn.edu>]
+Numerous revisions and extensions to configuration, build, testing, and
+installation process to accomodate core changes and VMS-specific options
+
+Expand %ENV-handling code to allow runtime mapping to logical names,
+CLI symbols, and CRTL environ array
+
+Extension of subprocess invocation code to accept filespecs as command "verbs"
+
+Add to Perl command line processing the ability to use default file types and
+to recognize Unix-style C<2E<gt>&1>. 
+
+Expansion of File::Spec::VMS routines, and integration into ExtUtils::MM_VMS
+
+Extension of ExtUtils::MM_VMS to handle complex extensions more flexibly
+
+Barewords at start of Unix-syntax paths may be treated as text rather than
+only as logical names
+
+Optional secure translation of several logical names used internally by Perl
+
+Miscellaneous bugfixing and porting of new core code to VMS
+
+Thanks are gladly extended to the many people who have contributed VMS
+patches, testing, and ideas.
 
 =head2 Win32
 
index 24e93fa..e0f70b2 100644 (file)
@@ -16,8 +16,8 @@ use Cwd;
 $origdir = cwd;
 chdir(dirname($0));
 ($file = basename($0)) =~ s/\.PL$//;
-$file =~ s/\.pl$//
-        if ($^O eq 'VMS' or $^O eq 'os2' or $^O eq 'dos');  # "case-forgiving"
+$file =~ s/\.pl$// if ($^O eq 'os2' or $^O eq 'dos');  # "case-forgiving"
+$file =~ s/\.pl$/.com/ if ($^O eq 'VMS');              # "case-forgiving"
 
 open OUT,">$file" or die "Can't create $file: $!";
 
index 3fa4118..f2ba80a 100644 (file)
@@ -16,8 +16,8 @@ use Cwd;
 $origdir = cwd;
 chdir(dirname($0));
 ($file = basename($0)) =~ s/\.PL$//;
-$file =~ s/\.pl$//
-        if ($^O eq 'VMS' or $^O eq 'os2' or $^O eq 'dos');  # "case-forgiving"
+$file =~ s/\.pl$// if ($^O eq 'os2' or $^O eq 'dos');  # "case-forgiving"
+$file =~ s/\.pl$/.com/ if ($^O eq 'VMS');              # "case-forgiving"
 
 open OUT,">$file" or die "Can't create $file: $!";
 
index 6d5a33b..330dcbe 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -1734,6 +1734,9 @@ S_reg(pTHX_ I32 paren, I32 *flagp)
                nextchar();
                *flagp = TRYAGAIN;
                return NULL;
+           case 'p':
+               Perl_warner(aTHX_ WARN_REGEXP, "(?p{}) is deprecated - use (??{})");
+               /* FALL THROUGH*/
            case '?':
                logical = 1;
                paren = *PL_regcomp_parse++;
index 9efe5e9..e38c7e7 100755 (executable)
@@ -122,24 +122,24 @@ if ($h{''} eq 'bar') {
    print "ok 12\n" ;
 }
 else {
-   print "not ok 12\n" ;
    if ($AnyDBM_File::ISA[0] eq 'DB_File' && $DB_File::db_ver >= 2.004010) {
      ($major, $minor, $patch) = ($DB_File::db_ver =~ /^(\d+)\.(\d\d\d)(\d\d\d)/) ;
      $major =~ s/^0+// ;
      $minor =~ s/^0+// ;
      $patch =~ s/^0+// ;
      $compact = "$major.$minor.$patch" ;
-
-     print STDERR <<EOM ;
-#
-# anydbm.t test 12 will fail when AnyDBM_File uses the combination of
-# DB_File and Berkeley DB 2.4.10 (or greater). 
-# You are using DB_File $DB_File::VERSION and Berkeley DB $compact
-#
-# Berkeley DB 2 from version 2.4.10 onwards does not allow null keys.
-# This feature will be reenabled in a future version of Berkeley DB.
-#
-EOM
+     #
+     # anydbm.t test 12 will fail when AnyDBM_File uses the combination of
+     # DB_File and Berkeley DB 2.4.10 (or greater). 
+     # You are using DB_File $DB_File::VERSION and Berkeley DB $compact
+     #
+     # Berkeley DB 2 from version 2.4.10 onwards does not allow null keys.
+     # This feature will be reenabled in a future version of Berkeley DB.
+     #
+     print "ok 12 # skipped: db v$compact, no null key support\n" ;
+   }
+   else {
+     print "not ok 12\n" ;
    }
 }
 
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
diff --git a/toke.c b/toke.c
index 3af0896..79ee972 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -1269,8 +1269,8 @@ S_scan_const(pTHX_ char *start)
            if (s[2] == '#') {
                while (s < send && *s != ')')
                    *d++ = *s++;
-           } else if (s[2] == '{'
-                      || s[2] == '?' && s[3] == '{') { /* This should march regcomp.c */
+           } else if (s[2] == '{' /* This should match regcomp.c */
+                      || (s[2] == 'p' || s[2] == '?') && s[3] == '{') {        
                I32 count = 1;
                char *regparse = s + (s[2] == '{' ? 3 : 4);
                char c;
index a6a1d91..51e8d78 100644 (file)
@@ -14,9 +14,8 @@ use File::Basename qw(&basename &dirname);
 # This is so that make depend always knows where to find PL derivatives.
 chdir(dirname($0));
 ($file = basename($0)) =~ s/\.PL$//;
-$file =~ s/\.pl$//
-       if ($Config{'osname'} eq 'VMS' or
-           $Config{'osname'} eq 'OS2');  # "case-forgiving"
+$file =~ s/\.pl$// if ($Config{'osname'} eq 'OS2');      # "case-forgiving"
+$file =~ s/\.pl$/.com/ if ($Config{'osname'} eq 'VMS');  # "case-forgiving"
 
 my $dprof_pm = '../ext/Devel/DProf/DProf.pm';
 my $VERSION = 0;
index eb9d0bd..c96c145 100644 (file)
@@ -347,7 +347,7 @@ libmods : $(LIBPREREQ)
        @ $(NOOP)
 utils : $(utils1) $(utils2)
        @ $(NOOP)
-podxform : [.lib.pod]pod2text.com [.lib.pod]pod2html.com [.lib.pod]pod2latex.com [.lib.pod]pod2man.com [.lib.pod]podchecker.com
+podxform : [.lib.pod]pod2text.com [.lib.pod]pod2html.com [.lib.pod]pod2latex.com [.lib.pod]pod2man.com [.lib.pod]podchecker.com [.lib.pod]pod2usage.com [.lib.pod]podselect.com
        @ $(NOOP)
 x2p : [.x2p]a2p$(E) [.x2p]s2p.com [.x2p]find2perl.com 
        @ $(NOOP)
@@ -582,6 +582,16 @@ dynext : $(LIBPREREQ) $(DBG)perlshr$(E)
        $(MINIPERL) $(MMS$SOURCE)
        Copy/Log [.pod]podchecker.com $(MMS$TARGET)
 
+[.lib.pod]pod2usage.com : [.pod]pod2usage.PL $(ARCHDIR)Config.pm
+       @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+       $(MINIPERL) $(MMS$SOURCE)
+       Copy/Log [.pod]pod2usage.com $(MMS$TARGET)
+
+[.lib.pod]podselect.com : [.pod]podselect.PL $(ARCHDIR)Config.pm
+       @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+       $(MINIPERL) $(MMS$SOURCE)
+       Copy/Log [.pod]podselect.com $(MMS$TARGET)
+
 preplibrary : $(MINIPERL_EXE) $(LIBPREREQ) $(SOCKPM)
        @ Write Sys$Output "Autosplitting Perl library . . ."
        @ Create/Directory [.lib.auto]
index 779396b..bf0208d 100644 (file)
@@ -86,7 +86,7 @@ some:[where.over]the.rainbow  unixify /some/where/over/the.rainbow
 /some/where/over/the.rainbow   vmsify  some:[where.over]the.rainbow
 some/where/over/the.rainbow    vmsify  [.some.where.over]the.rainbow
 ../some/where/over/the.rainbow vmsify  [-.some.where.over]the.rainbow
-some/../../where/over/the.rainbow      vmsify  [-.where.over]the.rainbow
+some/../../where/over/the.rainbow      vmsify  [.some.--.where.over]the.rainbow
 .../some/where/over/the.rainbow        vmsify  [...some.where.over]the.rainbow
 some/.../where/over/the.rainbow        vmsify  [.some...where.over]the.rainbow
 /some/.../where/over/the.rainbow       vmsify  some:[...where.over]the.rainbow
index c668120..a109f7b 100644 (file)
@@ -186,12 +186,6 @@ LINE: while (<CPP>) {
     print "opcode.h>> $_" if $debug > 2;
     if (/^OP \*\s/) { &scan_func($_); }
     if (/^\s*EXT/) { &scan_var($_); }
-    if (/^\s+OP_/) { &scan_enum($_); }
-    last LINE unless defined($_ = <CPP>);
-  }
-  while (/^typedef enum/ .. /^\s*\}/) {
-    print "global enum>> $_" if $debug > 2;
-    &scan_enum($_);
     last LINE unless defined($_ = <CPP>);
   }
   # Check for transition to new header file
index 53925b2..3883233 100644 (file)
@@ -463,7 +463,11 @@ is executed as a DCL command.  Otherwise, the first token on
 the command line is treated as the filespec of an image to 
 run, and an attempt is made to invoke it (using F<.Exe> and 
 the process defaults to expand the filespec) and pass the 
-rest of C<exec>'s argument to it as parameters.
+rest of C<exec>'s argument to it as parameters.  If the token
+has no file type, and matches a file with null type, then an
+attempt is made to determine whether the file is an executable
+image which should be invoked using C<MCR> or a text file which
+should be passed to DCL as a command procedure.
 
 You can use C<exec> in both ways within the same script, as 
 long as you call C<fork> and C<exec> in pairs.  Perl
@@ -558,9 +562,16 @@ specification (e.g. C<:> or C<]>), an attempt is made to expand it
 using  a default type of F<.Exe> and the process defaults, and if
 successful, the resulting file is invoked via C<MCR>. This allows you
 to invoke an image directly simply by passing the file specification
-to C<system>, a common Unixish idiom.  If LIST consists
-of the empty string, C<system> spawns an interactive DCL subprocess,
-in the same fashion as typiing B<SPAWN> at the DCL prompt.
+to C<system>, a common Unixish idiom.  If the token has no file type,
+and matches a file with null type, then an attempt is made to
+determine whether the file is an executable image which should be
+invoked using C<MCR> or a text file which should be passed to DCL
+as a command procedure.
+
+If LIST consists of the empty string, C<system> spawns an
+interactive DCL subprocess, in the same fashion as typiing
+B<SPAWN> at the DCL prompt.
+
 Perl waits for the subprocess to complete before continuing
 execution in the current process.  As described in L<perlfunc>,
 the return value of C<system> is a fake "status" which follows
index a9c3e66..1686c66 100644 (file)
@@ -4103,7 +4103,7 @@ $ WC "sPRIx64='" + perl_sPRIx64 + "'"
 $ WC "d_llseek='" + perl_d_llseek + "'"
 $ WC "d_iconv='" + perl_d_iconv +"'"
 $ WC "i_iconv='" + perl_i_iconv +"'"
-$ WC "inc_version_list_init='""""'"
+$ WC "inc_version_list_init='0'"
 $ WC "uselargefiles='" + perl_uselargefiles + "'"
 $ WC "uselongdouble='" + perl_uselongdouble + "'"
 $ WC "usemorebits='" + perl_usemorebits + "'"
index a498e16..f1f62bd 100644 (file)
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -987,6 +987,7 @@ pipe_exit_routine()
     info = open_pipes;
 
     while (info) {
+      int need_eof;
       _ckvmssts(SYS$SETAST(0));
       need_eof = info->mode != 'r' && !info->done;
       _ckvmssts(SYS$SETAST(1));
@@ -2518,6 +2519,9 @@ getredirection(int *ac, char ***av)
        exit(vaxc$errno);
        }
     if (err != NULL) {
+        if (strcmp(err,"&1") == 0) {
+            dup2(fileno(stdout), fileno(Perl_debug_log));
+        } else {
        FILE *tmperr;
        if (NULL == (tmperr = fopen(err, errmode, "mbc=32", "mbf=2")))
            {
@@ -2530,6 +2534,7 @@ getredirection(int *ac, char ***av)
                exit(vaxc$errno);
                }
        }
+        }
 #ifdef ARGPROC_DEBUG
     PerlIO_printf(Perl_debug_log, "Arglist:\n");
     for (j = 0; j < *ac;  ++j)
@@ -3388,6 +3393,7 @@ setup_cmddsc(char *cmd, int check_img)
 {
   char vmsspec[NAM$C_MAXRSS+1], resspec[NAM$C_MAXRSS+1];
   $DESCRIPTOR(defdsc,".EXE");
+  $DESCRIPTOR(defdsc2,".");
   $DESCRIPTOR(resdsc,resspec);
   struct dsc$descriptor_s imgdsc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};
   unsigned long int cxt = 0, flags = 1, retsts = SS$_NORMAL;
@@ -3443,18 +3449,44 @@ setup_cmddsc(char *cmd, int check_img)
     imgdsc.dsc$a_pointer = s;
     imgdsc.dsc$w_length = wordbreak - s;
     retsts = lib$find_file(&imgdsc,&resdsc,&cxt,&defdsc,0,0,&flags);
+    if (!(retsts&1)) {
+        _ckvmssts(lib$find_file_end(&cxt));
+        retsts = lib$find_file(&imgdsc,&resdsc,&cxt,&defdsc2,0,0,&flags);
     if (!(retsts & 1) && *s == '$') {
+          _ckvmssts(lib$find_file_end(&cxt));
       imgdsc.dsc$a_pointer++; imgdsc.dsc$w_length--;
       retsts = lib$find_file(&imgdsc,&resdsc,&cxt,&defdsc,0,0,&flags);
+          if (!(retsts&1)) {
       _ckvmssts(lib$find_file_end(&cxt));
+            retsts = lib$find_file(&imgdsc,&resdsc,&cxt,&defdsc2,0,0,&flags);
+          }
     }
+    }
+    _ckvmssts(lib$find_file_end(&cxt));
+
     if (retsts & 1) {
+      FILE *fp;
       s = resspec;
       while (*s && !isspace(*s)) s++;
       *s = '\0';
+
+      /* check that it's really not DCL with no file extension */
+      fp = fopen(resspec,"r","ctx=bin,shr=get");
+      if (fp) {
+        char b[4] = {0,0,0,0};
+        read(fileno(fp),b,4);
+        isdcl = isprint(b[0]) && isprint(b[1]) && isprint(b[2]) && isprint(b[3]);
+        fclose(fp);
+      }
+      if (check_img && isdcl) return RMS$_FNF;
+
       if (cando_by_name(S_IXUSR,0,resspec)) {
         New(402,VMScmd.dsc$a_pointer,7 + s - resspec + (rest ? strlen(rest) : 0),char);
+        if (!isdcl) {
         strcpy(VMScmd.dsc$a_pointer,"$ MCR ");
+        } else {
+            strcpy(VMScmd.dsc$a_pointer,"@");
+        }
         strcat(VMScmd.dsc$a_pointer,resspec);
         if (rest) strcat(VMScmd.dsc$a_pointer,rest);
         VMScmd.dsc$w_length = strlen(VMScmd.dsc$a_pointer);
index 8d4a8ca..a09d2be 100644 (file)
 #define HAS_WAIT
 
 #define PERL_FS_VER_FMT                "%d_%d_%d"
+/* Temporary; we need to add support for this to Configure.Com */
+#ifdef PERL_INC_VERSION_LIST
+#  undef PERL_INC_VERSION_LIST
+#endif
 
 /* VMS:
  *     This symbol, if defined, indicates that the program is running under