X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c2ff79b17b1f3e8117e23179340cf69a85b5fe61..f76dbc4d52c005b63745cf924efe30eece4c6f79:/src/common/dynlib.cpp?ds=sidebyside

diff --git a/src/common/dynlib.cpp b/src/common/dynlib.cpp
index f0ac7a1516..8ad47c2b83 100644
--- a/src/common/dynlib.cpp
+++ b/src/common/dynlib.cpp
@@ -183,12 +183,15 @@ void *wxLibrary::GetSymbol(const wxString& symbname)
 wxDllType
 wxDllLoader::GetProgramHandle(void)
 {
-#ifdef __UNIX__
-    return dlopen(NULL, RTLD_NOW/*RTLD_LAZY*/);
+#if defined( HAVE_DLOPEN )
+   // optain handle for main program
+   return dlopen(NULL, RTLD_NOW/*RTLD_LAZY*/); 
+#elif defined (HAVE_SHL_LOAD)
+   // shl_findsymbol with NULL handle looks up in main program
+   return 0; 
 #else
-    wxFAIL_MSG(_("This method is not implemented under Windows or OS/2"));
-
-    return 0;
+   wxFAIL_MSG(_("This method is not implemented under Windows or OS/2"));
+   return 0;
 #endif
 }
 
@@ -273,7 +276,7 @@ wxDllLoader::GetSymbol(wxDllType dllHandle, const wxString &name)
 // wxLibraries (only one instance should normally exist)
 // ---------------------------------------------------------------------------
 
-wxLibraries::wxLibraries()
+wxLibraries::wxLibraries():m_loaded(wxKEY_STRING)
 {
 }
 
@@ -319,7 +322,7 @@ wxLibrary *wxLibraries::LoadLibrary(const wxString& name)
     const char *envLibPath = getenv("LD_LIBRARY_PATH");
     if ( envLibPath )
         libPath << ':' << envLibPath;
-    wxStringTokenizer tokenizer(libPath, _T(':'));
+    wxStringTokenizer tokenizer(libPath, wxT(':'));
     while ( tokenizer.HasMoreToken() )
     {
         wxString fullname(tokenizer.NextToken());