OSDN Git Service

This patch from Adam Heath <doogie@debian.org>, makes print_file
[android-x86/external-busybox.git] / include / pwd.h
1 #ifndef __BB_PWD_H
2 #define __BB_PWD_H
3
4 #if defined USE_SYSTEM_PWD_GRP
5 #include <pwd.h>
6 #else
7
8 #include <sys/types.h>
9 #include <features.h>
10 #include <stdio.h>
11
12 /* The passwd structure.  */
13 struct passwd
14 {
15   char *pw_name;                /* Username.  */
16   char *pw_passwd;              /* Password.  */
17   uid_t pw_uid;                 /* User ID.  */
18   gid_t pw_gid;                 /* Group ID.  */
19   char *pw_gecos;               /* Real name.  */
20   char *pw_dir;                 /* Home directory.  */
21   char *pw_shell;               /* Shell program.  */
22 };
23
24 extern void setpwent __P ((void));
25 extern void endpwent __P ((void));
26 extern struct passwd * getpwent __P ((void));
27
28 extern int putpwent __P ((__const struct passwd * __p, FILE * __f));
29 extern int getpw __P ((uid_t uid, char *buf));
30
31 extern struct passwd * fgetpwent __P ((FILE * file));
32
33 extern struct passwd * getpwuid __P ((__const uid_t));
34 extern struct passwd * getpwnam __P ((__const char *));
35
36 extern struct passwd * __getpwent __P ((__const int passwd_fd));
37
38 #endif /* USE_SYSTEM_PWD_GRP */
39 #endif /* __BB_PWD_H  */
40