]>
Commit | Line | Data |
---|---|---|
256081f6 DG |
1 | #ifndef __wasilibc___mode_t_h |
2 | #define __wasilibc___mode_t_h | |
3 | ||
4 | #define S_IFMT \ | |
5 | (S_IFBLK | S_IFCHR | S_IFDIR | S_IFIFO | S_IFLNK | S_IFREG | S_IFSOCK) | |
6 | #define S_IFBLK (0x6000) | |
7 | #define S_IFCHR (0x2000) | |
8 | #define S_IFDIR (0x4000) | |
9 | #define S_IFLNK (0xa000) | |
10 | #define S_IFREG (0x8000) | |
11 | #define S_IFSOCK (0xc000) | |
12 | #define S_IFIFO (0xc000) | |
13 | ||
14 | #define S_ISBLK(m) (((m)&S_IFMT) == S_IFBLK) | |
15 | #define S_ISCHR(m) (((m)&S_IFMT) == S_IFCHR) | |
16 | #define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) | |
17 | #define S_ISFIFO(m) (((m)&S_IFMT) == S_IFIFO) | |
18 | #define S_ISLNK(m) (((m)&S_IFMT) == S_IFLNK) | |
19 | #define S_ISREG(m) (((m)&S_IFMT) == S_IFREG) | |
20 | #define S_ISSOCK(m) (((m)&S_IFMT) == S_IFSOCK) | |
21 | ||
22 | #define S_IXOTH (0x1) | |
23 | #define S_IWOTH (0x2) | |
24 | #define S_IROTH (0x4) | |
25 | #define S_IRWXO (S_IXOTH | S_IWOTH | S_IROTH) | |
26 | #define S_IXGRP (0x8) | |
27 | #define S_IWGRP (0x10) | |
28 | #define S_IRGRP (0x20) | |
29 | #define S_IRWXG (S_IXGRP | S_IWGRP | S_IRGRP) | |
30 | #define S_IXUSR (0x40) | |
31 | #define S_IWUSR (0x80) | |
32 | #define S_IRUSR (0x100) | |
33 | #define S_IRWXU (S_IXUSR | S_IWUSR | S_IRUSR) | |
34 | #define S_ISVTX (0x200) | |
35 | #define S_ISGID (0x400) | |
36 | #define S_ISUID (0x800) | |
37 | ||
38 | #endif |