1
0

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