123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- #ifndef _PWD_H
- #define _PWD_H 1
- #include <features.h>
- __BEGIN_DECLS
- #include <bits/types.h>
- #define __need_size_t
- #include <stddef.h>
- #if defined __USE_XOPEN || defined __USE_XOPEN2K
- # ifndef __gid_t_defined
- typedef __gid_t gid_t;
- # define __gid_t_defined
- # endif
- # ifndef __uid_t_defined
- typedef __uid_t uid_t;
- # define __uid_t_defined
- # endif
- #endif
- struct passwd
- {
- char *pw_name;
- char *pw_passwd;
- __uid_t pw_uid;
- __gid_t pw_gid;
- char *pw_gecos;
- char *pw_dir;
- char *pw_shell;
- };
- #ifdef __USE_MISC
- # define __need_FILE
- # include <stdio.h>
- #endif
- #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
- extern void setpwent (void);
- extern void endpwent (void);
- extern struct passwd *getpwent (void);
- #endif
- #ifdef __USE_MISC
- extern struct passwd *fgetpwent (FILE *__stream) __nonnull ((1));
- extern int putpwent (const struct passwd *__restrict __p,
- FILE *__restrict __f);
- #endif
- extern struct passwd *getpwuid (__uid_t __uid);
- extern struct passwd *getpwnam (const char *__name) __nonnull ((1));
- #ifdef __USE_POSIX
- # ifdef __USE_MISC
- # define NSS_BUFLEN_PASSWD 1024
- # endif
- # ifdef __USE_MISC
- extern int getpwent_r (struct passwd *__restrict __resultbuf,
- char *__restrict __buffer, size_t __buflen,
- struct passwd **__restrict __result)
- __nonnull ((1, 2, 4));
- # endif
- extern int getpwuid_r (__uid_t __uid,
- struct passwd *__restrict __resultbuf,
- char *__restrict __buffer, size_t __buflen,
- struct passwd **__restrict __result)
- __nonnull ((2, 3, 5));
- extern int getpwnam_r (const char *__restrict __name,
- struct passwd *__restrict __resultbuf,
- char *__restrict __buffer, size_t __buflen,
- struct passwd **__restrict __result)
- __nonnull ((1, 2, 3, 5));
- # ifdef __USE_MISC
- extern int fgetpwent_r (FILE *__restrict __stream,
- struct passwd *__restrict __resultbuf,
- char *__restrict __buffer, size_t __buflen,
- struct passwd **__restrict __result)
- __nonnull ((1, 2, 3, 5));
- # endif
- #endif
- #ifdef __USE_GNU
- extern int getpw (__uid_t __uid, char *__buffer);
- #endif
- __END_DECLS
- #endif
|