]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
backport of patches 2.10, 2.11, 2.12, by MvL.
authorAnthony Baxter <anthonybaxter@gmail.com>
Wed, 21 Nov 2001 05:01:44 +0000 (05:01 +0000)
committerAnthony Baxter <anthonybaxter@gmail.com>
Wed, 21 Nov 2001 05:01:44 +0000 (05:01 +0000)
. Patch #455231: Support ELF properly on OpenBSD.
. Patch to bug #472202: Correctly recognize NetBSD before 199712.
. Move dlfcn.h block out of NetBSD block, assuming that NetBSD before
  199712 didn't have dlfcn.h, or that it wouldn't conflict with the other
  stuff defined.

Python/dynload_shlib.c

index 7c8bfd2c3b7e16c5946bcb37b80d54ecaff77a5c..170c18b7b9293e25d2a476103060ab6ad3ad8e3b 100644 (file)
@@ -6,17 +6,21 @@
 
 #include <sys/types.h>
 #include <sys/stat.h>
-#if defined(__NetBSD__) && (NetBSD < 199712)
+
+#if defined(__NetBSD__)
+#include <sys/param.h>
+#if (NetBSD < 199712)
 #include <nlist.h>
 #include <link.h>
 #define dlerror() "error in dynamic linking"
-#else
+#endif
+#endif /* NetBSD */
+
 #ifdef HAVE_DLFCN_H
 #include <dlfcn.h>
 #endif
-#endif
 
-#ifdef __OpenBSD__
+#if (defined(__OpenBSD__) || defined(__NetBSD__)) && !defined(__ELF__)
 #define LEAD_UNDERSCORE "_"
 #else
 #define LEAD_UNDERSCORE ""