On Wed, Nov 05, 2003 at 05:57:38PM -0800, Stas Bekman wrote: > Perl_pp_sysread uses int for its offset argument. PerlIO uses Off_t for > offsets. Should Perl_pp_sysread use Off_t as well? isn't int too small for > reading with large file supporting systems? PP(pp_sysread) { dSP; dMARK; dORIGMARK; dTARGET; int offset; Mmm. yes, I suspect that it should based on a cursory glance. Or at least the correct STRLEN type (as it's the offset into the scalar) > Off_t is alised to off_t, but off_t is not in the typemap. should it be in > the typemap and be mapped to T_NV? > > Also the typemap defines: > > size_t T_UV > ssize_t T_IV > > again aren't they too small for large filesystems? Probably. Unless you compile perl with 64 bit ints. > and should be T_NV? Converting anything file size related from an integer to floating point gives me the willies. Mainly because floating point will silently lose precision once your files get larger than (say) 2**53 Seeking 1 byte wrong isn't that big a deal, is it? I'm not sure that there is a good answer to any of this. Nicholas ClarkThread Previous | Thread Next