X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e7e1b01eb55e59e555860c7ce181f176b8bbf4e2..a7c8e710e944fc12a81a19d06fe415a92e86bb13:/src/unix/utilsunx.cpp?ds=inline diff --git a/src/unix/utilsunx.cpp b/src/unix/utilsunx.cpp index ffbde3589f..da7aa73531 100644 --- a/src/unix/utilsunx.cpp +++ b/src/unix/utilsunx.cpp @@ -948,6 +948,7 @@ bool wxGetUserName(wxChar *buf, int sz) return FALSE; } +#ifndef __WXMAC__ wxString wxGetOsDescription() { #ifndef WXWIN_OS_DESCRIPTION @@ -956,6 +957,7 @@ wxString wxGetOsDescription() return WXWIN_OS_DESCRIPTION; #endif } +#endif // this function returns the GUI toolkit version in GUI programs, but OS // version in non-GUI ones @@ -1014,8 +1016,9 @@ long wxGetFreeMemory() bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree) { #if defined(HAVE_STATFS) || defined(HAVE_STATVFS) + // the case to "char *" is needed for AIX 4.3 struct statfs fs; - if ( statfs(path, &fs) != 0 ) + if ( statfs((char *)path.fn_str(), &fs) != 0 ) { wxLogSysError("Failed to get file system statistics"); @@ -1063,8 +1066,10 @@ bool wxGetEnv(const wxString& var, wxString *value) bool wxSetEnv(const wxString& variable, const wxChar *value) { #if defined(HAVE_SETENV) - return setenv(variable.mb_str(), value ? wxString(value).mb_str().data() - : NULL, 1 /* overwrite */) == 0; + return setenv(variable.mb_str(), + value ? (const char *)wxString(value).mb_str() + : NULL, + 1 /* overwrite */) == 0; #elif defined(HAVE_PUTENV) wxString s = variable; if ( value ) @@ -1091,7 +1096,7 @@ bool wxSetEnv(const wxString& variable, const wxChar *value) #include -static void wxFatalSignalHandler(wxTYPE_SA_HANDLER) +extern "C" void wxFatalSignalHandler(wxTYPE_SA_HANDLER) { if ( wxTheApp ) { @@ -1160,6 +1165,8 @@ bool wxHandleFatalExceptions(bool doit) // error and debug output routines (deprecated, use wxLog) // ---------------------------------------------------------------------------- +#if WXWIN_COMPATIBILITY_2_2 + void wxDebugMsg( const char *format, ... ) { va_list ap; @@ -1186,3 +1193,5 @@ void wxFatalError( const wxString &msg, const wxString &title ) exit(3); // the same exit code as for abort() } +#endif // WXWIN_COMPATIBILITY_2_2 +