integer types, sys calls, and stdio
Henry Spencer
henry at utzoo.UUCP
Sun Jan 13 11:02:04 AEST 1985
> An alternate definition might be:
>
> daddr_t lseek(fildes, offset, whence)
> daddr_t offset;
>
> where "daddr_t", defined in <sys/types.h>, is machine-dependent.
Actually, there already is a type specifically for offsets into files:
off_t. Unfortunately, it's not nearly as widely used as it should be.
You have a choice of "doing it right" and having a fair bit of work to
do on old programs, or giving in to practicality and using "long".
Lamentably, the current draft of the ANSI C standard uses "long" for
fseek() and ftell().
--
Henry Spencer @ U of Toronto Zoology
{allegra,ihnp4,linus,decvax}!utzoo!henry
More information about the Comp.lang.c
mailing list