Lucio Andrés Illanes Albornoz 77690b
diff -ru bdwgc.orig/include/private/gcconfig.h bdwgc/include/private/gcconfig.h
Lucio Andrés Illanes Albornoz 77690b
--- bdwgc.orig/include/private/gcconfig.h	2019-04-25 16:08:37.996677359 +0200
Lucio Andrés Illanes Albornoz 77690b
+++ bdwgc/include/private/gcconfig.h	2019-04-25 16:22:53.456682549 +0200
Lucio Andrés Illanes Albornoz 77690b
@@ -109,6 +109,10 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 #   define LINUX
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 # endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
+# if defined(__midipix__)
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
+#    define MIDIPIX
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
+# endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
+
Lucio Andrés Illanes Albornoz 77690b
 /* And one for NetBSD: */
Lucio Andrés Illanes Albornoz 77690b
 # if defined(__NetBSD__)
Lucio Andrés Illanes Albornoz 77690b
 #    define NETBSD
Lucio Andrés Illanes Albornoz 77690b
@@ -345,6 +349,16 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 #    define X86_64
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 #    define mach_type_known
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 # endif
Lucio Andrés Illanes Albornoz 77690b
+# if defined(MIDIPIX)
Lucio Andrés Illanes Albornoz 77690b
+#    if defined(__i386__)
Lucio Andrés Illanes Albornoz 77690b
+#      define I386
Lucio Andrés Illanes Albornoz 77690b
+#      define mach_type_known
Lucio Andrés Illanes Albornoz 77690b
+#    endif
Lucio Andrés Illanes Albornoz 77690b
+#    if defined(__x86_64__)
Lucio Andrés Illanes Albornoz 77690b
+#      define X86_64
Lucio Andrés Illanes Albornoz 77690b
+#      define mach_type_known
Lucio Andrés Illanes Albornoz 77690b
+#    endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
+# endif
Lucio Andrés Illanes Albornoz 77690b
 # if defined(LINUX) && (defined(i386) || defined(__i386__))
Lucio Andrés Illanes Albornoz 77690b
 #    define I386
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 #    define mach_type_known
Lucio Andrés Illanes Albornoz 77690b
@@ -1538,6 +1552,12 @@
Lucio Andrés Illanes Albornoz cd4df3
           EXTERN_C_BEGIN
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 #       endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 #   endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
+#   ifdef MIDIPIX
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
+#      define OS_TYPE "MIDIPIX"
Lucio Andrés Illanes Albornoz 77690b
+#      define DATASTART (ptr_t)NULL /* Wrong */
Lucio Andrés Illanes Albornoz 77690b
+#      define DATAEND (ptr_t)NULL /* Wrong */
Lucio Andrés Illanes Albornoz 77690b
+#      define STACKBOTTOM (ptr_t)0x000000 /* Not sure if we should be using STACKBOTTOM or LINUX_STACK... */
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
+#   endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 #   ifdef CYGWIN32
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 #       define OS_TYPE "CYGWIN32"
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 #       define DATASTART ((ptr_t)GC_DATASTART)  /* From gc.h */
Lucio Andrés Illanes Albornoz 77690b
@@ -2656,6 +2676,12 @@
Lucio Andrés Illanes Albornoz cd4df3
           EXTERN_C_BEGIN
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 #       endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 #   endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
+#   ifdef MIDIPIX
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
+#      define OS_TYPE "MIDIPIX"
Lucio Andrés Illanes Albornoz 77690b
+#      define DATASTART (ptr_t)NULL /* Wrong */
Lucio Andrés Illanes Albornoz 77690b
+#      define DATAEND (ptr_t)NULL /* Wrong */
Lucio Andrés Illanes Albornoz 77690b
+#      define STACKBOTTOM (ptr_t)0x000000 /* Not sure if we should be using STACKBOTTOM or LINUX_STACK... */
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
+#   endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 #   ifdef DARWIN
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 #     define OS_TYPE "DARWIN"
Lucio Andrés Illanes Albornoz 77690b
 #     define DARWIN_DONT_PARSE_STACK 1
Lucio Andrés Illanes Albornoz 77690b
@@ -3259,7 +3285,7 @@
Lucio Andrés Illanes Albornoz cd4df3
 # if defined(GC_IRIX_THREADS) && !defined(IRIX5)
Lucio Andrés Illanes Albornoz cd4df3
 #   error Inconsistent configuration
Lucio Andrés Illanes Albornoz cd4df3
 # endif
Lucio Andrés Illanes Albornoz cd4df3
-# if defined(GC_LINUX_THREADS) && !defined(LINUX) && !defined(NACL)
Lucio Andrés Illanes Albornoz cd4df3
+# if defined(GC_LINUX_THREADS) && !defined(LINUX) && !defined(NACL) && !defined(MIDIPIX)
Lucio Andrés Illanes Albornoz cd4df3
 #   error Inconsistent configuration
Lucio Andrés Illanes Albornoz cd4df3
 # endif
Lucio Andrés Illanes Albornoz cd4df3
 # if defined(GC_NETBSD_THREADS) && !defined(NETBSD)
Lucio Andrés Illanes Albornoz 77690b
diff -ru bdwgc.orig/os_dep.c bdwgc/os_dep.c
Lucio Andrés Illanes Albornoz 77690b
--- bdwgc.orig/os_dep.c	2019-04-25 16:08:38.000677359 +0200
Lucio Andrés Illanes Albornoz 77690b
+++ bdwgc/os_dep.c	2019-04-25 16:11:21.272678349 +0200
Lucio Andrés Illanes Albornoz 77690b
@@ -33,7 +33,7 @@
Lucio Andrés Illanes Albornoz 77690b
 #endif
Lucio Andrés Illanes Albornoz 77690b
 
Lucio Andrés Illanes Albornoz 77690b
 #if defined(UNIX_LIKE) || defined(CYGWIN32) || defined(NACL) \
Lucio Andrés Illanes Albornoz 77690b
-    || defined(SYMBIAN)
Lucio Andrés Illanes Albornoz 77690b
+    || defined(SYMBIAN) || defined(MIDIPIX)
Lucio Andrés Illanes Albornoz 77690b
 # include <fcntl.h>
Lucio Andrés Illanes Albornoz 77690b
 #endif
Lucio Andrés Illanes Albornoz 77690b
 
Lucio Andrés Illanes Albornoz 77690b
diff -ru bdwgc.orig/pthread_stop_world.c bdwgc/pthread_stop_world.c
Lucio Andrés Illanes Albornoz 77690b
--- bdwgc.orig/pthread_stop_world.c	2019-04-25 16:08:38.000677359 +0200
Lucio Andrés Illanes Albornoz 77690b
+++ bdwgc/pthread_stop_world.c	2019-04-25 16:23:19.820682709 +0200
Lucio Andrés Illanes Albornoz 77690b
@@ -21,6 +21,10 @@
Lucio Andrés Illanes Albornoz 77690b
     !defined(GC_DARWIN_THREADS) && !defined(SN_TARGET_ORBIS) \
Lucio Andrés Illanes Albornoz 77690b
     && !defined(SN_TARGET_PSP2)
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
+#ifdef MIDIPIX
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
+# include <sys/select.h>
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
+#endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
+
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 #ifdef NACL
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 # include <unistd.h>