123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 |
- #ifndef _GRP_H
- #define _GRP_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) && !defined __gid_t_defined
- typedef __gid_t gid_t;
- # define __gid_t_defined
- #endif
- struct group
- {
- char *gr_name;
- char *gr_passwd;
- __gid_t gr_gid;
- char **gr_mem;
- };
- #ifdef __USE_MISC
- # define __need_FILE
- # include <stdio.h>
- #endif
- #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
- extern void setgrent (void);
- extern void endgrent (void);
- extern struct group *getgrent (void);
- #endif
- #ifdef __USE_MISC
- extern struct group *fgetgrent (FILE *__stream);
- #endif
- #ifdef __USE_GNU
- extern int putgrent (const struct group *__restrict __p,
- FILE *__restrict __f);
- #endif
- extern struct group *getgrgid (__gid_t __gid);
- extern struct group *getgrnam (const char *__name);
- #ifdef __USE_POSIX
- # ifdef __USE_MISC
- # define NSS_BUFLEN_GROUP 1024
- # endif
- # ifdef __USE_GNU
- extern int getgrent_r (struct group *__restrict __resultbuf,
- char *__restrict __buffer, size_t __buflen,
- struct group **__restrict __result);
- # endif
- extern int getgrgid_r (__gid_t __gid, struct group *__restrict __resultbuf,
- char *__restrict __buffer, size_t __buflen,
- struct group **__restrict __result);
- extern int getgrnam_r (const char *__restrict __name,
- struct group *__restrict __resultbuf,
- char *__restrict __buffer, size_t __buflen,
- struct group **__restrict __result);
- # ifdef __USE_MISC
- extern int fgetgrent_r (FILE *__restrict __stream,
- struct group *__restrict __resultbuf,
- char *__restrict __buffer, size_t __buflen,
- struct group **__restrict __result);
- # endif
- #endif
- #ifdef __USE_MISC
- # define __need_size_t
- # include <stddef.h>
- extern int setgroups (size_t __n, const __gid_t *__groups) __THROW;
- extern int getgrouplist (const char *__user, __gid_t __group,
- __gid_t *__groups, int *__ngroups);
- extern int initgroups (const char *__user, __gid_t __group);
- #endif
- __END_DECLS
- #endif
|