summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2002-02-14 01:59:47 +0000
committerimp <imp@FreeBSD.org>2002-02-14 01:59:47 +0000
commitf58558abb789d5e2b6a7deb4566483c01b0f4d58 (patch)
treeeeb67e79cff6a9d2211b5a4a193d0f32f920619a
parent8c67ca76f79f837ceff85f7b9beb68cb784aaadd (diff)
downloadFreeBSD-src-f58558abb789d5e2b6a7deb4566483c01b0f4d58.zip
FreeBSD-src-f58558abb789d5e2b6a7deb4566483c01b0f4d58.tar.gz
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
-rw-r--r--bin/mv/mv.c2
-rw-r--r--bin/rm/rm.c2
-rw-r--r--include/grp.h1
-rw-r--r--include/pwd.h2
-rw-r--r--include/stdlib.h2
5 files changed, 7 insertions, 2 deletions
diff --git a/bin/mv/mv.c b/bin/mv/mv.c
index 8a2fb2b..25f56a3 100644
--- a/bin/mv/mv.c
+++ b/bin/mv/mv.c
@@ -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>
diff --git a/bin/rm/rm.c b/bin/rm/rm.c
index eee4135..5461724 100644
--- a/bin/rm/rm.c
+++ b/bin/rm/rm.c
@@ -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>
diff --git a/include/grp.h b/include/grp.h
index 2e245d5..5b101cf 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 88d705d..9a9398d 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 476f520..1cdad58 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
OpenPOWER on IntegriCloud