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
40
41
42
43
44
45
|
$NetBSD: patch-ae,v 1.2 2006/01/12 15:04:18 joerg Exp $
--- Src/dynload.c.orig 1999-09-26 15:02:14.000000000 +0000
+++ Src/dynload.c
@@ -46,16 +46,19 @@
# 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
-#if defined(FREEBSD)
-# define dlerror() "error unknown" /* dlerror() isn't implemented in FreeBSD too */
+#if defined(FREEBSD) || defined(DRAGONFLY)
# define DLOPEN_COMPATIBLE
#endif
@@ -172,7 +175,7 @@ static void load_and_call(char *path, ch
#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) || defined(DRAGONFLY)
#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 +363,7 @@ void STk_load_object_file(char *path)
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);
|