X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c4e41ce37ac7bcb43663241439cee68ebeff7ffc..303313165165302d5f95b234a79c83413ec9c8c8:/src/common/filefn.cpp diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 7f54e8896d..de78ad948a 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -59,12 +59,19 @@ #ifndef __MWERKS__ #include #include +#else +#ifdef __MACH__ +#include +#include +#include +#include #else #include #include #include #include #endif +#endif #ifdef __UNIX__ #include @@ -117,6 +124,11 @@ #include #include "wx/msw/mslu.h" + // for _getcwd + #ifdef __MINGW32__ + #include + #endif + // sys/cygwin.h is needed for cygwin_conv_to_full_win32_path() // // note that it must be included after @@ -124,10 +136,6 @@ #ifdef __CYGWIN__ #include #endif - - #ifndef __TWIN32__ - #include - #endif #endif // __GNUWIN32__ #endif // __WINDOWS__ @@ -1399,7 +1407,7 @@ wxString wxFindFirstFile(const wxChar *spec, int flags) wxSplitPath(spec, &gs_dirPath, NULL, NULL); if ( gs_dirPath.IsEmpty() ) gs_dirPath = wxT("."); - if ( gs_dirPath.Last() != wxFILE_SEP_PATH ) + if ( !wxEndsWithPathSeparator(gs_dirPath ) ) gs_dirPath << wxFILE_SEP_PATH; if (gs_dir) @@ -1490,7 +1498,7 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz) if ( needsANSI ) #endif // wxUSE_UNICODE { - #ifdef _MSC_VER + #if defined(_MSC_VER) || defined(__MINGW32__) ok = _getcwd(cbuf, sz) != NULL; #elif defined(__WXMAC__) && !defined(__DARWIN__) FSSpec cwdSpec ;