Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 1 | #ifndef _PWD_H |
| 2 | #define _PWD_H |
| 3 | |
| 4 | #ifdef __cplusplus |
| 5 | extern "C" { |
| 6 | #endif |
| 7 | |
| 8 | #define __NEED_size_t |
| 9 | #define __NEED_uid_t |
| 10 | #define __NEED_gid_t |
| 11 | |
| 12 | #include <bits/alltypes.h> |
| 13 | |
| 14 | struct passwd |
| 15 | { |
| 16 | char *pw_name; |
| 17 | char *pw_passwd; |
| 18 | uid_t pw_uid; |
| 19 | gid_t pw_gid; |
| 20 | char *pw_gecos; |
| 21 | char *pw_dir; |
| 22 | char *pw_shell; |
| 23 | }; |
| 24 | |
| 25 | void setpwent (void); |
| 26 | void endpwent (void); |
| 27 | struct passwd *getpwent (void); |
| 28 | |
| 29 | struct passwd *getpwuid (uid_t); |
| 30 | struct passwd *getpwnam (const char *); |
| 31 | int getpwuid_r (uid_t, struct passwd *, char *, size_t, struct passwd **); |
| 32 | int getpwnam_r (const char *, struct passwd *, char *, size_t, struct passwd **); |
| 33 | |
| 34 | #ifdef __cplusplus |
| 35 | } |
| 36 | #endif |
| 37 | |
| 38 | #endif |