This is 5.8.0.
[p5sagit/p5-mst-13.2.git] / pp_sys.c
index 2639fe9..bd2334a 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -2053,7 +2053,7 @@ PP(pp_truncate)
     /* XXX Configure probe for the length type of *truncate() needed XXX */
     Off_t len;
 
-#if Size_t_size > IVSIZE
+#if Off_t_size > IVSIZE
     len = (Off_t)POPn;
 #else
     len = (Off_t)POPi;
@@ -2178,7 +2178,9 @@ PP(pp_ioctl)
        DIE(aTHX_ "ioctl is not implemented");
 #endif
     else
-#ifdef HAS_FCNTL
+#ifndef HAS_FCNTL
+      DIE(aTHX_ "fcntl is not implemented");
+#else
 #if defined(OS2) && defined(__EMX__)
        retval = fcntl(PerlIO_fileno(IoIFP(io)), func, (int)s);
 #else
@@ -2201,11 +2203,8 @@ PP(pp_ioctl)
     else {
        PUSHp(zero_but_true, ZBTLEN);
     }
-    RETURN;
-
-#else
-    DIE(aTHX_ "fcntl is not implemented");
 #endif
+    RETURN;
 }
 
 PP(pp_flock)
@@ -4154,10 +4153,19 @@ PP(pp_system)
     result = 0;
     if (PL_op->op_flags & OPf_STACKED) {
        SV *really = *++MARK;
+#  ifdef WIN32
+       value = (I32)do_aspawn(really, MARK, SP);
+#  else
        value = (I32)do_aspawn(really, (void **)MARK, (void **)SP);
+#  endif
     }
-    else if (SP - MARK != 1)
+    else if (SP - MARK != 1) {
+#  ifdef WIN32
+       value = (I32)do_aspawn(Nullsv, MARK, SP);
+#  else
        value = (I32)do_aspawn(Nullsv, (void **)MARK, (void **)SP);
+#  endif
+    }
     else {
        value = (I32)do_spawn(SvPVx(sv_mortalcopy(*SP), n_a));
     }