X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/98438730495809c7ebde7edee634e72265d1fe81..f54632db33bc3ccc834cc5bcb6405fae6e26ed6e:/src/common/filefn.cpp diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index e3be7dfb7b..afc6b6705e 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -79,6 +79,9 @@ #if defined __MWERKS__ || defined __CYGWIN__ #include #endif + #if defined __WINE__ + extern "C" { long _get_osfhandle(int); } + #endif #endif // __WINDOWS__ #if defined(__VMS__) @@ -189,8 +192,8 @@ void wxPathList::AddEnvList (const wxString& envVariable) wxT(" :;"); #endif - wxChar *val = wxGetenv (WXSTRINGCAST envVariable); - if (val && *val) + wxString val ; + if (wxGetEnv (WXSTRINGCAST envVariable, &val)) { wxChar *s = MYcopystring (val); wxChar *save_ptr, *token = wxStrtok (s, PATH_TOKS, &save_ptr); @@ -1011,7 +1014,7 @@ wxCopyFile (const wxString& file1, const wxString& file2, bool overwrite) return false; } #elif defined(__OS2__) - if ( ::DosCopy(file2, file2, overwrite ? DCPY_EXISTING : 0) != 0 ) + if ( ::DosCopy((PSZ)file1.c_str(), (PSZ)file2.c_str(), overwrite ? DCPY_EXISTING : 0) != 0 ) return false; #elif defined(__PALMOS__) // TODO with http://www.palmos.com/dev/support/docs/protein_books/Memory_Databases_Files/ @@ -1236,7 +1239,7 @@ bool wxDirExists(const wxChar *pszPathName) return (ret != (DWORD)-1) && (ret & FILE_ATTRIBUTE_DIRECTORY); #elif defined(__OS2__) - return (::DosSetCurrentDir(WXSTRINGCAST strPath)); + return (::DosSetCurrentDir((PSZ)(WXSTRINGCAST strPath))); #else // !__WIN32__ wxStructStat st;