off_t (was unix question: files per directory)

Chris Torek chris at mimsy.UUCP
Wed Apr 12 15:34:05 AEST 1989


In article <8420 at xanth.cs.odu.edu> kremer at cs.odu.edu (Lloyd Kremer) writes:
>Why was it decided that off_t should be signed? ...
>it doesn't make sense to have a negative offset into a file.

You do need to be able to seek backwards, but that excuse is not
good enough.  It seems likely that off_t is signed because it has
always been signed.

Still, 2^32-1 is not big enough; we need 64-bit integers.  (The
4.2BSD file system format has room for 64 bit sizes.)
-- 
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