1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
$NetBSD: patch-ae,v 1.1 2003/05/10 00:26:34 jtb Exp $
--- Src/dynload.c.orig
+++ Src/dynload.c
@@ -46,11 +46,15 @@
# include <dld.h>
#endif
-#if defined(NETBSD1)
+#if defined(NETBSD)
+#if defined(__ELF__)
+# include <dlfcn.h>
+#else
# include <sys/types.h>
# include <nlist.h>
# include <link.h>
# define dlerror() "error unknown" /* dlerror() isn't implemented in NetBSD 1.0 */
+#endif
# define DLOPEN_COMPATIBLE
#endif
@@ -172,7 +176,7 @@
#endif /* MSC_VER WIN32 */
-#if defined(SUNOS4) || defined(SUNOS5) || defined(NETBSD1) || defined(FREEBSD) || defined(IRIX5) || defined(OSF1) ||defined(LINUX_ELF)
+#if defined(SUNOS4) || defined(SUNOS5) || defined(NETBSD) || defined(FREEBSD) || defined(IRIX5) || defined(OSF1) ||defined(LINUX_ELF)
#define MAKE_STAT_PTR(p) (STk_make_Cpointer(ANONYMOUS_STAT_PTR_ID, (p), TRUE))
#define MAKE_DYN_PTR(p) (STk_make_Cpointer(ANONYMOUS_DYN_PTR_ID, (p), FALSE))
@@ -360,7 +364,7 @@
for (p = path, slash = p-1; *p; p++) /* Find position of last '/' */
if (*p == '/') slash = p;
-#if defined(NETBSD1)
+#if defined(NETBSD) && !defined(__ELF__)
sprintf(fct_name, "_STk_init_%s", slash + 1);
#else
sprintf(fct_name, "STk_init_%s", slash + 1);
|