Go to the documentation of this file. 1 #ifndef _UAPI_LINUX_STAT_H
2 #define _UAPI_LINUX_STAT_H
5 #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
7 #define S_IFMT 00170000
8 #define S_IFSOCK 0140000
9 #define S_IFLNK 0120000
10 #define S_IFREG 0100000
11 #define S_IFBLK 0060000
12 #define S_IFDIR 0040000
13 #define S_IFCHR 0020000
14 #define S_IFIFO 0010000
15 #define S_ISUID 0004000
16 #define S_ISGID 0002000
17 #define S_ISVTX 0001000
19 #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
20 #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
21 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
22 #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
23 #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
24 #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
25 #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)