pwd.h 817 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. void setpwent (void);
  24. void endpwent (void);
  25. struct passwd *getpwent (void);
  26. struct passwd *getpwuid (uid_t);
  27. struct passwd *getpwnam (const char *);
  28. int getpwuid_r (uid_t, struct passwd *, char *, size_t, struct passwd **);
  29. int getpwnam_r (const char *, struct passwd *, char *, size_t, struct passwd **);
  30. #ifdef _GNU_SOURCE
  31. struct passwd *fgetpwent(FILE *);
  32. int putpwent(const struct passwd *, FILE *);
  33. #endif
  34. #ifdef __cplusplus
  35. }
  36. #endif
  37. #endif