X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=libgc%2Finclude%2Fprivate%2Fgcconfig.h;h=0069b8ed6119034ea54614e2bb413ca070aa9957;hb=82a1631ac4ccb2c0d8ae97acb5aa2821430bb9f5;hp=d278603a338f69976bb73ea8abafe67278f16d28;hpb=a097b5471761180c4aae2dab224ed9caeeae3e86;p=mono.git diff --git a/libgc/include/private/gcconfig.h b/libgc/include/private/gcconfig.h index d278603a338..0069b8ed611 100644 --- a/libgc/include/private/gcconfig.h +++ b/libgc/include/private/gcconfig.h @@ -59,10 +59,15 @@ # define FREEBSD # endif +/* And one for Darwin: */ +# if defined(macosx) || (defined(__APPLE__) && defined(__MACH__)) +# define DARWIN +# endif + /* Determine the machine type: */ # if defined(__arm__) || defined(__thumb__) # define ARM32 -# if !defined(LINUX) && !defined(NETBSD) +# if !defined(LINUX) && !defined(NETBSD) && !defined(DARWIN) # define NOSYS # define mach_type_known # endif @@ -297,8 +302,7 @@ # define MACOS # define mach_type_known # endif -# if defined(macosx) || (defined(__APPLE__) && defined(__MACH__)) -# define DARWIN +# ifdef DARWIN # if defined(__ppc__) || defined(__ppc64__) # define POWERPC # define mach_type_known @@ -326,6 +330,10 @@ /* There seems to be some issues with trylock hanging on darwin. This should be looked into some more */ # define NO_PTHREAD_TRYLOCK +# elif defined(__arm__) +# define ARM +# define mach_type_known +# define DARWIN_DONT_PARSE_STACK # endif # endif # if defined(NeXT) && defined(mc68000) @@ -347,6 +355,10 @@ # define I386 # define mach_type_known # endif +# if defined(FREEBSD) && defined(__x86_64__) +# define X86_64 +# define mach_type_known +# endif # if defined(__NetBSD__) && (defined(i386) || defined(__i386__)) # define I386 # define mach_type_known @@ -395,14 +407,18 @@ # else # if (defined(_MSDOS) || defined(_MSC_VER)) && (_M_IX86 >= 300) \ || defined(_WIN32) && !defined(__CYGWIN32__) && !defined(__CYGWIN__) -# define I386 -# define MSWIN32 /* or Win32s */ -# define mach_type_known -# endif -# if defined(_MSC_VER) && defined(_M_IA64) -# define IA64 -# define MSWIN32 /* Really win64, but we don't treat 64-bit */ - /* variants as a differnt platform. */ +# if defined(__LP64__) || defined(_WIN64) +# define X86_64 +# else +# define I386 +# endif +# define MSWIN32 /* or Win64 */ +# define mach_type_known +# endif +# if defined(_MSC_VER) && defined(_M_IA64) +# define IA64 +# define MSWIN32 /* Really win64, but we don't treat 64-bit */ + /* variants as a differnt platform. */ # endif # endif # if defined(__DJGPP__) @@ -1852,6 +1868,8 @@ # include # if defined(__GLIBC__) && __GLIBC__ >= 2 # define SEARCH_FOR_DATA_START +# elif defined(PLATFORM_ANDROID) +# define SEARCH_FOR_DATA_START # else extern char **__environ; # define DATASTART ((ptr_t)(&__environ)) @@ -1875,6 +1893,15 @@ # define OS_TYPE "MSWINCE" # define DATAEND /* not needed */ # endif +# ifdef DARWIN +# define OS_TYPE "DARWIN" +# define DATASTART ((ptr_t) get_etext()) +# define DATAEND ((ptr_t) get_end()) +# define STACKBOTTOM ((ptr_t) 0x30000000) +# define USE_MMAP +# define USE_MMAP_ANON +# define USE_MUNMAP +# endif # ifdef NOSYS /* __data_start is usually defined in the target linker script. */ extern int __data_start[]; @@ -1989,6 +2016,22 @@ # define PREFETCH_FOR_WRITE(x) __builtin_prefetch((x), 1) # endif # endif +# ifdef FREEBSD +# define OS_TYPE "FREEBSD" +# ifndef GC_FREEBSD_THREADS +# define MPROTECT_VDB +# endif +# define SIG_SUSPEND SIGTSTP +# define SIG_THR_RESTART SIGCONT +# define NEED_FIND_LIMIT +# define FREEBSD_STACKBOTTOM +# ifdef __ELF__ +# define DYNAMIC_LOADING +# endif + extern char etext[]; + extern char * GC_FreeBSDGetDataStart(); +# define DATASTART GC_FreeBSDGetDataStart(0x1000, &etext) +# endif # ifdef NETBSD # define OS_TYPE "NETBSD" # ifdef __ELF__