p4raw-id: //depot/cfgperl@5764
djSP; dMARK; dORIGMARK; dTARGET;
GV *gv;
IO *io;
- Off_t offset;
SV *bufsv;
char *buffer;
Size_t length;
SSize_t retval;
+ IV offset;
STRLEN blen;
MAGIC *mg;
#else
length = SvIVx(*++MARK);
#endif
- if (length < 0)
+ if ((Size_t)length < 0)
DIE(aTHX_ "Negative length");
SETERRNO(0,0);
io = GvIO(gv);
}
else if (PL_op->op_type == OP_SYSWRITE) {
if (MARK < SP) {
-#if Off_t_size > IVSIZE
- offset = SvNVx(*++MARK);
-#else
offset = SvIVx(*++MARK);
-#endif
if (offset < 0) {
if (-offset > blen)
DIE(aTHX_ "Offset outside string");
STRLEN n_a;
#if Size_t_size > IVSIZE
- length = (Off_t)POPn;
+ len = (Off_t)POPn;
#else
- length = (Off_t)POPi;
+ len = (Off_t)POPi;
#endif
/* Checking for length < 0 is problematic as the type might or
* might not be signed: if it is not, clever compilers will moan. */