X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7b0bfbb256f85a6b98fcea7fa09fde5112b964d4..8ffd43c56b793781fde046aa532340b92a0067eb:/include/wx/dynlib.h diff --git a/include/wx/dynlib.h b/include/wx/dynlib.h index 745cdddcd0..98bc1839a6 100644 --- a/include/wx/dynlib.h +++ b/include/wx/dynlib.h @@ -16,18 +16,31 @@ #pragma interface #endif +#include + +#if wxUSE_DYNLIB_CLASS + #include #include #include +// this is normally done by configure, but I leave it here for now... +#if defined(__UNIX__) && !(defined(HAVE_DLOPEN) || defined(HAVE_SHL_LOAD)) + #if defined(__LINUX__) || defined(__SOLARIS__) || defined(__SUNOS__) || defined(__FREEBSD__) + #define HAVE_DLOPEN + #elif defined(__HPUX__) + #define HAVE_SHL_LOAD + #endif // Unix flavour +#endif // !Unix or already have some HAVE_xxx defined + #if defined(HAVE_DLOPEN) #include typedef void *wxDllType; -#elif defined(HAVE_SHLLOAD) +#elif defined(HAVE_SHL_LOAD) #include - typedef void *wxDllType; + typedef shl_t wxDllType; #elif defined(__WINDOWS__) #include @@ -53,7 +66,7 @@ public: wxHashTable classTable; public: - wxLibrary(void *handle); + wxLibrary(wxDllType handle); ~wxLibrary(); // Get a symbol from the dynamic library @@ -103,4 +116,6 @@ wxClassInfo *wxGetClassFirst() { \ return wxClassInfo::GetFirst(); \ } +#endif // wxUSE_DYNLIB_CLASS + #endif // _WX_DYNLIB_H__