On Wed, Nov 12, 2003 a.d., Nicholas Clark wrote: > 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) No. perldoc -f sysread. The offset could be negative. Look also at pp_sys.c:1652. Maybe it should be a SSize_t instead of an int. As of using Off_t, Off_t can be 64 bit on a 32 bit machine. The offset in pp_sysread is a an offset into memory. Would you like to address more than the addressable memory ? > > > 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? They're just fine. sizeof([IU]V) >= sizeof(void*). Please give me an example where sizeof(size_t) > sizeof(void*). Regards, AdiThread Previous | Thread Next