Blame patches/bdwgc.local.patch

834a5a
diff -ru bdwgc.orig/include/private/gcconfig.h bdwgc/include/private/gcconfig.h
834a5a
--- bdwgc.orig/include/private/gcconfig.h	2023-02-07 14:35:54.616933050 +0100
834a5a
+++ bdwgc/include/private/gcconfig.h	2023-02-07 14:41:11.028698667 +0100
834a5a
@@ -110,6 +110,20 @@
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__)
621cd7
+#   define MIDIPIX
621cd7
+#   include <fcntl.h>
621cd7
+#   include <sys/select.h>
Lucio Andrés Illanes Albornoz 61f3f4
+
621cd7
+#   include <psxtypes/psxtypes.h>
621cd7
+#   include <pemagine/pemagine.h>
621cd7
+#   include <ntapi/nt_thread.h>
Lucio Andrés Illanes Albornoz 61f3f4
+
834a5a
+int __gc_data_start_mark__[1];
834a5a
+int __gc_data_end_mark__[1];
621cd7
+#endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
+
834a5a
+
Lucio Andrés Illanes Albornoz 77690b
 /* And one for NetBSD: */
Lucio Andrés Illanes Albornoz 77690b
 # if defined(__NetBSD__)
621cd7
 #   define NETBSD
834a5a
@@ -527,7 +541,7 @@
621cd7
 #   define mach_type_known
834a5a
 # elif (defined(__i386__) || defined(i386) || defined(__X86__)) \
621cd7
        && (defined(DARWIN) || defined(LINUX) || defined(FREEBSD) \
834a5a
-            || defined(NETBSD) || defined(OPENBSD) || defined(QNX))
834a5a
+            || defined(NETBSD) || defined(OPENBSD) || defined(QNX) || defined(MIDIPIX))
621cd7
 #   define I386
621cd7
 #   define mach_type_known
621cd7
 # elif (defined(__ia64) || defined(__ia64__)) && defined(LINUX)
834a5a
@@ -584,7 +598,7 @@
834a5a
 # elif (defined(__x86_64) || defined(__x86_64__) || defined(__amd64__) \
834a5a
         || defined(__X86_64__)) \
621cd7
        && (defined(DARWIN) || defined(LINUX) || defined(FREEBSD) \
834a5a
-            || defined(NETBSD) || defined(OPENBSD) || defined(QNX))
834a5a
+            || defined(NETBSD) || defined(OPENBSD) || defined(QNX) || defined(MIDIPIX))
621cd7
 #   define X86_64
621cd7
 #   define mach_type_known
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 # endif
834a5a
@@ -1464,6 +1478,13 @@
621cd7
 #         define SOFT_VDB
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 61f3f4
+#      define DATASTART   ((ptr_t)__gc_data_start_mark__)
Lucio Andrés Illanes Albornoz 61f3f4
+#      define DATAEND     ((ptr_t)__gc_data_end_mark__)
Lucio Andrés Illanes Albornoz 61f3f4
+#      define STACKBOTTOM (ptr_t)(((nt_tib *)pe_get_teb_address())->stack_base)
Lucio Andrés Illanes Albornoz 61f3f4
+#      define USE_MMAP_ANON
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
+#   endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 #   ifdef CYGWIN32
Lucio Andrés Illanes Albornoz 61f3f4
 #       define WOW64_THREAD_CONTEXT_WORKAROUND
621cd7
 #       define DATASTART ((ptr_t)GC_DATASTART)  /* From gc.h */
834a5a
@@ -2259,6 +2280,13 @@
621cd7
 #         define SOFT_VDB
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
621cd7
+#       define OS_TYPE "MIDIPIX"
621cd7
+#       define DATASTART   ((ptr_t)__gc_data_start_mark__)
621cd7
+#       define DATAEND     ((ptr_t)__gc_data_end_mark__)
621cd7
+#       define STACKBOTTOM (ptr_t)(((nt_tib *)pe_get_teb_address())->stack_base)
621cd7
+#       define USE_MMAP_ANON
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
+#   endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 #   ifdef DARWIN
Lucio Andrés Illanes Albornoz 77690b
 #     define DARWIN_DONT_PARSE_STACK 1
621cd7
 #     define STACKBOTTOM ((ptr_t)0x7fff5fc00000)
834a5a
@@ -2581,7 +2609,7 @@
Lucio Andrés Illanes Albornoz 61f3f4
 #if defined(SVR4) || defined(LINUX) || defined(IRIX5) || defined(HPUX) \
Lucio Andrés Illanes Albornoz 61f3f4
     || defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) \
Lucio Andrés Illanes Albornoz 61f3f4
     || defined(DGUX) || defined(BSD) || defined(HAIKU) || defined(HURD) \
834a5a
-    || defined(AIX) || defined(DARWIN) || defined(OSF1) || defined(QNX)
834a5a
+    || defined(AIX) || defined(DARWIN) || defined(OSF1) || defined(QNX) || defined(MIDIPIX)
Lucio Andrés Illanes Albornoz 61f3f4
 # define UNIX_LIKE      /* Basic Unix-like system calls work.   */
Lucio Andrés Illanes Albornoz 77690b
 #endif
Lucio Andrés Illanes Albornoz 77690b