summaryrefslogtreecommitdiff
path: root/include/my_global.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/my_global.h')
-rw-r--r--include/my_global.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/my_global.h b/include/my_global.h
index 475ae4b27e4..2fc6e413398 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -1555,18 +1555,20 @@ do { doubleget_union _tmp; \
#define NO_EMBEDDED_ACCESS_CHECKS
#endif
-#ifdef HAVE_DLOPEN
-#if defined(__WIN__)
+#if defined(_WIN32)
#define dlsym(lib, name) GetProcAddress((HMODULE)lib, name)
#define dlopen(libname, unused) LoadLibraryEx(libname, NULL, 0)
#define dlclose(lib) FreeLibrary((HMODULE)lib)
-#elif defined(HAVE_DLFCN_H)
+#define HAVE_DLOPEN
+#endif
+
+#ifdef HAVE_DLFCN_H
#include <dlfcn.h>
#endif
+
#ifndef HAVE_DLERROR
#define dlerror() ""
#endif
-#endif
/* FreeBSD 2.2.2 does not define RTLD_NOW) */
#ifndef RTLD_NOW