[net.bugs.v7] <pwd.h> and <grp.h> should declare various functions

guy@sun.uucp (Guy Harris) (07/21/85)

The 4.2BSD version of <pwd.h> declares the functions "getpwent", "getpwuid",
and "getpwnam", and the 4.2BSD version of <grp.h> declares the functions
"getgrent", "getgrgid", and "getgrnam".  I don't have V7 source to check
whether its versions of these files declared those functions, but the System
V versions of those files definitely don't.  Most other include files of
that sort (like <stdio.h>) declare the functions exported by the facility
that the include file belongs to; those include files should do so also.
(Not only will it permit code written for 4.2BSD that assumed the include
files declared the functions to compile without warnings and work on
machines where you have to declare functions which return pointers to get
them to work, but it'll probably fix a lot of other programs out there
written for other UNIX versions by programmers who just didn't give a damn.
In addition, when ANSI Standard C becomes available, all such declarations
can be updated to declare the types of the formal arguments to the routines
as well as the types of their results.)

	Guy Harris