clock_adjtime: add time64 support, decouple 32-bit time_t, fix x32
[musl.git] / include / grp.h
blob27e8c5e6c67260deaed574cd91e5c865ef82320f
1 #ifndef _GRP_H
2 #define _GRP_H
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
8 #include <features.h>
10 #define __NEED_size_t
11 #define __NEED_gid_t
13 #ifdef _GNU_SOURCE
14 #define __NEED_FILE
15 #endif
17 #include <bits/alltypes.h>
19 struct group {
20 char *gr_name;
21 char *gr_passwd;
22 gid_t gr_gid;
23 char **gr_mem;
26 struct group *getgrgid(gid_t);
27 struct group *getgrnam(const char *);
29 int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
30 int getgrnam_r(const char *, struct group *, char *, size_t, struct group **);
32 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
33 struct group *getgrent(void);
34 void endgrent(void);
35 void setgrent(void);
36 #endif
38 #ifdef _GNU_SOURCE
39 struct group *fgetgrent(FILE *);
40 int putgrent(const struct group *, FILE *);
41 #endif
43 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
44 int getgrouplist(const char *, gid_t, gid_t *, int *);
45 int setgroups(size_t, const gid_t *);
46 int initgroups(const char *, gid_t);
47 #endif
49 #ifdef __cplusplus
51 #endif
53 #endif