From: Scott Henry Date: Tue, 29 Sep 1998 17:38:46 +0000 (-0700) Subject: use Off_t to permit 64-bit seek() X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=97cc44eb3354a060109750a447392fc7db9722c4;p=p5sagit%2Fp5-mst-13.2.git use Off_t to permit 64-bit seek() Date: 29 Sep 1998 17:38:46 -0700 Message-ID: Subject: Re: [PATCH] 5.005_02: Configure "Massive Attack" -- Date: 28 Sep 1998 18:55:37 -0700 Message-ID: Subject: Re: [PATCH] 5.005_51: Configure "Massive Attack" p4raw-id: //depot/perl@1915 --- diff --git a/doio.c b/doio.c index 72b334c..485dfaa 100644 --- a/doio.c +++ b/doio.c @@ -754,8 +754,8 @@ do_seek(GV *gv, Off_t pos, int whence) return FALSE; } -long -do_sysseek(GV *gv, long int pos, int whence) +Off_t +do_sysseek(GV *gv, Off_t pos, int whence) { register IO *io; register PerlIO *fp; diff --git a/pp_sys.c b/pp_sys.c index 2eb8a16..7fa4de2 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -1599,13 +1599,13 @@ PP(pp_sysseek) djSP; GV *gv; int whence = POPi; - long offset = POPl; + Off_t offset = POPl; gv = PL_last_in_gv = (GV*)POPs; if (PL_op->op_type == OP_SEEK) PUSHs(boolSV(do_seek(gv, offset, whence))); else { - long n = do_sysseek(gv, offset, whence); + Off_t n = do_sysseek(gv, offset, whence); PUSHs((n < 0) ? &PL_sv_undef : sv_2mortal(n ? newSViv((IV)n) : newSVpv(zero_but_true, ZBTLEN))); diff --git a/proto.h b/proto.h index 90d1c1c..75d44bd 100644 --- a/proto.h +++ b/proto.h @@ -124,7 +124,7 @@ I32 do_semop _((SV** mark, SV** sp)); I32 do_shmio _((I32 optype, SV** mark, SV** sp)); #endif VIRTUAL void do_sprintf _((SV* sv, I32 len, SV** sarg)); -VIRTUAL long do_sysseek _((GV* gv, long pos, int whence)); +VIRTUAL Off_t do_sysseek _((GV* gv, Off_t pos, int whence)); VIRTUAL Off_t do_tell _((GV* gv)); VIRTUAL I32 do_trans _((SV* sv)); VIRTUAL void do_vecset _((SV* sv)); diff --git a/sv.c b/sv.c index 0495e8a..ec224a3 100644 --- a/sv.c +++ b/sv.c @@ -698,7 +698,7 @@ sv_upgrade(register SV *sv, U32 mt) cur = 0; len = 0; nv = SvNVX(sv); - iv = I_32(nv); + iv = (IV)nv; magic = 0; stash = 0; del_XNV(SvANY(sv));