summaryrefslogtreecommitdiff
path: root/Python/importdl.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-01-19 22:03:52 +0000
committerGuido van Rossum <guido@python.org>1998-01-19 22:03:52 +0000
commit1152d9f1a23065554697deb45a55a2d0bcad6ff7 (patch)
tree2c2adf4825335070b123ecc594d03a90d78129f0 /Python/importdl.c
parentbecf0188e580191d1769a61e2a11ddec8d0ce668 (diff)
downloadcpython-1152d9f1a23065554697deb45a55a2d0bcad6ff7.tar.gz
Better #ifdefs for NetBSD, taking into account that at least on netBSD
1.3, dlopen() etc. are fully implemented, including dlerror(). From Jaromir Dolecek and Ty Sarna.
Diffstat (limited to 'Python/importdl.c')
-rw-r--r--Python/importdl.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/Python/importdl.c b/Python/importdl.c
index 477b104845..40b37d2a3e 100644
--- a/Python/importdl.c
+++ b/Python/importdl.c
@@ -53,7 +53,8 @@ PERFORMANCE OF THIS SOFTWARE.
SHORT_EXT -- short extension for dynamic module, e.g. ".so"
LONG_EXT -- long extension, e.g. "module.so"
hpux -- HP-UX Dynamic Linking - defined by the compiler
- __NetBSD__ -- NetBSD shared libraries (not quite SVR4 compatible)
+ __NetBSD__ -- NetBSD shared libraries
+ (assuming dlerror() was introduced between 1.2 and 1.3)
__FreeBSD__ -- FreeBSD shared libraries
(The other WITH_* symbols are used only once, to set the
@@ -88,7 +89,11 @@ typedef int (* APIENTRY dl_funcptr)();
#define LONG_EXT ".dll"
#endif
-#if defined(__NetBSD__)
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
+#if defined(__NetBSD__) && (NetBSD < 199712)
#define DYNAMIC_LINK
#define USE_SHLIB
@@ -157,7 +162,7 @@ static void aix_loaderror(char *);
#ifdef USE_SHLIB
#include <sys/types.h>
#include <sys/stat.h>
-#if defined(__NetBSD__)
+#if defined(__NetBSD__) && (NetBSD < 199712)
#include <nlist.h>
#include <link.h>
#else