Files:
  os2/perl2cmd.pl		Make SH-runnable too (around bug in pdksh)
  t/lib/filecopy.t		Was not setting `binmode' on target FH
  lib/ExtUtils/MM_OS2.pm	Remove setting for a very old port
  os2/os2.c			Correct bug when doing system('a', 'b', 'c')
					via shell (i.e, when a is a script)
				Always try shell if shell-less `system' fails
					due to "No such file": otherwise
					there is no portable way to 
					system 'perldoc', 'blah', 'foo';
  utils/perldoc.PL		Set up OS/2-ish viewers first.


--- ./os2/perl2cmd.pl~	Tue Nov 25 06:53:08 1997
+++ ./os2/perl2cmd.pl	Fri Nov 28 22:47:52 1997
@@ -23,7 +23,7 @@
   $base =~ s|.*/||;
   $file =~ s|/|\\|g ;
   print "Processing $file => $dir\\$base.cmd\n";
-  system 'cmd.exe', '/c', "echo extproc perl -S >$dir\\$base.cmd";
+  system 'cmd.exe', '/c', "echo extproc perl -S>$dir\\$base.cmd";
   system 'cmd.exe', '/c', "type $file >> $dir\\$base.cmd";
 }
 
--- perl5.004_55/t/lib/filecopy.t	Tue Nov 25 06:55:28 1997
+++ perl5.004_55.nothr/t/lib/filecopy.t	Sat Nov 29 11:31:16 1997
@@ -28,6 +28,7 @@
 print "not " unless $foo eq "ok 3\n";
 print "ok 2\n";
 
+binmode STDOUT;			# Copy::copy works in binary mode
 copy "copy-$$", \*STDOUT;
 unlink "copy-$$" or die "unlink: $!";
 
--- perl5.004_55/lib/ExtUtils/MM_OS2.pm	Tue Nov 25 06:52:22 1997
+++ perl5.004_55.nothr/lib/ExtUtils/MM_OS2.pm	Sat Nov 29 12:44:26 1997
@@ -8,7 +8,6 @@
 Exporter::import('ExtUtils::MakeMaker',
        qw( $Verbose &neatvalue));
 
-$ENV{EMXSHELL} = 'sh'; # to run `commands`
 unshift @MM::ISA, 'ExtUtils::MM_OS2';
 
 sub dlsyms {
--- ./os2/os2.c.prev	Wed Nov 26 12:38:18 1997
+++ ./os2/os2.c	Thu Dec 11 19:41:16 1997
@@ -360,7 +360,7 @@ register SV **sp;
     int flag = P_WAIT, trueflag, err, secondtry = 0;
 
     if (sp > mark) {
-	New(1301,Argv, sp - mark + 3, char*);
+	New(1301,Argv, sp - mark + 5, char*);
 	a = Argv;
 
 	if (mark < sp && SvNIOKp(*(mark+1)) && !SvPOKp(*(mark+1))) {
@@ -405,20 +405,26 @@ register SV **sp;
 		    || (no_dir = strrchr(Argv[0], '\\'))
 		    || (no_dir = Argv[0]);
 		if (!strchr(no_dir, '.')) {
+#if 0
 		    struct stat buffer;
 		    if (stat(Argv[0], &buffer) != -1) { /* File exists. */
 			/* Maybe we need to specify the full name here? */
 			goto doshell;
 		    }
+#else  /* In fact the above check makes system(qw'perldoc -F $0') unportable. */
+		    goto doshell;
+#endif 
 		}
 	    } else if (err == ENOEXEC) { /* Need to send to shell. */
 	      doshell:
 		while (a >= Argv) {
-		    *(a + 2) = *a;
+		    *(a + 4) = *a;
 		    a--;
 		}
-		*Argv = sh_path;
-		*(Argv + 1) = "-c";
+		Argv[0] = sh_path;
+		Argv[1] = "-c";
+		Argv[2] = "\"$@\"";	/* Interpolate arguments */
+		Argv[3] = "aspawn-via-shell"; /* Start-as-name */
 		secondtry = 1;
 		goto retry;
 	    }
@@ -556,11 +562,15 @@ int execf;
 		    || (no_dir = strrchr(Argv[0], '\\'))
 		    || (no_dir = Argv[0]);
 		if (!strchr(no_dir, '.')) {
+#if 0
 		    struct stat buffer;
 		    if (stat(Argv[0], &buffer) != -1) { /* File exists. */
 			/* Maybe we need to specify the full name here? */
 			goto doshell;
 		    }
+#else  /* In fact the above check makes system('perldoc -F $0') unportable. */
+		    goto doshell;
+#endif 
 		}
 	    } else if (err == ENOEXEC) { /* Need to send to shell. */
 		goto doshell;
--- ./utils/perldoc.PL~	Tue Nov 25 06:55:54 1997
+++ ./utils/perldoc.PL	Thu Dec 11 20:09:20 1997
@@ -318,6 +318,7 @@ if ($Is_MSWin32) {
 	if ($^O eq 'os2') {
 	  require POSIX;
 	  $tmp = POSIX::tmpnam();
+	  unshift @pagers, 'less', 'cmd /c more <';
 	} else {
 	  $tmp = "/tmp/perldoc1.$$";	  
 	}
