From fc69394f0a37d10251c40a43effda0cff3889ec4 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 14 Feb 2002 01:59:47 +0000 Subject: [PATCH] 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 --- bin/mv/mv.c | 2 ++ bin/rm/rm.c | 2 ++ include/grp.h | 1 + include/pwd.h | 2 ++ include/stdlib.h | 2 -- 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/mv/mv.c b/bin/mv/mv.c index 8a2fb2b4376b..25f56a37869e 100644 --- a/bin/mv/mv.c +++ b/bin/mv/mv.c @@ -57,7 +57,9 @@ static const char rcsid[] = #include #include #include +#include #include +#include #include #include #include diff --git a/bin/rm/rm.c b/bin/rm/rm.c index eee413537483..54617241fbb9 100644 --- a/bin/rm/rm.c +++ b/bin/rm/rm.c @@ -54,6 +54,8 @@ static const char rcsid[] = #include #include #include +#include +#include #include #include #include diff --git a/include/grp.h b/include/grp.h index 2e245d5afc04..5b101cff8a2b 100644 --- a/include/grp.h +++ b/include/grp.h @@ -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 diff --git a/include/pwd.h b/include/pwd.h index 88d705d89621..9a9398da25be 100644 --- a/include/pwd.h +++ b/include/pwd.h @@ -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 diff --git a/include/stdlib.h b/include/stdlib.h index 476f5204f375..1cdad58245de 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -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