1*cda5da8dSAndroid Build Coastguard Worker #ifndef _PWD_H 2*cda5da8dSAndroid Build Coastguard Worker #define _PWD_H 3*cda5da8dSAndroid Build Coastguard Worker 4*cda5da8dSAndroid Build Coastguard Worker #ifdef __cplusplus 5*cda5da8dSAndroid Build Coastguard Worker extern "C" { 6*cda5da8dSAndroid Build Coastguard Worker #endif 7*cda5da8dSAndroid Build Coastguard Worker 8*cda5da8dSAndroid Build Coastguard Worker #include <features.h> 9*cda5da8dSAndroid Build Coastguard Worker 10*cda5da8dSAndroid Build Coastguard Worker #define __NEED_size_t 11*cda5da8dSAndroid Build Coastguard Worker #define __NEED_uid_t 12*cda5da8dSAndroid Build Coastguard Worker #define __NEED_gid_t 13*cda5da8dSAndroid Build Coastguard Worker 14*cda5da8dSAndroid Build Coastguard Worker #ifdef _GNU_SOURCE 15*cda5da8dSAndroid Build Coastguard Worker #define __NEED_FILE 16*cda5da8dSAndroid Build Coastguard Worker #endif 17*cda5da8dSAndroid Build Coastguard Worker 18*cda5da8dSAndroid Build Coastguard Worker #include <bits/alltypes.h> 19*cda5da8dSAndroid Build Coastguard Worker 20*cda5da8dSAndroid Build Coastguard Worker struct passwd { 21*cda5da8dSAndroid Build Coastguard Worker char *pw_name; 22*cda5da8dSAndroid Build Coastguard Worker char *pw_passwd; 23*cda5da8dSAndroid Build Coastguard Worker uid_t pw_uid; 24*cda5da8dSAndroid Build Coastguard Worker gid_t pw_gid; 25*cda5da8dSAndroid Build Coastguard Worker char *pw_gecos; 26*cda5da8dSAndroid Build Coastguard Worker char *pw_dir; 27*cda5da8dSAndroid Build Coastguard Worker char *pw_shell; 28*cda5da8dSAndroid Build Coastguard Worker }; 29*cda5da8dSAndroid Build Coastguard Worker 30*cda5da8dSAndroid Build Coastguard Worker #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) 31*cda5da8dSAndroid Build Coastguard Worker void setpwent (void); 32*cda5da8dSAndroid Build Coastguard Worker void endpwent (void); 33*cda5da8dSAndroid Build Coastguard Worker struct passwd *getpwent (void); 34*cda5da8dSAndroid Build Coastguard Worker #endif 35*cda5da8dSAndroid Build Coastguard Worker 36*cda5da8dSAndroid Build Coastguard Worker struct passwd *getpwuid (uid_t); 37*cda5da8dSAndroid Build Coastguard Worker struct passwd *getpwnam (const char *); 38*cda5da8dSAndroid Build Coastguard Worker int getpwuid_r (uid_t, struct passwd *, char *, size_t, struct passwd **); 39*cda5da8dSAndroid Build Coastguard Worker int getpwnam_r (const char *, struct passwd *, char *, size_t, struct passwd **); 40*cda5da8dSAndroid Build Coastguard Worker 41*cda5da8dSAndroid Build Coastguard Worker #ifdef _GNU_SOURCE 42*cda5da8dSAndroid Build Coastguard Worker struct passwd *fgetpwent(FILE *); 43*cda5da8dSAndroid Build Coastguard Worker int putpwent(const struct passwd *, FILE *); 44*cda5da8dSAndroid Build Coastguard Worker #endif 45*cda5da8dSAndroid Build Coastguard Worker 46*cda5da8dSAndroid Build Coastguard Worker #ifdef __cplusplus 47*cda5da8dSAndroid Build Coastguard Worker } 48*cda5da8dSAndroid Build Coastguard Worker #endif 49*cda5da8dSAndroid Build Coastguard Worker 50*cda5da8dSAndroid Build Coastguard Worker #endif 51