blob: ab0257c93643e8ca8d0ce8b8bb8442fc9421a6f1 (
plain)
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
|
$NetBSD: patch-be,v 1.2 2000/01/20 14:12:50 pooka Exp $
--- gc/os_dep.c.orig Thu Oct 21 22:06:15 1999
+++ gc/os_dep.c Thu Dec 30 22:15:23 1999
@@ -156,6 +156,19 @@
}
#endif
+#if defined(NETBSD) && defined(__ELF__)
+ ptr_t GC_data_start;
+
+ void GC_init_netbsd_elf()
+ {
+ extern ptr_t GC_find_limit();
+ extern char **environ;
+ /* This may need to be environ, without the underscore, for */
+ /* some versions. */
+ GC_data_start = GC_find_limit((ptr_t)&environ, FALSE);
+ }
+#endif
+
# ifdef OS2
# include <stddef.h>
@@ -2437,7 +2450,7 @@
# if defined (DRSNX)
# include <sys/sparc/frame.h>
# else
-# if defined(OPENBSD)
+# if defined(OPENBSD) || defined(NETBSD)
# include <frame.h>
# else
# include <sys/frame.h>
@@ -2452,7 +2465,7 @@
/* Fill in the pc and argument information for up to NFRAMES of my */
/* callers. Ignore my frame and my callers frame. */
-#ifdef OPENBSD
+#if defined(OPENBSD) || defined(NETBSD)
# define FR_SAVFP fr_fp
# define FR_SAVPC fr_pc
#else
|