Change 30159 by [EMAIL PROTECTED] on 2007/02/07 16:57:11

        Integrate:
        [ 25284]
        Subject: [patch] [EMAIL PROTECTED] - VMS specific fixes. [2nd try]
        From: "John E. Malmberg" <[EMAIL PROTECTED]>
        Date: Wed, 10 Aug 2005 23:26:03 -0400
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

... //depot/maint-5.8/perl/lib/vmsish.t#5 integrate
... //depot/maint-5.8/perl/t/lib/warnings/doio#3 integrate
... //depot/maint-5.8/perl/t/op/anonsub.t#4 integrate
... //depot/maint-5.8/perl/t/op/chdir.t#4 integrate
... //depot/maint-5.8/perl/t/op/closure.t#16 integrate
... //depot/maint-5.8/perl/t/op/lex_assign.t#3 integrate
... //depot/maint-5.8/perl/t/op/runlevel.t#3 integrate
... //depot/maint-5.8/perl/t/op/stat.t#14 integrate
... //depot/maint-5.8/perl/t/x2p/s2p.t#3 integrate
... //depot/maint-5.8/perl/utils/c2ph.PL#6 integrate
... //depot/maint-5.8/perl/vms/ext/Stdio/test.pl#3 integrate

Differences ...

==== //depot/maint-5.8/perl/lib/vmsish.t#5 (text) ====
Index: perl/lib/vmsish.t
--- perl/lib/vmsish.t#4~22226~  2004-01-26 15:25:31.000000000 -0800
+++ perl/lib/vmsish.t   2007-02-07 08:57:11.000000000 -0800
@@ -5,7 +5,10 @@
     @INC = '../lib'; 
 }
 
-my $Invoke_Perl = qq(MCR $^X "-I[-.lib]");
+my $perl = $^X;
+$perl = VMS::Filespec::vmsify($perl) if $^O eq 'VMS';
+
+my $Invoke_Perl = qq(MCR $perl "-I[-.lib]");
 
 require "./test.pl";
 plan(tests => 25);

==== //depot/maint-5.8/perl/t/lib/warnings/doio#3 (text) ====
Index: perl/t/lib/warnings/doio
--- perl/t/lib/warnings/doio#2~18080~   2002-11-03 21:23:04.000000000 -0800
+++ perl/t/lib/warnings/doio    2007-02-07 08:57:11.000000000 -0800
@@ -60,10 +60,10 @@
 __END__
 # doio.c [Perl_do_open9]
 use warnings 'io' ;
-open(F, '|'.($^O eq 'VMS' ? 'mcr ':'')."$^X -e 1|");
+open(F, '|'."$^X -e 1|");
 close(F);
 no warnings 'io' ;
-open(G, '|'.($^O eq 'VMS' ? 'mcr ':'')."$^X -e 1|");
+open(G, '|'."$^X -e 1|");
 close(G);
 EXPECT
 Can't open bidirectional pipe at - line 3.

==== //depot/maint-5.8/perl/t/op/anonsub.t#4 (xtext) ====
Index: perl/t/op/anonsub.t
--- perl/t/op/anonsub.t#3~18089~        2002-11-04 07:44:28.000000000 -0800
+++ perl/t/op/anonsub.t 2007-02-07 08:57:11.000000000 -0800
@@ -32,7 +32,7 @@
     print TEST "$prog\n";
     close TEST or die "Could not close: $!";
     my $results = $Is_VMS ?
-               `MCR $^X "-I[-.lib]" $switch $tmpfile 2>&1` :
+               `$^X "-I[-.lib]" $switch $tmpfile 2>&1` :
                  $Is_MSWin32 ?
                    `.\\perl -I../lib $switch $tmpfile 2>&1` :
                      $Is_MacOS ?  

==== //depot/maint-5.8/perl/t/op/chdir.t#4 (text) ====
Index: perl/t/op/chdir.t
--- perl/t/op/chdir.t#3~26102~  2005-11-12 12:08:41.000000000 -0800
+++ perl/t/op/chdir.t   2007-02-07 08:57:11.000000000 -0800
@@ -138,6 +138,10 @@
 
     # Restore the environment for VMS (and doesn't hurt for anyone else)
     @[EMAIL PROTECTED] = @[EMAIL PROTECTED];
+
+    # On VMS this must be deleted or process table is wrong on exit
+    # when this script is run interactively.
+    delete $ENV{'SYS$LOGIN'} if $IsVMS;
 }
 
 

==== //depot/maint-5.8/perl/t/op/lex_assign.t#3 (xtext) ====
Index: perl/t/op/lex_assign.t
--- perl/t/op/lex_assign.t#2~25498~     2005-09-19 12:14:14.000000000 -0700
+++ perl/t/op/lex_assign.t      2007-02-07 08:57:11.000000000 -0800
@@ -8,7 +8,7 @@
 $| = 1;
 umask 0;
 $xref = \ "";
-$runme = ($^O eq 'VMS' ? 'MCR ' : '') . $^X;
+$runme = $^X;
 @a = (1..5);
 %h = (1..6);
 $aref = [EMAIL PROTECTED];

==== //depot/maint-5.8/perl/t/op/runlevel.t#3 (xtext) ====
Index: perl/t/op/runlevel.t
--- perl/t/op/runlevel.t#2~19823~       2003-06-19 07:51:22.000000000 -0700
+++ perl/t/op/runlevel.t        2007-02-07 08:57:11.000000000 -0800
@@ -34,7 +34,7 @@
     print TEST "$prog\n";
     close TEST or die "Could not close: $!";
     my $results = $Is_VMS ?
-                      `MCR $^X "-I[-.lib]" $switch $tmpfile 2>&1` :
+                      `$^X "-I[-.lib]" $switch $tmpfile 2>&1` :
                  $Is_MSWin32 ?  
                      `.\\perl -I../lib $switch $tmpfile 2>&1` :
                  $Is_NetWare ?  

==== //depot/maint-5.8/perl/t/op/stat.t#14 (xtext) ====
Index: perl/t/op/stat.t
--- perl/t/op/stat.t#13~29874~  2007-01-18 08:26:05.000000000 -0800
+++ perl/t/op/stat.t    2007-02-07 08:57:11.000000000 -0800
@@ -49,6 +49,8 @@
 open(FOO, ">$tmpfile") || DIE("Can't open temp test file: $!");
 
 my($nlink, $mtime, $ctime) = (stat(FOO))[$NLINK, $MTIME, $CTIME];
+
+#VMS Fix-me: nlink should work on VMS if applicable link support configured.
 SKIP: {
     skip "No link count", 1 if $Is_VMS;
 
@@ -219,6 +221,16 @@
     skip "Skipping: unexpected ls output in MP-RAS", 6
       if $Is_MPRAS;
 
+    # VMS problem:  If GNV or other UNIX like tool is installed, then
+    # sometimes Perl will find /bin/ls, and will try to run it.
+    # But since Perl on VMS does not know to run it under Bash, it will
+    # try to run the DCL verb LS.  And if the VMS product Language
+    # Sensitive Editor is installed, or some other LS verb, that will
+    # be run instead.  So do not do this until we can teach Perl
+    # when to use BASH on VMS.
+    skip "ls command not available to Perl in OpenVMS right now.", 6
+      if $Is_VMS;
+
     my $LS  = $Config{d_readlink} ? "ls -lL" : "ls -l";
     my $CMD = "$LS /dev 2>/dev/null";
     my $DEV = qx($CMD);

==== //depot/maint-5.8/perl/t/x2p/s2p.t#3 (xtext) ====
Index: perl/t/x2p/s2p.t
--- perl/t/x2p/s2p.t#2~22089~   2004-01-07 05:19:41.000000000 -0800
+++ perl/t/x2p/s2p.t    2007-02-07 08:57:11.000000000 -0800
@@ -791,6 +791,8 @@
 my $psed = File::Spec->catfile( File::Spec->curdir(), 'psed' );
 if ($^O eq 'VMS') {
   # default in the .com extenson if it's not already there
+  $s2p = VMS::Filespec::vmsify($s2p);
+  $psed = VMS::Filespec::vmsify($psed);
   $s2p = VMS::Filespec::rmsexpand($s2p, '.com');
   $psed = VMS::Filespec::rmsexpand($psed, '.com');
 }

==== //depot/maint-5.8/perl/utils/c2ph.PL#6 (text) ====
Index: perl/utils/c2ph.PL
--- perl/utils/c2ph.PL#5~23390~ 2004-10-19 12:35:22.000000000 -0700
+++ perl/utils/c2ph.PL  2007-02-07 08:57:11.000000000 -0800
@@ -1435,9 +1435,9 @@
 close OUT or die "Can't close $file: $!";
 chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
 unlink 'pstruct';
-print "Linking c2ph to pstruct.\n";
+print "Linking $file to pstruct.\n";
 if (defined $Config{d_link}) {
-  link 'c2ph', 'pstruct';
+    link $file, 'pstruct';
 } else {
   unshift @INC, '../lib';
   require File::Copy;

==== //depot/maint-5.8/perl/vms/ext/Stdio/test.pl#3 (xtext) ====
Index: perl/vms/ext/Stdio/test.pl
--- perl/vms/ext/Stdio/test.pl#2~19360~ 2003-04-28 02:10:08.000000000 -0700
+++ perl/vms/ext/Stdio/test.pl  2007-02-07 08:57:11.000000000 -0800
@@ -5,6 +5,10 @@
 print "1..18\n";
 print +(defined(&getname) ? '' : 'not '), "ok 1\n";
 
+#VMS can pretend that it is UNIX.
+my $perl = $^X;
+$perl = VMS::Filespec::vmsify($perl) if $^O eq 'VMS';
+
 $name = "test$$";
 $name++ while -e "$name.tmp";
 $fh = VMS::Stdio::vmsopen("+>$name",'ctx=rec','shr=put','fop=dlt','dna=.tmp');
@@ -28,6 +32,11 @@
 print +($line eq localtime($time) ? '' : 'not '), "ok 9\n";
 
 ($gotname) = (getname($fh) =~/\](.*);/);
+
+#we may be in UNIX emulation mode.
+if (!defined($gotname)) {
+   ($gotname) = (VMS::Filespec::vmsify(getname($fh)) =~/\](.*)/);
+}
 print +("\U$gotname" eq "\U$name.tmp" ? '' : 'not '), "ok 10\n";
 
 $sfh = VMS::Stdio::vmssysopen($name, O_RDONLY, 0,
@@ -43,7 +52,7 @@
 
 print +(&VMS::Stdio::tmpnam ? '' : 'not '),"ok 14\n";
 
-#if (open(P, qq[| MCR $^X -e "1 while (<STDIN>);print 'Foo';1 while (<STDIN>); 
print 'Bar'" >$name.tmp])) {
+#if (open(P, qq[| $^X -e "1 while (<STDIN>);print 'Foo';1 while (<STDIN>); 
print 'Bar'" >$name.tmp])) {
 #  print P "Baz\nQuux\n";
 #  print +(VMS::Stdio::writeof(P) ? '' : 'not '),"ok 15\n";
 #  print P "Baz\nQuux\n";
@@ -59,7 +68,7 @@
 #}
 
 $sfh = VMS::Stdio::vmsopen(">$name.tmp");
-$setuperl = "\$ MCR $^X\nBEGIN { [EMAIL PROTECTED] = qw(@INC) };\nuse 
VMS::Stdio qw(&setdef);";
+$setuperl = "\$ MCR $perl\nBEGIN { [EMAIL PROTECTED] = qw(@INC) };\nuse 
VMS::Stdio qw(&setdef);";
 print $sfh qq[\$ here = F\$Environment("Default")\n];
 print $sfh "$setuperl\nsetdef();\n\$ Show Default\n\$ Set Default 'here'\n";
 print $sfh "$setuperl\nsetdef('..');\n\$ Show Default\n";
End of Patch.

Reply via email to