Merge pull request #1304 from slluis/mac-proxy-autoconfig
[mono.git] / libgc / include / private / gcconfig.h
index c264b164a4135978cf8ad27b091173828562d5a9..3cbab919b940b448ad20511d686465ea2f261fe7 100644 (file)
@@ -55,7 +55,7 @@
 # endif
 
 /* And one for FreeBSD: */
-# if defined(__FreeBSD__) && !defined(FREEBSD)
+# if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && !defined(FREEBSD)
 #    define FREEBSD
 # endif
 
@@ -67,7 +67,7 @@
 /* Determine the machine type: */
 # if defined(__native_client__)
 #    define NACL
-#    if !defined(__portable_native_client__)
+#    if !defined(__portable_native_client__) && !defined(__arm__)
 #        define I386
 #        define mach_type_known
 #    else
 #      ifndef GC_FREEBSD_THREADS
 #          define MPROTECT_VDB
 #      endif
-#      define SIG_SUSPEND SIGTSTP
-#      define SIG_THR_RESTART SIGCONT
+#       ifdef __GLIBC__
+#           define SIG_SUSPEND          (32+6)
+#           define SIG_THR_RESTART      (32+5)
+            extern int _end[];
+#           define DATAEND (_end)
+#       else
+#           define SIG_SUSPEND SIGTSTP
+#           define SIG_THR_RESTART SIGCONT
+#       endif
 #      define FREEBSD_STACKBOTTOM
 #      ifdef __ELF__
 #          define DYNAMIC_LOADING
 #      ifndef GC_FREEBSD_THREADS
 #          define MPROTECT_VDB
 #      endif
-#      define SIG_SUSPEND SIGTSTP
-#      define SIG_THR_RESTART SIGCONT
+#      ifdef __GLIBC__
+#          define SIG_SUSPEND          (32+6)
+#          define SIG_THR_RESTART      (32+5)
+           extern int _end[];
+#          define DATAEND (_end)
+#      else
+#          define SIG_SUSPEND SIGUSR1
+#          define SIG_THR_RESTART SIGUSR2
+#      endif
 #      define NEED_FIND_LIMIT
 #      define FREEBSD_STACKBOTTOM
 #      ifdef __ELF__
 #   define SUNOS5SIGS
 # endif
 
-# if defined(FREEBSD) && (__FreeBSD__ >= 4)
+# if defined(FREEBSD) && ((__FreeBSD__ >= 4) || (__FreeBSD_kernel__ >= 4))
 #   define SUNOS5SIGS
 # endif
 
 #   define CACHE_LINE_SIZE 32  /* Wild guess   */
 # endif
 
-# ifdef LINUX
+# if defined(LINUX) || defined(__GLIBC__)
 #   define REGISTER_LIBRARIES_EARLY
     /* We sometimes use dl_iterate_phdr, which may acquire an internal */
     /* lock.  This isn't safe after the world has stopped.  So we must */
 #if defined(SPARC)
 # define CAN_SAVE_CALL_ARGS
 #endif
-#if (defined(I386) || defined(X86_64)) && defined(LINUX)
+#if (defined(I386) || defined(X86_64)) && (defined(LINUX) || defined(__GLIBC__))
            /* SAVE_CALL_CHAIN is supported if the code is compiled to save     */
            /* frame pointers by default, i.e. no -fomit-frame-pointer flag.    */
 # define CAN_SAVE_CALL_ARGS