Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 15af20a

Browse files
committed
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.
1 parent 4cc462e commit 15af20a

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

Python/importdl.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ PERFORMANCE OF THIS SOFTWARE.
5353
SHORT_EXT -- short extension for dynamic module, e.g. ".so"
5454
LONG_EXT -- long extension, e.g. "module.so"
5555
hpux -- HP-UX Dynamic Linking - defined by the compiler
56-
__NetBSD__ -- NetBSD shared libraries (not quite SVR4 compatible)
56+
__NetBSD__ -- NetBSD shared libraries
57+
(assuming dlerror() was introduced between 1.2 and 1.3)
5758
__FreeBSD__ -- FreeBSD shared libraries
5859
5960
(The other WITH_* symbols are used only once, to set the
@@ -88,7 +89,11 @@ typedef int (* APIENTRY dl_funcptr)();
8889
#define LONG_EXT ".dll"
8990
#endif
9091

91-
#if defined(__NetBSD__)
92+
#ifdef HAVE_SYS_PARAM_H
93+
#include <sys/param.h>
94+
#endif
95+
96+
#if defined(__NetBSD__) && (NetBSD < 199712)
9297
#define DYNAMIC_LINK
9398
#define USE_SHLIB
9499

@@ -157,7 +162,7 @@ static void aix_loaderror(char *);
157162
#ifdef USE_SHLIB
158163
#include <sys/types.h>
159164
#include <sys/stat.h>
160-
#if defined(__NetBSD__)
165+
#if defined(__NetBSD__) && (NetBSD < 199712)
161166
#include <nlist.h>
162167
#include <link.h>
163168
#else

0 commit comments

Comments
 (0)