summaryrefslogtreecommitdiffhomepage
path: root/patches/bdwgc.local.patch
blob: 62b52c870eee56bf305624ae0a12a968325169da (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
diff -ru bdwgc.orig/include/private/gcconfig.h bdwgc/include/private/gcconfig.h
--- bdwgc.orig/include/private/gcconfig.h	2019-04-25 16:08:37.996677359 +0200
+++ bdwgc/include/private/gcconfig.h	2019-04-25 16:22:53.456682549 +0200
@@ -109,6 +109,10 @@
 #   define LINUX
 # endif
 
+# if defined(__midipix__)
+#    define MIDIPIX
+# endif
+
 /* And one for NetBSD: */
 # if defined(__NetBSD__)
 #    define NETBSD
@@ -345,6 +349,16 @@
 #    define X86_64
 #    define mach_type_known
 # endif
+# if defined(MIDIPIX)
+#    if defined(__i386__)
+#      define I386
+#      define mach_type_known
+#    endif
+#    if defined(__x86_64__)
+#      define X86_64
+#      define mach_type_known
+#    endif
+# endif
 # if defined(LINUX) && (defined(i386) || defined(__i386__))
 #    define I386
 #    define mach_type_known
@@ -1538,6 +1552,12 @@
           EXTERN_C_BEGIN
 #       endif
 #   endif
+#   ifdef MIDIPIX
+#      define OS_TYPE "MIDIPIX"
+#      define DATASTART (ptr_t)NULL /* Wrong */
+#      define DATAEND (ptr_t)NULL /* Wrong */
+#      define STACKBOTTOM (ptr_t)0x000000 /* Not sure if we should be using STACKBOTTOM or LINUX_STACK... */
+#   endif
 #   ifdef CYGWIN32
 #       define OS_TYPE "CYGWIN32"
 #       define DATASTART ((ptr_t)GC_DATASTART)  /* From gc.h */
@@ -2656,6 +2676,12 @@
           EXTERN_C_BEGIN
 #       endif
 #   endif
+#   ifdef MIDIPIX
+#      define OS_TYPE "MIDIPIX"
+#      define DATASTART (ptr_t)NULL /* Wrong */
+#      define DATAEND (ptr_t)NULL /* Wrong */
+#      define STACKBOTTOM (ptr_t)0x000000 /* Not sure if we should be using STACKBOTTOM or LINUX_STACK... */
+#   endif
 #   ifdef DARWIN
 #     define OS_TYPE "DARWIN"
 #     define DARWIN_DONT_PARSE_STACK 1
@@ -3259,7 +3285,7 @@
 # if defined(GC_IRIX_THREADS) && !defined(IRIX5)
 #   error Inconsistent configuration
 # endif
-# if defined(GC_LINUX_THREADS) && !defined(LINUX) && !defined(NACL)
+# if defined(GC_LINUX_THREADS) && !defined(LINUX) && !defined(NACL) && !defined(MIDIPIX)
 #   error Inconsistent configuration
 # endif
 # if defined(GC_NETBSD_THREADS) && !defined(NETBSD)
diff -ru bdwgc.orig/os_dep.c bdwgc/os_dep.c
--- bdwgc.orig/os_dep.c	2019-04-25 16:08:38.000677359 +0200
+++ bdwgc/os_dep.c	2019-04-25 16:11:21.272678349 +0200
@@ -33,7 +33,7 @@
 #endif
 
 #if defined(UNIX_LIKE) || defined(CYGWIN32) || defined(NACL) \
-    || defined(SYMBIAN)
+    || defined(SYMBIAN) || defined(MIDIPIX)
 # include <fcntl.h>
 #endif
 
diff -ru bdwgc.orig/pthread_stop_world.c bdwgc/pthread_stop_world.c
--- bdwgc.orig/pthread_stop_world.c	2019-04-25 16:08:38.000677359 +0200
+++ bdwgc/pthread_stop_world.c	2019-04-25 16:23:19.820682709 +0200
@@ -21,6 +21,10 @@
     !defined(GC_DARWIN_THREADS) && !defined(SN_TARGET_ORBIS) \
     && !defined(SN_TARGET_PSP2)
 
+#ifdef MIDIPIX
+# include <sys/select.h>
+#endif
+
 #ifdef NACL
 
 # include <unistd.h>