2002-08-09 Jakub Jelinek <jakub@redhat.com>
[kopensolaris-gnu/glibc.git] / include / grp.h
1 #ifndef _GRP_H
2 #include <grp/grp.h>
3
4 /* Now define the internal interfaces.  */
5 extern int __getgrent_r (struct group *__resultbuf, char *buffer,
6                          size_t __buflen, struct group **__result)
7      attribute_hidden;
8 extern int __old_getgrent_r (struct group *__resultbuf, char *buffer,
9                              size_t __buflen, struct group **__result);
10 extern int __fgetgrent_r (FILE * __stream, struct group *__resultbuf,
11                           char *buffer, size_t __buflen,
12                           struct group **__result);
13
14 /* Search for an entry with a matching group ID.  */
15 extern int __getgrgid_r (__gid_t __gid, struct group *__resultbuf,
16                          char *__buffer, size_t __buflen,
17                          struct group **__result);
18 extern int __old_getgrgid_r (__gid_t __gid, struct group *__resultbuf,
19                              char *__buffer, size_t __buflen,
20                              struct group **__result);
21
22 /* Search for an entry with a matching group name.  */
23 extern int __getgrnam_r (__const char *__name, struct group *__resultbuf,
24                          char *__buffer, size_t __buflen,
25                          struct group **__result);
26 extern int __old_getgrnam_r (__const char *__name, struct group *__resultbuf,
27                              char *__buffer, size_t __buflen,
28                              struct group **__result);
29
30 struct parser_data;
31 extern int _nss_files_parse_grent (char *line, struct group *result,
32                                    struct parser_data *data,
33                                    size_t datalen, int *errnop);
34 libc_hidden_proto (_nss_files_parse_grent)
35
36 #define DECLARE_NSS_PROTOTYPES(service)                                    \
37 extern enum nss_status _nss_ ## service ## _setgrent (int);                \
38 extern enum nss_status _nss_ ## service ## _endgrent (void);               \
39 extern enum nss_status _nss_ ## service ## _getgrgid_r                     \
40                        (gid_t gid, struct group *grp, char *buffer,        \
41                         size_t buflen, int *errnop);                       \
42 extern enum nss_status _nss_ ## service ## _getgrnam_r                     \
43                        (const char *name, struct group *grp,               \
44                         char *buffer, size_t buflen, int *errnop);         \
45 extern enum nss_status _nss_ ## service ##_getgrent_r                      \
46                        (struct group *result, char *buffer, size_t buflen, \
47                         int *errnop);                                      \
48 extern enum nss_status _nss_ ## service ##_initgroups_dyn                  \
49                        (const char *user, gid_t group, long int *start,    \
50                         long int *size, gid_t **groupsp, long int limit,   \
51                         int *errnop);
52
53 DECLARE_NSS_PROTOTYPES (compat)
54 DECLARE_NSS_PROTOTYPES (files)
55 DECLARE_NSS_PROTOTYPES (hesiod)
56 DECLARE_NSS_PROTOTYPES (nis)
57 DECLARE_NSS_PROTOTYPES (nisplus)
58
59 #undef DECLARE_NSS_PROTOTYPES
60 #endif