X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/856d2e527d20faf46ce40734e858c7cc92b2f704..a4388683f1b20020b5425c59c401d6ab673860de:/src/common/dynlib.cpp diff --git a/src/common/dynlib.cpp b/src/common/dynlib.cpp index 6fcdf2cd63..cab20994b9 100644 --- a/src/common/dynlib.cpp +++ b/src/common/dynlib.cpp @@ -31,7 +31,7 @@ // System dependent include // --------------------------------------------------------------------------- -#ifdef __UNIX__ +#if defined(__UNIX__) #include #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();