-#include "wx/dynload.h"
-
-// ----------------------------------------------------------------------------
-// conditional compilation
-// ----------------------------------------------------------------------------
-
-#if defined(__WXPM__) || defined(__EMX__)
-#define INCL_DOS
-#include <os2.h>
-#define wxDllOpen(error, lib, handle) DosLoadModule(error, sizeof(error), lib, &handle)
-#define wxDllGetSymbol(handle, modaddr) DosQueryProcAddr(handle, 1L, NULL, (PFN*)modaddr)
-#define wxDllClose(handle) DosFreeModule(handle)
-
-#elif defined(HAVE_DLOPEN)
- // note about dlopen() flags: we use RTLD_NOW to have more Windows-like
- // behaviour (Win won't let you load a library with missing symbols) and
- // RTLD_GLOBAL because it is needed sometimes and probably doesn't hurt
- // otherwise. On True64-Unix RTLD_GLOBAL is not allowed and on VMS the
- // second argument on dlopen is ignored.
-
-#ifdef __VMS
-#define wxDllOpen(lib) dlopen(lib.fn_str(), 0)
-
-#elif defined( __osf__ )
-#define wxDllOpen(lib) dlopen(lib.fn_str(), RTLD_LAZY)
-
-#else
-#define wxDllOpen(lib) dlopen(lib.fn_str(), RTLD_LAZY | RTLD_GLOBAL)
-#endif // __VMS
-
-#define wxDllGetSymbol(handle, name) dlsym(handle, name)
-#define wxDllClose dlclose
-
-#elif defined(HAVE_SHL_LOAD)
-#define wxDllOpen(lib) shl_load(lib.fn_str(), BIND_DEFERRED, 0)
-#define wxDllClose shl_unload
-
-static inline void *wxDllGetSymbol(shl_t handle, const wxString& name)
-{
- void *sym;
- return ( shl_findsym(&handle, name.mb_str(), TYPE_UNDEFINED, &sym) == 0 )
- ? sym : 0;
-}
-
-#elif defined(__DARWIN__)
-
- // Porting notes:
- // The dlopen port is a port from dl_next.xs by Anno Siegel.
- // dl_next.xs is itself a port from dl_dlopen.xs by Paul Marquess.
- // The method used here is just to supply the sun style dlopen etc.
- // functions in terms of Darwin NS*.
-
-void *dlopen(const char *path, int mode); // mode is ignored
-void *dlsym(void *handle, const char *symbol);
-int dlclose(void *handle);
-const char *dlerror(void);
-
-#define wxDllOpen(lib) dlopen(lib.fn_str(), 0)
-#define wxDllGetSymbol(handle, name) dlsym(handle, name)
-#define wxDllClose dlclose
-
-#elif defined(__WINDOWS__)
-
- // using LoadLibraryEx under Win32 to avoid name clash with LoadLibrary
-
-#ifdef __WIN32__
-
-#ifdef _UNICODE
-#define wxDllOpen(lib) ::LoadLibraryExW(lib, 0, 0)
-#else
-#define wxDllOpen(lib) ::LoadLibraryExA(lib, 0, 0)
-#endif
-
-#else // Win16
-#define wxDllOpen(lib) ::LoadLibrary(lib)
-#endif // Win32/16
-#define wxDllGetSymbol(handle, name) ::GetProcAddress(handle, name)
-#define wxDllClose ::FreeLibrary
-
-#elif defined(__WXMAC__)
-#define wxDllClose(handle) CloseConnection(&handle)
-#else
-#error "Don't know how to load shared libraries on this platform."
-#endif