X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f9ee64b1356530b7f5c957d250d2a1dcbef60f60..15c9541c9f46402266ba80944644ef71711fb65d:/src/common/dynlib.cpp?ds=sidebyside diff --git a/src/common/dynlib.cpp b/src/common/dynlib.cpp index 716ba55d7f..f293839180 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]; @@ -454,7 +457,7 @@ const char *dlerror() return dl_last_error; } -void *dlopen(const char *path, int mode /* mode is ignored */) +void *dlopen(const char *path, int WXUNUSED(mode) /* mode is ignored */) { int dyld_result; NSObjectFileImage ofile; @@ -477,11 +480,11 @@ 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; } -void *dlsym(void *handle, const char *symbol) +void *dlsym(void *WXUNUSED(handle), const char *symbol) { void *addr; @@ -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)