header file fixes: multiple include guard consistency and correctness
[musl] / include / pwd.h
1 #ifndef _PWD_H
2 #define _PWD_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #define __NEED_size_t
9 #define __NEED_uid_t
10 #define __NEED_gid_t
11
12 #ifdef _GNU_SOURCE
13 #define __NEED_FILE
14 #endif
15
16 #include <bits/alltypes.h>
17
18 struct passwd
19 {
20         char *pw_name;
21         char *pw_passwd;
22         uid_t pw_uid;
23         gid_t pw_gid;
24         char *pw_gecos;
25         char *pw_dir;
26         char *pw_shell;
27 };
28
29 void setpwent (void);
30 void endpwent (void);
31 struct passwd *getpwent (void);
32
33 struct passwd *getpwuid (uid_t);
34 struct passwd *getpwnam (const char *);
35 int getpwuid_r (uid_t, struct passwd *, char *, size_t, struct passwd **);
36 int getpwnam_r (const char *, struct passwd *, char *, size_t, struct passwd **);
37
38 #ifdef _GNU_SOURCE
39 struct passwd *fgetpwent(FILE *);
40 #endif
41
42 #ifdef __cplusplus
43 }
44 #endif
45
46 #endif