Add definitions for the S_IS* macros.
This commit is contained in:
parent
1fa4a1a2a1
commit
2892dbdf5f
|
@ -144,6 +144,11 @@ int _wstati64(const MSVCRT(wchar_t)*,struct _stati64*);
|
||||||
#define S_IWRITE _S_IWRITE
|
#define S_IWRITE _S_IWRITE
|
||||||
#define S_IEXEC _S_IEXEC
|
#define S_IEXEC _S_IEXEC
|
||||||
|
|
||||||
|
#define S_ISCHR(m) (((m)&_S_IFMT) == _S_IFCHR)
|
||||||
|
#define S_ISDIR(m) (((m)&_S_IFMT) == _S_IFDIR)
|
||||||
|
#define S_ISFIFO(m) (((m)&_S_IFMT) == _S_IFIFO)
|
||||||
|
#define S_ISREG(m) (((m)&_S_IFMT) == _S_IFREG)
|
||||||
|
|
||||||
static inline int fstat(int fd, struct stat* ptr) { return _fstat(fd, (struct _stat*)ptr); }
|
static inline int fstat(int fd, struct stat* ptr) { return _fstat(fd, (struct _stat*)ptr); }
|
||||||
static inline int stat(const char* path, struct stat* ptr) { return _stat(path, (struct _stat*)ptr); }
|
static inline int stat(const char* path, struct stat* ptr) { return _stat(path, (struct _stat*)ptr); }
|
||||||
#ifndef MSVCRT_UMASK_DEFINED
|
#ifndef MSVCRT_UMASK_DEFINED
|
||||||
|
|
Loading…
Reference in New Issue