Merge branch 'dynlib-simplify'

Enhance wxDynamicLibrary error logging and simplify code by not checking
for dlopen() and dlerror() that are always available nowadays.

See https://github.com/wxWidgets/wxWidgets/pull/1849
This commit is contained in:
Vadim Zeitlin
2020-05-21 02:13:10 +02:00
11 changed files with 43 additions and 231 deletions

View File

@@ -29,9 +29,6 @@ class WXDLLIMPEXP_FWD_BASE wxDynamicLibraryDetailsCreator;
#elif defined(HAVE_DLOPEN)
#include <dlfcn.h>
typedef void *wxDllType;
#elif defined(HAVE_SHL_LOAD)
#include <dl.h>
typedef shl_t wxDllType;
#elif defined(__WXMAC__)
#include <CodeFragments.h>
typedef CFragConnectionID wxDllType;
@@ -357,11 +354,9 @@ protected:
// common part of GetSymbol() and HasSymbol()
void* DoGetSymbol(const wxString& name, bool* success = NULL) const;
#ifdef HAVE_DLERROR
// log the error after a dlxxx() function failure
static void Error();
#endif // HAVE_DLERROR
// log the error after an OS dynamic library function failure
static void ReportError(const wxString& msg,
const wxString& name = wxString());
// the handle to DLL or NULL
wxDllType m_handle;

View File

@@ -87,7 +87,6 @@
#define SIZEOF_LONG_LONG 8
#define wxSIZE_T_IS_ULONG 1
#define wxWCHAR_T_IS_REAL_TYPE 1
#define HAVE_DLERROR 1
#define HAVE_FCNTL 1
#define HAVE_GETHOSTBYNAME 1
#define HAVE_GETSERVBYNAME 1