X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f9ee64b1356530b7f5c957d250d2a1dcbef60f60..a2d541ca9c552d1a30ba75970968a7a220f4955a:/src/common/dynlib.cpp diff --git a/src/common/dynlib.cpp b/src/common/dynlib.cpp index 716ba55d7f..91981e3061 100644 --- a/src/common/dynlib.cpp +++ b/src/common/dynlib.cpp @@ -416,13 +416,16 @@ wxObject *wxLibraries::CreateObject(const wxString& path) return NULL; } -#ifdef __DARWIN__ +#endif // wxUSE_DYNLIB_CLASS && !wxUSE_DYNAMIC_LOADER + +#if defined(__DARWIN__) && (wxUSE_DYNLIB_CLASS || wxUSE_DYNAMIC_LOADER) // --------------------------------------------------------------------------- // For Darwin/Mac OS X // supply the sun style dlopen functions in terms of Darwin NS* // --------------------------------------------------------------------------- -#import +#include +#include static char dl_last_error[1024]; @@ -477,7 +480,7 @@ void *dlopen(const char *path, int mode /* mode is ignored */) int dlclose(void *handle) { - NSUnLinkModule( m_handle, NSUNLINKMODULE_OPTION_NONE); + NSUnLinkModule( handle, NSUNLINKMODULE_OPTION_NONE); return 0; } @@ -494,6 +497,4 @@ void *dlsym(void *handle, const char *symbol) return addr; } -#endif // __DARWIN__ - -#endif // wxUSE_DYNLIB_CLASS +#endif // defined(__DARWIN__) && (wxUSE_DYNLIB_CLASS || wxUSE_DYNAMIC_LOADER)