]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dynlib.cpp
added directories for Motif headers and libs under Solaris to the search path
[wxWidgets.git] / src / common / dynlib.cpp
index 6fcdf2cd631e03d6659e637b2f442cc1cb73d49c..cab20994b9cc2233ca36c75df127f7fd5801ad0b 100644 (file)
@@ -31,7 +31,7 @@
 // System dependent include
 // ---------------------------------------------------------------------------
 
-#ifdef __UNIX__ 
+#if defined(__UNIX__)
 #include <dlfcn.h>
 #endif
 
@@ -71,7 +71,7 @@ wxLibrary::wxLibrary(void *handle)
 wxLibrary::~wxLibrary()
 {
   if (m_handle && m_destroy) {
-#ifdef __UNIX__
+#if defined(__UNIX__)
     dlclose(m_handle);
 #endif
 #ifdef __WINDOWS__
@@ -115,7 +115,7 @@ void wxLibrary::PrepareClasses(wxClassInfo *first)
 
 void *wxLibrary::GetSymbol(const wxString& symbname)
 {
-#ifdef __UNIX__
+#if defined(__UNIX__)
   return dlsym(m_handle, WXSTRINGCAST symbname);
 #endif
 #ifdef __WINDOWS__
@@ -175,8 +175,12 @@ wxLibrary *wxLibraries::LoadLibrary(const wxString& name)
 
 #ifdef UNICODE
   HMODULE handle = LoadLibraryW(lib_name);
+#else
+#ifdef __WIN16__
+  HMODULE handle = ::LoadLibrary(lib_name);
 #else
   HMODULE handle = LoadLibraryA(lib_name);
+#endif
 #endif
   if (!handle)
     return NULL;
@@ -199,7 +203,7 @@ wxObject *wxLibraries::CreateObject(const wxString& path)
 
   while (node) {
     obj = ((wxLibrary *)node->Data())->CreateObject(path);
-    if (obj) 
+    if (obj)
       return obj;
 
     node = node->Next();