chiark / gitweb /
37622c86d621d9c3a888ad4b56c2cd9ed4a69d68
[elogind.git] / klibc_fixups.h
1 #ifdef __KLIBC__
2
3 #ifndef KLIBC_FIXUPS_H
4 #define KLIBC_FIXUPS_H 
5
6
7 #define WTERMSIG(status)        ((status) & 0x7f)
8 #define WEXITSTATUS(status)     (((status) & 0xff00) >> 8)
9 #define WIFEXITED(status)       (WTERMSIG(status) == 0)
10
11
12 struct group {
13         char    *gr_name;       /* group name */
14         char    *gr_passwd;     /* group password */
15         gid_t   gr_gid;         /* group id */
16         char    **gr_mem;       /* group members */
17 };
18
19 static inline struct group *getgrnam(const char *name)
20 {
21         return NULL;
22 }
23
24
25 struct passwd {
26         char    *pw_name;       /* user name */
27         char    *pw_passwd;     /* user password */
28         uid_t   pw_uid;         /* user id */
29         gid_t   pw_gid;         /* group id */
30         char    *pw_gecos;      /* real name */
31         char    *pw_dir;        /* home directory */
32         char    *pw_shell;      /* shell program */
33 };
34
35 static inline struct passwd *getpwnam(const char *name)
36 {
37         return NULL;
38 }
39
40
41 #endif
42
43 #endif