getaddrinfo: add EAI_NODATA error code to distinguish NODATA vs NxDomain
[musl.git] / include / pwd.h
blob4f470b558b15f950e2ae4152c15dea08495b3127
1 #ifndef _PWD_H
2 #define _PWD_H
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
8 #include <features.h>
10 #define __NEED_size_t
11 #define __NEED_uid_t
12 #define __NEED_gid_t
14 #ifdef _GNU_SOURCE
15 #define __NEED_FILE
16 #endif
18 #include <bits/alltypes.h>
20 struct passwd {
21 char *pw_name;
22 char *pw_passwd;
23 uid_t pw_uid;
24 gid_t pw_gid;
25 char *pw_gecos;
26 char *pw_dir;
27 char *pw_shell;
30 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
31 void setpwent (void);
32 void endpwent (void);
33 struct passwd *getpwent (void);
34 #endif
36 struct passwd *getpwuid (uid_t);
37 struct passwd *getpwnam (const char *);
38 int getpwuid_r (uid_t, struct passwd *, char *, size_t, struct passwd **);
39 int getpwnam_r (const char *, struct passwd *, char *, size_t, struct passwd **);
41 #ifdef _GNU_SOURCE
42 struct passwd *fgetpwent(FILE *);
43 int putpwent(const struct passwd *, FILE *);
44 #endif
46 #ifdef __cplusplus
48 #endif
50 #endif