X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0b9ab0bd824b6b9c93849928d67de1ec71e7c167..cc95f4f9477e96ac2ce9a18f410ef98a169a75a6:/src/common/dynlib.cpp diff --git a/src/common/dynlib.cpp b/src/common/dynlib.cpp index 025667914b..f105941fdc 100644 --- a/src/common/dynlib.cpp +++ b/src/common/dynlib.cpp @@ -27,7 +27,7 @@ #pragma hdrstop #endif -#if wxUSE_DYNLIB_CLASS +#if wxUSE_DYNLIB_CLASS && !wxUSE_DYNAMIC_LOADER #if defined(__WINDOWS__) #include "wx/msw/private.h" @@ -38,6 +38,10 @@ #include "wx/intl.h" #include "wx/log.h" +#if defined(__WXMAC__) + #include "wx/mac/private.h" +#endif + // ---------------------------------------------------------------------------- // conditional compilation // ---------------------------------------------------------------------------- @@ -105,7 +109,7 @@ const char *dlerror(void); # define wxDllGetSymbol(handle, name) ::GetProcAddress(handle, name) # define wxDllClose ::FreeLibrary #elif defined(__WXMAC__) -# define wxDllClose(handle) CloseConnection(&handle) +# define wxDllClose(handle) CloseConnection(&((CFragConnectionID)handle)) #else # error "Don't know how to load shared libraries on this platform." #endif // OS @@ -242,7 +246,7 @@ wxDllType wxDllLoader::LoadLibrary(const wxString & libname, bool *success) kCFragGoesToEOF, "\p", kPrivateCFragCopy, - &handle, + &((CFragConnectionID)handle), &myMainAddr, myErrName ) != noErr ) { @@ -268,7 +272,7 @@ wxDllType wxDllLoader::LoadLibrary(const wxString & libname, bool *success) wxString msg(_("Failed to load shared library '%s'")); #ifdef HAVE_DLERROR - wxChar *err = dlerror(); + const wxChar *err = dlerror(); if( err ) { failed = TRUE; @@ -310,7 +314,7 @@ void *wxDllLoader::GetSymbol(wxDllType dllHandle, const wxString &name, bool *su strcpy( (char *) symName, name ); c2pstr( (char *) symName ); #endif - if( FindSymbol( dllHandle, symName, &symAddress, &symClass ) == noErr ) + if( FindSymbol( ((CFragConnectionID)dllHandle), symName, &symAddress, &symClass ) == noErr ) symbol = (void *)symAddress; #elif defined(__WXPM__) || defined(__EMX__) @@ -327,7 +331,7 @@ void *wxDllLoader::GetSymbol(wxDllType dllHandle, const wxString &name, bool *su wxString msg(_("wxDllLoader failed to GetSymbol '%s'")); #ifdef HAVE_DLERROR - wxChar *err = dlerror(); + const wxChar *err = dlerror(); if( err ) { failed = TRUE;