X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp_sys.c;h=afac5ab1ce0c1d3a0c4226eff8cb69286fc896ae;hb=0295179fdf8aa1b8c029859896e7340a11a3de74;hp=f469ed0023e045117ddf4833259cfce8e4f07c06;hpb=7f4774ae47f6628888c2da9409229189fba57844;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp_sys.c b/pp_sys.c index f469ed0..afac5ab 100644 --- 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); }