From: Vadim Zeitlin Date: Wed, 3 Oct 2007 00:36:08 +0000 (+0000) Subject: some (blind) compilation fixes after wxString/Unicode changes X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ce903b6f06bb2c3846654e98e9c598b96ac1d82a some (blind) compilation fixes after wxString/Unicode changes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/os2/utils.cpp b/src/os2/utils.cpp index 00aafc22cb..142878fd26 100644 --- a/src/os2/utils.cpp +++ b/src/os2/utils.cpp @@ -226,7 +226,7 @@ unsigned long wxGetProcessId() bool wxGetEnv(const wxString& var, wxString *value) { // wxGetenv is defined as getenv() - wxChar *p = wxGetenv(var); + wxChar *p = wxGetenv((const wxChar *)var); if ( !p ) return false; @@ -238,7 +238,7 @@ bool wxGetEnv(const wxString& var, wxString *value) return true; } -bool wxSetEnv(const wxString& variable, const char *value) +static bool wxDoSetEnv(const wxString& variable, const char *value) { #if defined(HAVE_SETENV) return setenv(variable.mb_str(), value, 1 /* overwrite */) == 0; @@ -395,11 +395,7 @@ const wxChar* wxGetHomeDir( } // Hack for OS/2 -#if wxUSE_UNICODE -const wxMB2WXbuf wxGetUserHome( const wxString &rUser ) -#else // just for binary compatibility -- there is no 'const' here wxChar* wxGetUserHome ( const wxString &rUser ) -#endif { wxChar* zHome; wxString sUser1(rUser); @@ -466,7 +462,7 @@ bool wxGetDiskSpace(const wxString& path, if (wxDirExists(fn.GetFullPath()) == false) return false; - disknum = 1 + wxToupper(fn.GetVolume().GetChar(0)) - _T('A'); + disknum = wxToupper(fn.GetVolume().GetChar(0)) - _T('A') + 1; rc = ::DosQueryFSInfo(disknum, // 1 = A, 2 = B, 3 = C, ... FSIL_ALLOC, // allocation info