OLD | NEW |
1 #ifndef»_GRP_H | 1 #ifndef _GRP_H |
2 #define»_GRP_H | 2 #define _GRP_H |
3 | 3 |
4 #ifdef __cplusplus | 4 #ifdef __cplusplus |
5 extern "C" { | 5 extern "C" { |
6 #endif | 6 #endif |
7 | 7 |
8 #include <features.h> | 8 #include <features.h> |
9 | 9 |
10 #define __NEED_size_t | 10 #define __NEED_size_t |
11 #define __NEED_gid_t | 11 #define __NEED_gid_t |
12 | 12 |
13 #ifdef _GNU_SOURCE | 13 #ifdef _GNU_SOURCE |
14 #define __NEED_FILE | 14 #define __NEED_FILE |
15 #endif | 15 #endif |
16 | 16 |
17 #include <bits/alltypes.h> | 17 #include <bits/alltypes.h> |
18 | 18 |
19 struct group | 19 struct group { |
20 { | 20 char* gr_name; |
21 » char *gr_name; | 21 char* gr_passwd; |
22 » char *gr_passwd; | 22 gid_t gr_gid; |
23 » gid_t gr_gid; | 23 char** gr_mem; |
24 » char **gr_mem; | |
25 }; | 24 }; |
26 | 25 |
27 struct group *getgrgid(gid_t); | 26 struct group* getgrgid(gid_t); |
28 struct group *getgrnam(const char *); | 27 struct group* getgrnam(const char*); |
29 | 28 |
30 int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **); | 29 int getgrgid_r(gid_t, struct group*, char*, size_t, struct group**); |
31 int getgrnam_r(const char *, struct group *, char *, size_t, struct group **); | 30 int getgrnam_r(const char*, struct group*, char*, size_t, struct group**); |
32 | 31 |
33 struct group *getgrent(void); | 32 struct group* getgrent(void); |
34 void endgrent(void); | 33 void endgrent(void); |
35 void setgrent(void); | 34 void setgrent(void); |
36 | 35 |
37 #ifdef _GNU_SOURCE | 36 #ifdef _GNU_SOURCE |
38 struct group *fgetgrent(FILE *stream); | 37 struct group* fgetgrent(FILE* stream); |
39 int putgrent(const struct group *, FILE *); | 38 int putgrent(const struct group*, FILE*); |
40 #endif | 39 #endif |
41 | 40 |
42 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) | 41 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) |
43 int getgrouplist(const char *, gid_t, gid_t *, int *); | 42 int getgrouplist(const char*, gid_t, gid_t*, int*); |
44 int setgroups(size_t, const gid_t *); | 43 int setgroups(size_t, const gid_t*); |
45 int initgroups(const char *, gid_t); | 44 int initgroups(const char*, gid_t); |
46 #endif | 45 #endif |
47 | 46 |
48 #ifdef __cplusplus | 47 #ifdef __cplusplus |
49 } | 48 } |
50 #endif | 49 #endif |
51 | 50 |
52 #endif | 51 #endif |
OLD | NEW |