X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/254a21292b0ccf234ed1dbc6acd37708672ffcc0..842215bbb7b87bd3800f95f3d633da0690e18b76:/src/common/filefn.cpp?ds=sidebyside diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index eab5a6c4b0..c33c44c174 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -104,7 +104,7 @@ static wxChar wxFileFunctionsBuffer[4*_MAXPATHLEN]; // VisualAge C++ V4.0 cannot have any external linkage const decs // in headers included by more than one primary source // -const off_t wxInvalidOffset = (off_t)-1; +const int wxInvalidOffset = -1; #endif // ---------------------------------------------------------------------------- @@ -298,7 +298,11 @@ wxFileExists (const wxString& filename) return (ret != (DWORD)-1) && !(ret & FILE_ATTRIBUTE_DIRECTORY); #else // !__WIN32__ wxStructStat st; - return wxStat(filename, &st) == 0 && (st.st_mode & S_IFREG); +#ifndef wxNEED_WX_UNISTD_H + return wxStat( filename.fn_str() , &st) == 0 && (st.st_mode & S_IFREG); +#else + return wxStat( filename , &st) == 0 && (st.st_mode & S_IFREG); +#endif #endif // __WIN32__/!__WIN32__ }