Subject: Re: misc/3132: lack of unistd.h
To: None <netbsd-bugs@NetBSD.ORG>
From: Todd Vierling <tv@pobox.com>
List: netbsd-bugs
Date: 01/22/1997 18:23:42
On Thu, 23 Jan 1997, msaitoh wrote:

:  > The patch is correct, but sbrk() and brk() should be:
:  > 
:  > void *sbrk(int incr);
:  > int brk(void *endds);
: 
:  In unistd.h:
: 
:  > % grep brk /usr/include/unistd.h
:  > char    *brk __P((const char *));
:  > char    *sbrk __P((int));
:  > % 
: 
:  Which is corret?

ANSI C allows for a 'void *' type; however, caddr_t (as char *) exists to
allow both K&R C and ANSI C to compile properly.  K&R C doesn't know what
void * is, but in both K&R and ANSI C, char * can be treated as a generic
pointer.

=====
== Todd Vierling (Personal tv@pobox.com; Business tv@iag.net) Mmmm, donuts ==
== System administrator/technician, Internet Access Group, Orlando Florida ==
== Dialups in Orange, Volusia, Lake, Osceola counties - http://www.iag.net ==