diff Python/importdl.c @ 7114:fa09372f7872 legacy-trunk

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.
author Guido van Rossum <guido@python.org>
date Mon, 19 Jan 1998 22:03:52 +0000
parents 2e3acb2140bf
children c8745d205122
line wrap: on
line diff
--- a/Python/importdl.c	Mon Jan 19 22:00:38 1998 +0000
+++ b/Python/importdl.c	Mon Jan 19 22:03:52 1998 +0000
@@ -53,7 +53,8 @@
    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 @@
 #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 @@
 #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