.
[glibc/history.git] / include / pwd.h
blobef9b61a614f204fa8641eb4b692136ea17b2ec88
1 #ifndef _PWD_H
2 #include <pwd/pwd.h>
4 /* Now define the internal interfaces. */
5 extern int __getpwent_r (struct passwd *__resultbuf, char *__buffer,
6 size_t __buflen, struct passwd **__result)
7 attribute_hidden;
8 extern int __old_getpwent_r (struct passwd *__resultbuf, char *__buffer,
9 size_t __buflen, struct passwd **__result);
10 extern int __getpwuid_r (__uid_t __uid, struct passwd *__resultbuf,
11 char *__buffer, size_t __buflen,
12 struct passwd **__result);
13 extern int __old_getpwuid_r (__uid_t __uid, struct passwd *__resultbuf,
14 char *__buffer, size_t __buflen,
15 struct passwd **__result);
16 extern int __getpwnam_r (__const char *__name, struct passwd *__resultbuf,
17 char *__buffer, size_t __buflen,
18 struct passwd **__result);
19 extern int __old_getpwnam_r (__const char *__name, struct passwd *__resultbuf,
20 char *__buffer, size_t __buflen,
21 struct passwd **__result);
22 extern int __fgetpwent_r (FILE * __stream, struct passwd *__resultbuf,
23 char *__buffer, size_t __buflen,
24 struct passwd **__result);
26 #include <nss/nss.h>
28 struct parser_data;
29 extern int _nss_files_parse_pwent (char *line, struct passwd *result,
30 struct parser_data *data,
31 size_t datalen, int *errnop);
32 libc_hidden_proto (_nss_files_parse_pwent)
34 #define DECLARE_NSS_PROTOTYPES(service) \
35 extern enum nss_status _nss_ ## service ## _setpwent (int); \
36 extern enum nss_status _nss_ ## service ## _endpwent (void); \
37 extern enum nss_status _nss_ ## service ## _getpwnam_r \
38 (const char *name, struct passwd *pwd, \
39 char *buffer, size_t buflen, int *errnop); \
40 extern enum nss_status _nss_ ## service ## _getpwuid_r \
41 (uid_t uid, struct passwd *pwd, \
42 char *buffer, size_t buflen, int *errnop); \
43 extern enum nss_status _nss_ ## service ##_getpwent_r \
44 (struct passwd *result, char *buffer, \
45 size_t buflen, int *errnop);
47 DECLARE_NSS_PROTOTYPES (compat)
48 DECLARE_NSS_PROTOTYPES (files)
49 DECLARE_NSS_PROTOTYPES (hesiod)
50 DECLARE_NSS_PROTOTYPES (nis)
51 DECLARE_NSS_PROTOTYPES (nisplus)
53 #undef DECLARE_NSS_PROTOTYPES
55 #endif