Update.
[glibc.git] / include / pwd.h
blob341c6cee16c1c638fd7d1e9dcc792047e9a6df8b
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 extern int __old_getpwent_r (struct passwd *__resultbuf, char *__buffer,
8 size_t __buflen, struct passwd **__result);
9 extern int __getpwuid_r (__uid_t __uid, struct passwd *__resultbuf,
10 char *__buffer, size_t __buflen,
11 struct passwd **__result);
12 extern int __old_getpwuid_r (__uid_t __uid, struct passwd *__resultbuf,
13 char *__buffer, size_t __buflen,
14 struct passwd **__result);
15 extern int __getpwnam_r (__const char *__name, struct passwd *__resultbuf,
16 char *__buffer, size_t __buflen,
17 struct passwd **__result);
18 extern int __old_getpwnam_r (__const char *__name, struct passwd *__resultbuf,
19 char *__buffer, size_t __buflen,
20 struct passwd **__result);
21 extern int __fgetpwent_r (FILE * __stream, struct passwd *__resultbuf,
22 char *__buffer, size_t __buflen,
23 struct passwd **__result);
25 #include <nss/nss.h>
27 struct parser_data;
28 extern int _nss_files_parse_pwent (char *line, struct passwd *result,
29 struct parser_data *data,
30 size_t datalen, int *errnop);
32 #define DECLARE_NSS_PROTOTYPES(service) \
33 extern enum nss_status _nss_ ## service ## _setpwent (int); \
34 extern enum nss_status _nss_ ## service ## _endpwent (void); \
35 extern enum nss_status _nss_ ## service ## _getpwnam_r \
36 (const char *name, struct passwd *pwd, \
37 char *buffer, size_t buflen, int *errnop); \
38 extern enum nss_status _nss_ ## service ## _getpwuid_r \
39 (uid_t uid, struct passwd *pwd, \
40 char *buffer, size_t buflen, int *errnop); \
41 extern enum nss_status _nss_ ## service ##_getpwent_r \
42 (struct passwd *result, char *buffer, \
43 size_t buflen, int *errnop);
45 DECLARE_NSS_PROTOTYPES (compat)
46 DECLARE_NSS_PROTOTYPES (files)
47 DECLARE_NSS_PROTOTYPES (hesiod)
48 DECLARE_NSS_PROTOTYPES (nis)
49 DECLARE_NSS_PROTOTYPES (nisplus)
51 #undef DECLARE_NSS_PROTOTYPES
53 #endif