Upgrade to CPAN-1.87_62
[p5sagit/p5-mst-13.2.git] / doio.c
diff --git a/doio.c b/doio.c
index 585eb54..bc30130 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -1276,6 +1276,7 @@ Perl_my_stat(pTHX)
         if (gv == PL_defgv)
             return PL_laststatval;
        io = GvIO(gv);
+        do_fstat_have_io:
         PL_laststype = OP_STAT;
         PL_statgv = gv;
         sv_setpvn(PL_statname, "", 0);
@@ -1316,6 +1317,10 @@ Perl_my_stat(pTHX)
            gv = (GV*)SvRV(sv);
            goto do_fstat;
        }
+        else if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVIO) {
+            io = (IO*)SvRV(sv);
+            goto do_fstat_have_io;
+        }
 
        s = SvPV_const(sv, len);
        PL_statgv = NULL;
@@ -1476,7 +1481,7 @@ Perl_do_exec3(pTHX_ const char *incmd, int fd, int do_report)
              if (s[-1] == '\'') {
                  *--s = '\0';
                  PERL_FPU_PRE_EXEC
-                 PerlProc_execl(PL_cshname, "csh", flags, ncmd, NULL);
+                 PerlProc_execl(PL_cshname, "csh", flags, ncmd, (char*)NULL);
                  PERL_FPU_POST_EXEC
                  *s = '\'';
                  S_exec_failed(aTHX_ PL_cshname, fd, do_report);
@@ -1525,7 +1530,7 @@ Perl_do_exec3(pTHX_ const char *incmd, int fd, int do_report)
            }
          doshell:
            PERL_FPU_PRE_EXEC
-           PerlProc_execl(PL_sh_path, "sh", "-c", cmd, NULL);
+           PerlProc_execl(PL_sh_path, "sh", "-c", cmd, (char *)NULL);
            PERL_FPU_POST_EXEC
            S_exec_failed(aTHX_ PL_sh_path, fd, do_report);
            Safefree(cmd);