(There may be more spots like this, so a Configure test
maybe in order, but this works for now.) From Russ Cox.
p4raw-id: //depot/perl@18583
return SvIV(result);
}
-IV
+Off_t
PerlIOVia_seek(pTHX_ PerlIO * f, Off_t offset, int whence)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
SV *result =
PerlIOVia_method(aTHX_ f, MYMethod(SEEK), G_SCALAR, offsv, whsv,
Nullsv);
+#if Off_t_size == 8 && defined(CONDOP_SIZE) && CONDOP_SIZE < Off_t_size
+ if (result)
+ return (Off_t) SvIV(result);
+ else
+ return (Off_t) -1;
+#else
return (result) ? SvIV(result) : -1;
+#endif
}
Off_t
/* For use by POSIX.xs */
extern int tcsendbreak(int, int);
+#define CONDOP_SIZE 4 /* The Plan 9 compiler cannot return quads from ?: */
+
#endif /* __PLAN9ISH_H__ */