1 // MyLinux.h 2 3 #ifndef __MY_LIN_LINUX_H 4 #define __MY_LIN_LINUX_H 5 6 #define MY_LIN_S_IFMT 00170000 7 #define MY_LIN_S_IFSOCK 0140000 8 #define MY_LIN_S_IFLNK 0120000 9 #define MY_LIN_S_IFREG 0100000 10 #define MY_LIN_S_IFBLK 0060000 11 #define MY_LIN_S_IFDIR 0040000 12 #define MY_LIN_S_IFCHR 0020000 13 #define MY_LIN_S_IFIFO 0010000 14 15 #define MY_LIN_S_ISLNK(m) (((m) & MY_LIN_S_IFMT) == MY_LIN_S_IFLNK) 16 #define MY_LIN_S_ISREG(m) (((m) & MY_LIN_S_IFMT) == MY_LIN_S_IFREG) 17 #define MY_LIN_S_ISDIR(m) (((m) & MY_LIN_S_IFMT) == MY_LIN_S_IFDIR) 18 #define MY_LIN_S_ISCHR(m) (((m) & MY_LIN_S_IFMT) == MY_LIN_S_IFCHR) 19 #define MY_LIN_S_ISBLK(m) (((m) & MY_LIN_S_IFMT) == MY_LIN_S_IFBLK) 20 #define MY_LIN_S_ISFIFO(m) (((m) & MY_LIN_S_IFMT) == MY_LIN_S_IFIFO) 21 #define MY_LIN_S_ISSOCK(m) (((m) & MY_LIN_S_IFMT) == MY_LIN_S_IFSOCK) 22 23 #define MY_LIN_S_ISUID 0004000 24 #define MY_LIN_S_ISGID 0002000 25 #define MY_LIN_S_ISVTX 0001000 26 27 #define MY_LIN_S_IRWXU 00700 28 #define MY_LIN_S_IRUSR 00400 29 #define MY_LIN_S_IWUSR 00200 30 #define MY_LIN_S_IXUSR 00100 31 32 #define MY_LIN_S_IRWXG 00070 33 #define MY_LIN_S_IRGRP 00040 34 #define MY_LIN_S_IWGRP 00020 35 #define MY_LIN_S_IXGRP 00010 36 37 #define MY_LIN_S_IRWXO 00007 38 #define MY_LIN_S_IROTH 00004 39 #define MY_LIN_S_IWOTH 00002 40 #define MY_LIN_S_IXOTH 00001 41 42 #endif 43