1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 **************************************************************************** 11 ****************************************************************************/ 12 #ifndef _LINUX_STAT_H 13 #define _LINUX_STAT_H 14 15 #if !defined(__GLIBC__) || __GLIBC__ < 2 16 17 #define S_IFMT 00170000 18 #define S_IFSOCK 0140000 19 #define S_IFLNK 0120000 20 #define S_IFREG 0100000 21 #define S_IFBLK 0060000 22 #define S_IFDIR 0040000 23 #define S_IFCHR 0020000 24 #define S_IFIFO 0010000 25 #define S_ISUID 0004000 26 #define S_ISGID 0002000 27 #define S_ISVTX 0001000 28 29 #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) 30 #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) 31 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) 32 #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) 33 #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) 34 #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) 35 #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) 36 37 #define S_IRWXU 00700 38 #define S_IRUSR 00400 39 #define S_IWUSR 00200 40 #define S_IXUSR 00100 41 42 #define S_IRWXG 00070 43 #define S_IRGRP 00040 44 #define S_IWGRP 00020 45 #define S_IXGRP 00010 46 47 #define S_IRWXO 00007 48 #define S_IROTH 00004 49 #define S_IWOTH 00002 50 #define S_IXOTH 00001 51 52 #endif 53 54 #endif 55