Q: lseek returns long or int? (BSD 4.2)

Henry Spencer henry at utzoo.UUCP
Tue Sep 18 03:38:02 AEST 1984


> 	Does lseek return a long or an int, and is the argument offset a long
> or an 'int'.  (On other machines it returns a long)

This is yet another piece of gratuitous brain-damage brought to you by
the morons at Berkeley.  The returned value from lseek is of type long
on all real UNIX systems.  There are a number of places in 4.2 where
the code has a wired-in assumption that the machine has 32 bits (not 16,
not 64, not anything else either) and that long == int.
-- 
	"4.2BSD does everything UNIX does, only differently."

				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry



More information about the Comp.unix.wizards mailing list