| diff -ru bdwgc.orig/os_dep.c bdwgc/os_dep.c |
| |
| |
| @@ -32,7 +32,7 @@ |
| #endif |
| |
| #if defined(UNIX_LIKE) || defined(CYGWIN32) || defined(NACL) \ |
| - || defined(SYMBIAN) |
| + || defined(SYMBIAN) || defined(MIDIPIX) |
| # include <fcntl.h> |
| #endif |
| |
| |
| |
| @@ -108,6 +108,10 @@ |
| # define LINUX |
| # endif |
| |
| +# if defined(__midipix__) |
| +# define MIDIPIX |
| +# endif |
| + |
| /* And one for QNX: */ |
| # if defined(__QNX__) |
| # define I386 |
| @@ -362,6 +366,14 @@ |
| # define X86_64 |
| # define mach_type_known |
| # endif |
| +# if defined(MIDIPIX) && defined(__x86_64__) |
| +# define X86_64 |
| +# define mach_type_known |
| +# endif |
| +# if defined(MIDIPIX) && defined(__i386__) |
| +# define I386 |
| +# define mach_type_known |
| +# endif |
| # if defined(LINUX) && (defined(__ia64__) || defined(__ia64)) |
| # define IA64 |
| # define mach_type_known |
| @@ -1542,6 +1554,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_STACKBOTTOM & /proc/self/stat */ |
| +# endif |
| # ifdef CYGWIN32 |
| # define OS_TYPE "CYGWIN32" |
| # define DATASTART ((ptr_t)GC_DATASTART) /* From gc.h */ |
| @@ -2656,6 +2674,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_STACKBOTTOM & /proc/self/stat */ |
| +# endif |
| # ifdef DARWIN |
| # define OS_TYPE "DARWIN" |
| # define DARWIN_DONT_PARSE_STACK |
| @@ -3242,7 +3266,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) |
| |
| |
| @@ -20,6 +20,10 @@ |
| #if defined(GC_PTHREADS) && !defined(GC_WIN32_THREADS) && \ |
| !defined(GC_DARWIN_THREADS) |
| |
| +#ifdef MIDIPIX |
| +# include <sys/select.h> |
| +#endif |
| + |
| #ifdef NACL |
| |
| # include <unistd.h> |