Subject: Re: ftruncate & truncate prototypes &
To: Thorsten Lockert <tholo@SigmaSoft.COM>
From: J.T. Conklin <jtc@cygnus.com>
List: tech-userlevel
Date: 04/18/1995 08:52:40
>> I noticed that our <sys/types.h> header provides a prototype for
>> lseek().  This helps programs that don't #include <unistd.h> get
>> lseeks()'s prototype (since our off_t is now 64 bits). 
>> 
>> Should we do the same for truncate() and ftruncate()?

> I'd rather see the prototype moved to <unistd.h>...  But I can see
> why having it (and perhaps a couple more) in <sys/types.h> even
> though they do not really belong there...

truncate(), ftruncate(), and lseek() have prototypes in <unistd.h>; I
was asking if we should add truncate() and ftruncate() prototypes to
<sys/types.h> (lseek is already there) to make it more likely that
programs using those functions without including <unistd.h> will
still function correctly.  

The theory is that <sys/types.h> is almost certainly going to be
pulled in by one of the headers the program.

On the other hand, I'm feeling much more crotchety this morning, and
think maybe we should remove the lseek() prototype from <sys/types.h>
to force old/broken software to be updated.

	--jtc