// constants
// ----------------------------------------------------------------------------
-#if defined(__VISAGECPP__) && __IBMCPP__ >= 400
-const off_t wxInvalidOffset = (off_t)-1;
-#endif
-
#define _MAXPATHLEN 500
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
// ============================================================================
#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