File sizes > 2^32 bytes?

Chris Torek chris at mimsy.UUCP
Thu May 25 23:15:32 AEST 1989


In article <5980055 at hpfcdc.HP.COM> rml at hpfcdc.HP.COM (Bob Lenk) writes:
>...  The interface to lseek() permits negative values,
>which are especially useful relative to current position or to EOF.
>The current POSIX standard fails to explicitly require that off_t be
>a signed type, but any implementation that tried to interpret it as
>unsigned would have troubles.

I thought I won this argument already :-)

If off_t is unsigned---just for fun, let us say it is an unsigned 64-bit
integer---then -(off_t)1 + (off_t)k is the same as k-1.  (You may have
to write -(off_t)value rather than (off_t)-value, if off_t has more bits
than a regular `int'.)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.wizards mailing list