You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
3.1 KiB
78 lines
3.1 KiB
--- src/dynload.cpp.dist 2003-07-16 10:25:08.000000000 +0200 |
|
+++ src/dynload.cpp 2003-07-16 10:30:42.000000000 +0200 |
|
@@ -24,7 +24,7 @@ |
|
|
|
// we need __linux__ instead of just linux since the latter is not defined when -ansi is used. |
|
|
|
-#if defined(__sparc) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(_WIN32) || defined(__OS2__) || (HAVE_DLFCN_H==1) |
|
+#if defined(__sun) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(_WIN32) || defined(__OS2__) || (HAVE_DLFCN_H==1) |
|
#define HAVESHAREDLIBS |
|
#endif |
|
|
|
@@ -47,11 +47,11 @@ |
|
#if defined(__linux) || defined(__linux__) |
|
#include <dlfcn.h> |
|
// static const char * const libsuffix = ".so"; |
|
-#elif defined(__FreeBSD__) |
|
+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) |
|
#include <dlfcn.h> |
|
#elif defined(__hpux) |
|
#include <dlfcn.h> |
|
-#elif defined(__sparc) |
|
+#elif defined(__sun) |
|
#if defined(__SVR4) |
|
#include <dlfcn.h> |
|
#else |
|
@@ -103,13 +103,13 @@ |
|
#if defined(__linux) || defined(__linux__) |
|
int loadmode = RTLD_LAZY; // RTLD_NOW |
|
handle = dlopen(fulllibname, loadmode); |
|
-#elif defined(__FreeBSD__) |
|
+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) |
|
int loadmode = RTLD_LAZY; // RTLD_NOW |
|
handle = dlopen(fulllibname, loadmode); |
|
#elif defined(__hpux) |
|
int loadmode = RTLD_LAZY; // RTLD_NOW |
|
handle = dlopen(fulllibname, loadmode); |
|
-#elif defined(__sparc) |
|
+#elif defined(__sun) |
|
int loadmode = RTLD_LAZY; // RTLD_NOW |
|
handle = dlopen(fulllibname, loadmode); |
|
#elif defined(__OS2__) |
|
@@ -146,11 +146,11 @@ |
|
if (handle) { |
|
#if defined(__linux) || defined(__linux__) |
|
dlclose(handle); |
|
-#elif defined(__FreeBSD__) |
|
+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) |
|
dlclose(handle); |
|
#elif defined(__hpux) |
|
dlclose(handle); |
|
-#elif defined(__sparc) |
|
+#elif defined(__sun) |
|
dlclose(handle); |
|
#elif defined(__OS2__) |
|
dlclose(handle); |
|
@@ -177,11 +177,11 @@ |
|
{ |
|
#if defined(__linux) || defined(__linux__) |
|
DynLoader::fptr rfptr = (DynLoader::fptr) dlsym(handle, name); //lint !e611 //: Suspicious cast |
|
-#elif defined(__FreeBSD__) |
|
+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) |
|
DynLoader::fptr rfptr = (DynLoader::fptr) dlsym(handle, name); //lint !e611 //: Suspicious cast |
|
#elif defined(__hpux) |
|
DynLoader::fptr rfptr = (DynLoader::fptr) dlsym(handle, name); //lint !e611 //: Suspicious cast |
|
-#elif defined(__sparc) |
|
+#elif defined(__sun) |
|
DynLoader::fptr rfptr = (DynLoader::fptr) dlsym(handle, name); //lint !e611 //: Suspicious cast |
|
#elif defined(__OS2__) |
|
DynLoader::fptr rfptr = (DynLoader::fptr) dlsym(handle, name); //lint !e611 //: Suspicious cast |
|
@@ -265,7 +265,7 @@ |
|
} |
|
|
|
|
|
-#if defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__sparc) || defined(__hpux) || defined(__OS2__) |
|
+#if defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__sun) || defined(__hpux) || defined(__OS2__) |
|
// for directory search |
|
#if HAVE_DIRENT_H |
|
#include <dirent.h>
|
|
|