X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6fdbbb007344d6e606c7b20b4ff6fd010d68e801..bcaa23de098c1276b3f35716c9ea8b73cf3599bd:/src/common/filefn.cpp diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index cc53efde61..25935ed14f 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -130,6 +130,14 @@ extern wxChar *wxBuffer; static wxChar wxFileFunctionsBuffer[4*_MAXPATHLEN]; +#if defined(__VISAGECPP__) && __IBMCPP__ >= 400 +// +// 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; +#endif + // ============================================================================ // implementation // ============================================================================ @@ -1773,9 +1781,10 @@ void WXDLLEXPORT wxSplitPath(const wxChar *pszFileName, #else // assume Unix const wxChar *pLastSeparator = wxStrrchr(pszFileName, wxFILE_SEP_PATH_UNIX); - if ( pDot == pszFileName ) + if ( (pDot == pszFileName) || (*(pDot - 1) == wxFILE_SEP_PATH_UNIX) ) { - // under Unix files like .profile are treated in a special way + // under Unix, dot may be (and commonly is) the first character of the + // filename, don't treat the entire filename as extension in this case pDot = NULL; } #endif // MSW/Unix