From 71c97a89faf9af9f23d6f66528cadbe871586d0f Mon Sep 17 00:00:00 2001 From: David Webster Date: Fri, 21 Jul 2000 20:44:39 +0000 Subject: [PATCH] fixes for S_IFMT for OS/2 from WX_2_2_BRANCH git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/filefn.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 50b3fad413..9c79a5d13a 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -1176,9 +1176,15 @@ bool wxPathExists(const wxChar *pszPathName) #endif // __WINDOWS__ wxStructStat st; - +#ifndef __VISAGECPP__ return wxStat(wxFNSTRINGCAST strPath.fn_str(), &st) == 0 && ((st.st_mode & S_IFMT) == S_IFDIR); +#else + // S_IFMT not supported in VA compilers.. st_mode is a 2byte value only + return wxStat(wxFNSTRINGCAST strPath.fn_str(), &st) == 0 && + (st.st_mode == S_IFDIR); +#endif + } // Get a temporary filename, opening and closing the file.