]> granicus.if.org Git - gc/commitdiff
2005-04-11 Zoltan Varga <vargaz@freemail.hu>
authorZoltan Varga <vargaz@gmail.com>
Mon, 11 Apr 2005 14:12:45 +0000 (14:12 +0000)
committerguest <ivmai@mail.ru>
Fri, 29 Jul 2011 11:24:59 +0000 (15:24 +0400)
* include/private/gcconfig.h configure.in os_dep.c dyn_load.c:
Applied some freebsd patch from Bill Middleton <flashdict@gmail.com>.

svn path=/trunk/mono/; revision=42786

ChangeLog
configure.in
dyn_load.c
include/private/gcconfig.h
os_dep.c

index a5879fa79a477f55b639284a395fb325934f4478..5af85fc10536e5447376bacc27930077acd7d5ac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
+
+       * include/private/gcconfig.h configure.in os_dep.c dyn_load.c: 
+       Applied some freebsd patch from Bill Middleton <flashdict@gmail.com>.
+
 2005-04-06  Zoltan Varga  <vargaz@freemail.hu>
 
        * solaris_pthreads.c (GC_pthread_detach): Add locking.
index bdaa5c5db13f86cffdf9360a2737acfd0ba2b3f6..707954ef743fff0b03cbb8a8d5046d1857f34b2c 100644 (file)
@@ -124,6 +124,17 @@ case "$THREADS" in
                THREADLIBS="$PTHREAD_LIBS"
        fi
        ;;
+        *-*-freebsd6*)
+        AC_DEFINE(GC_FREEBSD_THREADS)
+        if test "x$PTHREAD_CFLAGS" != "x"; then
+               INCLUDES="$INCLUDES $PTHREAD_CFLAGS"
+       fi
+       if test "x$PTHREAD_LIBS" = "x"; then
+               THREADLIBS=-lpthread
+       else
+               THREADLIBS="$PTHREAD_LIBS"
+       fi
+       ;;
      *-*-solaris*)
        AC_DEFINE(GC_SOLARIS_THREADS)
        AC_DEFINE(GC_SOLARIS_PTHREADS)
index f1431223c64984aa3b4d7e3d5f2603efa770af08..7111a874a7bb5d330952050c1b3d4cae4ecfdd61 100644 (file)
 /* Newer versions of GNU/Linux define this macro.  We
  * define it similarly for any ELF systems that don't.  */
 #  ifndef ElfW
-#    ifdef NETBSD
-#      if ELFSIZE == 32
+#    ifdef FREEBSD
+#      if __ELF_WORD_SIZE == 32
 #        define ElfW(type) Elf32_##type
 #      else
 #        define ElfW(type) Elf64_##type
 #      endif
 #    else
-#      if !defined(ELF_CLASS) || ELF_CLASS == ELFCLASS32
-#        define ElfW(type) Elf32_##type
+#      ifdef NETBSD
+#        if ELFSIZE == 32
+#          define ElfW(type) Elf32_##type
+#        else
+#          define ElfW(type) Elf64_##type
+#        endif
 #      else
-#        define ElfW(type) Elf64_##type
+#        if !defined(ELF_CLASS) || ELF_CLASS == ELFCLASS32
+#          define ElfW(type) Elf32_##type
+#        else
+#          define ElfW(type) Elf64_##type
+#        endif
 #      endif
 #    endif
-#  endif
+#  endif 
 
 #if defined(SUNOS5DL) && !defined(USE_PROC_FOR_LIBRARIES)
 
index da7a4592779b99ac6116febdaa5bc7d30ee4a2e9..16dd7cfc2ead8a6161e2016b2b99c029f7b9fa9b 100644 (file)
 #      ifndef GC_FREEBSD_THREADS
 #          define MPROTECT_VDB
 #      endif
-#      define SIG_SUSPEND SIGUSR1
-#      define SIG_THR_RESTART SIGUSR2
+#      define SIG_SUSPEND SIGTSTP
+#      define SIG_THR_RESTART SIGCONT
 #      define FREEBSD_STACKBOTTOM
 #      ifdef __ELF__
 #          define DYNAMIC_LOADING
 #   ifdef FREEBSD
 #      define OS_TYPE "FREEBSD"
 /* MPROTECT_VDB is not yet supported at all on FreeBSD/alpha. */
-#      define SIG_SUSPEND SIGUSR1
-#      define SIG_THR_RESTART SIGUSR2
+#      define SIG_SUSPEND SIGTSTP
+#      define SIG_THR_RESTART SIGCONT
 #      define FREEBSD_STACKBOTTOM
 #      ifdef __ELF__
 #          define DYNAMIC_LOADING
index 83f468e89ed1a58d5d12dc086f5f45491939f136..5c2bf165102a9acb175e2047ef85bbb46e43ae3f 100644 (file)
--- a/os_dep.c
+++ b/os_dep.c
@@ -702,10 +702,10 @@ ptr_t GC_get_stack_base()
 #   endif
 
 #   if defined(SUNOS5SIGS) || defined(IRIX5) || defined(OSF1) \
-    || defined(HURD) || defined(NETBSD)
+    || defined(HURD) || defined(NETBSD) || defined(FREEBSD)
        static struct sigaction old_segv_act;
 #      if defined(_sigargs) /* !Irix6.x */ || defined(HPUX) \
-       || defined(HURD) || defined(NETBSD)
+       || defined(HURD) || defined(NETBSD) || defined(FREEBSD)
            static struct sigaction old_bus_act;
 #      endif
 #   else
@@ -720,7 +720,7 @@ ptr_t GC_get_stack_base()
 #   endif
     {
 #      if defined(SUNOS5SIGS) || defined(IRIX5)  \
-        || defined(OSF1) || defined(HURD) || defined(NETBSD)
+        || defined(OSF1) || defined(HURD) || defined(NETBSD) || defined(FREEBSD)
          struct sigaction      act;
 
          act.sa_handler        = h;
@@ -740,7 +740,7 @@ ptr_t GC_get_stack_base()
 #        else
                (void) sigaction(SIGSEGV, &act, &old_segv_act);
 #              if defined(IRIX5) && defined(_sigargs) /* Irix 5.x, not 6.x */ \
-                  || defined(HPUX) || defined(HURD) || defined(NETBSD)
+                  || defined(HPUX) || defined(HURD) || defined(NETBSD) || defined(FREEBSD)
                    /* Under Irix 5.x or HP/UX, we may get SIGBUS.      */
                    /* Pthreads doesn't exist under Irix 5.x, so we     */
                    /* don't have to worry in the threads case.         */
@@ -776,10 +776,10 @@ ptr_t GC_get_stack_base()
     void GC_reset_fault_handler()
     {
 #       if defined(SUNOS5SIGS) || defined(IRIX5) \
-          || defined(OSF1) || defined(HURD) || defined(NETBSD)
+          || defined(OSF1) || defined(HURD) || defined(NETBSD) || defined(FREEBSD)
          (void) sigaction(SIGSEGV, &old_segv_act, 0);
 #        if defined(IRIX5) && defined(_sigargs) /* Irix 5.x, not 6.x */ \
-            || defined(HPUX) || defined(HURD) || defined(NETBSD)
+            || defined(HPUX) || defined(HURD) || defined(NETBSD) || defined(FREEBSD)
              (void) sigaction(SIGBUS, &old_bus_act, 0);
 #        endif
 #       else