libc: Fix S_IS* macros
This commit is contained in:
parent
48df90e636
commit
458e0a87cc
@ -8,9 +8,11 @@
|
||||
#define S_IFDIR 040000
|
||||
#define S_IFCHR 050000
|
||||
|
||||
#define S_ISREG(mode) ((mode)&S_IFMT == S_IFREG)
|
||||
#define S_ISDIR(mode) ((mode)&S_IFMT == S_IFDIR)
|
||||
#define S_ISCHR(mode) ((mode)&S_IFMT == S_IFCHR)
|
||||
#define __CHECK_TYPE(mode, type) (((mode)&S_IFMT) == type)
|
||||
|
||||
#define S_ISREG(mode) __CHECK_TYPE(mode, S_IFREG)
|
||||
#define S_ISDIR(mode) __CHECK_TYPE(mode, S_IFDIR)
|
||||
#define S_ISCHR(mode) __CHECK_TYPE(mode, S_IFCHR)
|
||||
|
||||
#define S_IRWXU 0700
|
||||
#define S_IRUSR 0400
|
||||
|
Loading…
Reference in New Issue
Block a user