Move user_from_uid to pwd.h

Move group_from_gid to grp.h
Remove from stdlib.h
Make the prototypes match the code
Fix rm and mv to include new files.

NetBSD has these defined in those files, and others too that I've not
done.

Approved by: terminal room kabal
Reviewed by: jhb, phk
This commit is contained in:
Warner Losh 2002-02-14 01:59:47 +00:00
parent 5244eac968
commit fc69394f0a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=90644
5 changed files with 7 additions and 2 deletions

View File

@ -57,7 +57,9 @@ static const char rcsid[] =
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <grp.h>
#include <limits.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -54,6 +54,8 @@ static const char rcsid[] =
#include <errno.h>
#include <fcntl.h>
#include <fts.h>
#include <grp.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -64,6 +64,7 @@ int setgrent __P((void));
void endgrent __P((void));
void setgrfile __P((const char *));
int setgroupent __P((int));
char *group_from_gid __P((gid_t, int));
#endif
__END_DECLS

View File

@ -36,6 +36,7 @@
* SUCH DAMAGE.
*
* @(#)pwd.h 8.2 (Berkeley) 1/21/94
* $FreeBSD$
*/
#ifndef _PWD_H_
@ -105,6 +106,7 @@ struct passwd *getpwent __P((void));
int setpassent __P((int));
void setpwent __P((void));
void endpwent __P((void));
char *user_from_uid __P((uid_t, int));
#endif
__END_DECLS

View File

@ -169,7 +169,6 @@ int getloadavg __P((double [], int));
__const char *
getprogname __P((void));
char *group_from_gid __P((unsigned long, int));
int heapsort __P((void *, size_t, size_t,
int (*)(const void *, const void *)));
char *initstate __P((unsigned long, char *, long));
@ -205,7 +204,6 @@ unsigned long long
__uint64_t
strtouq __P((const char *, char **, int));
void unsetenv __P((const char *));
char *user_from_uid __P((unsigned long, int));
#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
__END_DECLS