diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-01-26 09:08:36 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-01-26 09:08:36 +0000 |
commit | b6290011899f3691379a15c58fce0b459f021338 (patch) | |
tree | 6f4b5ec31738cc29a83e4517e74c38401132fd40 /ext/PerlIO | |
parent | 090bf15bb9dfb4e3cb204e6874ee60c0c987535e (diff) | |
download | perl-b6290011899f3691379a15c58fce0b459f021338.tar.gz |
Plan 9 compiler can't return quads from the ?: (condop).
(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
Diffstat (limited to 'ext/PerlIO')
-rw-r--r-- | ext/PerlIO/via/via.xs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/PerlIO/via/via.xs b/ext/PerlIO/via/via.xs index 524d24a69c..1f0ff40411 100644 --- a/ext/PerlIO/via/via.xs +++ b/ext/PerlIO/via/via.xs @@ -346,7 +346,7 @@ PerlIOVia_binmode(pTHX_ PerlIO * f) return SvIV(result); } -IV +Off_t PerlIOVia_seek(pTHX_ PerlIO * f, Off_t offset, int whence) { PerlIOVia *s = PerlIOSelf(f, PerlIOVia); @@ -356,7 +356,14 @@ PerlIOVia_seek(pTHX_ PerlIO * f, Off_t offset, int whence) 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 |