Lucio Andrés Illanes Albornoz 61f3f4
diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h
621cd7
index ea9996a9..40a470f8 100644
Lucio Andrés Illanes Albornoz 61f3f4
--- a/include/private/gcconfig.h
Lucio Andrés Illanes Albornoz 61f3f4
+++ b/include/private/gcconfig.h
621cd7
@@ -110,6 +110,20 @@ EXTERN_C_BEGIN
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
Lucio Andrés Illanes Albornoz 61f3f4
+
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
+
621cd7
+    int __gc_data_start_mark__[1];
621cd7
+    int __gc_data_end_mark__[1];
621cd7
+#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__)
621cd7
 #   define NETBSD
621cd7
@@ -514,7 +528,7 @@ EXTERN_C_BEGIN
621cd7
 #   define mach_type_known
621cd7
 # elif (defined(__i386__) || defined(i386)) \
621cd7
        && (defined(DARWIN) || defined(LINUX) || defined(FREEBSD) \
621cd7
-            || defined(NETBSD) || defined(OPENBSD) || defined(__QNX__))
621cd7
+            || defined(NETBSD) || defined(OPENBSD) || defined(__QNX__) || defined(MIDIPIX))
621cd7
 #   define I386
621cd7
 #   define mach_type_known
621cd7
 # elif (defined(__ia64) || defined(__ia64__)) && defined(LINUX)
621cd7
@@ -567,7 +581,7 @@ EXTERN_C_BEGIN
621cd7
 #   define mach_type_known
621cd7
 # elif (defined(__x86_64) || defined(__x86_64__) || defined(__amd64__)) \
621cd7
        && (defined(DARWIN) || defined(LINUX) || defined(FREEBSD) \
621cd7
-            || defined(NETBSD) || defined(OPENBSD))
621cd7
+            || defined(NETBSD) || defined(OPENBSD) || defined(MIDIPIX))
621cd7
 #   define X86_64
621cd7
 #   define mach_type_known
Lucio Andrés Illanes Albornoz (arab, vxp) 8a0f36
 # endif
621cd7
@@ -1416,6 +1430,13 @@ EXTERN_C_BEGIN
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 */
621cd7
@@ -2193,6 +2214,13 @@ EXTERN_C_BEGIN
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)
621cd7
@@ -2520,7 +2548,7 @@ EXTERN_C_BEGIN
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) \
Lucio Andrés Illanes Albornoz 61f3f4
-    || defined(AIX) || defined(DARWIN) || defined(OSF1)
Lucio Andrés Illanes Albornoz 61f3f4
+    || defined(AIX) || defined(DARWIN) || defined(OSF1) || 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