From df5361af0f848b130a7445234eb9d5add3424d06 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 7 Jul 2000 19:45:13 +0000 Subject: [PATCH] compilation fix for S_ISDIR and VC++ git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7707 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/filefn.h | 1 + src/common/filefn.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/wx/filefn.h b/include/wx/filefn.h index c90b482522..0be6462ddb 100644 --- a/include/wx/filefn.h +++ b/include/wx/filefn.h @@ -107,6 +107,7 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; #define O_CREAT _O_CREAT #define O_BINARY _O_BINARY + #define S_IFMT _S_IFMT #define S_IFDIR _S_IFDIR #define S_IFREG _S_IFREG #endif // O_RDONLY diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 6363e17663..679fc5cb89 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -1169,7 +1169,7 @@ bool wxPathExists(const wxChar *pszPathName) wxStructStat st; return wxStat(wxFNSTRINGCAST strPath.fn_str(), &st) == 0 && - S_ISDIR(st.st_mode); + ((st.st_mode & S_IFMT) == S_IFDIR); } // Get a temporary filename, opening and closing the file.