X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad41e209075bf049c135595a117987a896014fdd..fd749f4a7050095cc4773279ed681ceaf30c9cb3:/src/unix/dlunix.cpp diff --git a/src/unix/dlunix.cpp b/src/unix/dlunix.cpp index efe3f7e2ef..2c9fec3b3c 100644 --- a/src/unix/dlunix.cpp +++ b/src/unix/dlunix.cpp @@ -65,11 +65,11 @@ // standard shared libraries extensions for different Unix versions #if defined(__HPUX__) - const wxChar *wxDynamicLibrary::ms_dllext = _T(".sl"); + const wxString wxDynamicLibrary::ms_dllext(".sl"); #elif defined(__DARWIN__) - const wxChar *wxDynamicLibrary::ms_dllext = _T(".bundle"); + const wxString wxDynamicLibrary::ms_dllext(".bundle"); #else - const wxChar *wxDynamicLibrary::ms_dllext = _T(".so"); + const wxString wxDynamicLibrary::ms_dllext(".so"); #endif // ============================================================================ @@ -271,14 +271,12 @@ void *wxDynamicLibrary::RawGetSymbol(wxDllType handle, const wxString& name) /* static */ void wxDynamicLibrary::Error() { -#if wxUSE_UNICODE - wxWCharBuffer buffer = wxConvLocal.cMB2WC( dlerror() ); - const wxChar *err = buffer; -#else - const wxChar *err = dlerror(); -#endif + wxString err(dlerror()); + + if ( err.empty() ) + err = _("Unknown dynamic library error"); - wxLogError(wxT("%s"), err ? err : _("Unknown dynamic library error")); + wxLogError(wxT("%s"), err); } #endif // wxHAVE_DYNLIB_ERROR