avoid hiding child process window
[p5sagit/p5-mst-13.2.git] / pp_sys.c
index f469ed0..afac5ab 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1667,6 +1667,7 @@ PP(pp_send)
        else
 #endif
        {
+           /* See the note at doio.c:do_print about filesize limits. --jhi */
            length = PerlLIO_write(PerlIO_fileno(IoIFP(io)),
                                   buffer+offset, length);
        }
@@ -1764,7 +1765,7 @@ PP(pp_sysseek)
     djSP;
     GV *gv;
     int whence = POPi;
-    Off_t offset = POPl;
+    Off_t offset = (Off_t)SvIVx(POPs);
     MAGIC *mg;
 
     gv = PL_last_in_gv = (GV*)POPs;
@@ -2485,9 +2486,9 @@ PP(pp_stat)
 #endif
        PUSHs(sv_2mortal(newSViv(PL_statcache.st_size)));
 #ifdef BIG_TIME
-       PUSHs(sv_2mortal(newSVnv((U32)PL_statcache.st_atime)));
-       PUSHs(sv_2mortal(newSVnv((U32)PL_statcache.st_mtime)));
-       PUSHs(sv_2mortal(newSVnv((U32)PL_statcache.st_ctime)));
+       PUSHs(sv_2mortal(newSVnv(PL_statcache.st_atime)));
+       PUSHs(sv_2mortal(newSVnv(PL_statcache.st_mtime)));
+       PUSHs(sv_2mortal(newSVnv(PL_statcache.st_ctime)));
 #else
        PUSHs(sv_2mortal(newSViv(PL_statcache.st_atime)));
        PUSHs(sv_2mortal(newSViv(PL_statcache.st_mtime)));
@@ -3764,21 +3765,21 @@ PP(pp_getpgrp)
 {
 #ifdef HAS_GETPGRP
     djSP; dTARGET;
-    int pid;
-    I32 value;
+    Pid_t pid;
+    Pid_t pgrp;
 
     if (MAXARG < 1)
        pid = 0;
     else
        pid = SvIVx(POPs);
 #ifdef BSD_GETPGRP
-    value = (I32)BSD_GETPGRP(pid);
+    pgrp = (I32)BSD_GETPGRP(pid);
 #else
     if (pid != 0 && pid != getpid())
        DIE(aTHX_ "POSIX getpgrp can't take an argument");
-    value = (I32)getpgrp();
+    pgrp = getpgrp();
 #endif
-    XPUSHi(value);
+    XPUSHi(pgrp);
     RETURN;
 #else
     DIE(aTHX_ PL_no_func, "getpgrp()");
@@ -3789,8 +3790,8 @@ PP(pp_setpgrp)
 {
 #ifdef HAS_SETPGRP
     djSP; dTARGET;
-    int pgrp;
-    int pid;
+    Pid_t pgrp;
+    Pid_t pid;
     if (MAXARG < 2) {
        pgrp = 0;
        pid = 0;
@@ -5000,7 +5001,7 @@ fcntl_emulate_flock(int fd, int operation)
        return -1;
     }
     flock.l_whence = SEEK_SET;
-    flock.l_start = flock.l_len = 0L;
+    flock.l_start = flock.l_len = (Off_t)0;
  
     return fcntl(fd, (operation & LOCK_NB) ? F_SETLK : F_SETLKW, &flock);
 }