This had better fix S_ISREG on Windows

This commit is contained in:
Jack Andersen 2016-12-28 12:05:48 -10:00
parent 7fb2e91f81
commit 0869c7b5b5
2 changed files with 8 additions and 1 deletions

View File

@ -320,6 +320,14 @@ static inline int Rename(const SystemChar* oldpath, const SystemChar* newpath)
#endif #endif
} }
#if !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG)
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif
#if !defined(S_ISDIR) && defined(S_IFMT) && defined(S_IFDIR)
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif
static inline int Stat(const SystemChar* path, Sstat* statOut) static inline int Stat(const SystemChar* path, Sstat* statOut)
{ {
#if CARD_UCS2 #if CARD_UCS2

View File

@ -4,7 +4,6 @@
#include <string.h> #include <string.h>
#include <algorithm> #include <algorithm>
#include <memory> #include <memory>
#include <sys/stat.h>
namespace kabufuda namespace kabufuda
{ {