2
0

pwd.h 899 B

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