X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/96b35b25058613874c8cc738d2bfef04eb366a5c..af4168e2cfbeffbe3b53380471aa31e9ab63a598:/src/unix/dlunix.cpp diff --git a/src/unix/dlunix.cpp b/src/unix/dlunix.cpp index 4e2d7553dc..881ea77687 100644 --- a/src/unix/dlunix.cpp +++ b/src/unix/dlunix.cpp @@ -1,10 +1,9 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: unix/dlunix.cpp +// Name: src/unix/dlunix.cpp // Purpose: Unix-specific part of wxDynamicLibrary and related classes // Author: Vadim Zeitlin // Modified by: // Created: 2005-01-16 (extracted from common/dynlib.cpp) -// RCS-ID: $Id$ // Copyright: (c) 2000-2005 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -65,15 +64,6 @@ // constants // ---------------------------------------------------------------------------- -// standard shared libraries extensions for different Unix versions -#if defined(__HPUX__) - const wxString wxDynamicLibrary::ms_dllext(".sl"); -#elif defined(__DARWIN__) - const wxString wxDynamicLibrary::ms_dllext(".bundle"); -#else - const wxString wxDynamicLibrary::ms_dllext(".so"); -#endif - // ============================================================================ // wxDynamicLibrary implementation // ============================================================================ @@ -116,7 +106,7 @@ static void *wx_darwin_dlopen(const char *path, int WXUNUSED(mode) /* mode is ig { handle = NULL; - static const char *errorStrings[] = + static const char *const errorStrings[] = { "%d: Object Image Load Failure", "%d: Object Image Load Success", @@ -256,7 +246,7 @@ wxDllType wxDynamicLibrary::GetProgramHandle() wxDllType wxDynamicLibrary::RawLoad(const wxString& libname, int flags) { wxASSERT_MSG( !(flags & wxDL_NOW) || !(flags & wxDL_LAZY), - _T("wxDL_LAZY and wxDL_NOW are mutually exclusive.") ); + wxT("wxDL_LAZY and wxDL_NOW are mutually exclusive.") ); #ifdef USE_POSIX_DL_FUNCS // we need to use either RTLD_NOW or RTLD_LAZY because if we call dlopen() @@ -354,22 +344,22 @@ public: { wxDynamicLibraryDetails *details = new wxDynamicLibraryDetails; details->m_path = path; - details->m_name = path.AfterLast(_T('/')); + details->m_name = path.AfterLast(wxT('/')); details->m_address = start; details->m_length = (char *)end - (char *)start; // try to extract the library version from its name - const size_t posExt = path.rfind(_T(".so")); + const size_t posExt = path.rfind(wxT(".so")); if ( posExt != wxString::npos ) { - if ( path.c_str()[posExt + 3] == _T('.') ) + if ( path.c_str()[posExt + 3] == wxT('.') ) { // assume "libfoo.so.x.y.z" case details->m_version.assign(path, posExt + 4, wxString::npos); } else { - size_t posDash = path.find_last_of(_T('-'), posExt); + size_t posDash = path.find_last_of(wxT('-'), posExt); if ( posDash != wxString::npos ) { // assume "libbar-x.y.z.so" case @@ -390,7 +380,7 @@ wxDynamicLibraryDetailsArray wxDynamicLibrary::ListLoaded() #ifdef __LINUX__ // examine /proc/self/maps to find out what is loaded in our address space - wxFFile file(_T("/proc/self/maps")); + wxFFile file(wxT("/proc/self/maps")); if ( file.IsOpened() ) { // details of the module currently being parsed @@ -420,13 +410,13 @@ wxDynamicLibraryDetailsArray wxDynamicLibrary::ListLoaded() default: // chop '\n' buf[strlen(buf) - 1] = '\0'; - wxLogDebug(_T("Failed to parse line \"%s\" in /proc/self/maps."), + wxLogDebug(wxT("Failed to parse line \"%s\" in /proc/self/maps."), buf); continue; } wxASSERT_MSG( start >= endCur, - _T("overlapping regions in /proc/self/maps?") ); + wxT("overlapping regions in /proc/self/maps?") ); wxString pathNew = wxString::FromAscii(path); if ( pathCur.empty() )