Author: zoltan
Date: 2005-04-11 10:12:45 -0400 (Mon, 11 Apr 2005)
New Revision: 42786

Modified:
   trunk/mono/libgc/ChangeLog
   trunk/mono/libgc/configure.in
   trunk/mono/libgc/dyn_load.c
   trunk/mono/libgc/include/private/gcconfig.h
   trunk/mono/libgc/os_dep.c
Log:
2005-04-11  Zoltan Varga  <[EMAIL PROTECTED]>

        * include/private/gcconfig.h configure.in os_dep.c dyn_load.c: 
        Applied some freebsd patch from Bill Middleton <[EMAIL PROTECTED]>.


Modified: trunk/mono/libgc/ChangeLog
===================================================================
--- trunk/mono/libgc/ChangeLog  2005-04-11 13:49:32 UTC (rev 42785)
+++ trunk/mono/libgc/ChangeLog  2005-04-11 14:12:45 UTC (rev 42786)
@@ -1,3 +1,8 @@
+2005-04-11  Zoltan Varga  <[EMAIL PROTECTED]>
+
+       * include/private/gcconfig.h configure.in os_dep.c dyn_load.c: 
+       Applied some freebsd patch from Bill Middleton <[EMAIL PROTECTED]>.
+
 2005-04-06  Zoltan Varga  <[EMAIL PROTECTED]>
 
        * solaris_pthreads.c (GC_pthread_detach): Add locking.

Modified: trunk/mono/libgc/configure.in
===================================================================
--- trunk/mono/libgc/configure.in       2005-04-11 13:49:32 UTC (rev 42785)
+++ trunk/mono/libgc/configure.in       2005-04-11 14:12:45 UTC (rev 42786)
@@ -124,6 +124,17 @@
                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)

Modified: trunk/mono/libgc/dyn_load.c
===================================================================
--- trunk/mono/libgc/dyn_load.c 2005-04-11 13:49:32 UTC (rev 42785)
+++ trunk/mono/libgc/dyn_load.c 2005-04-11 14:12:45 UTC (rev 42786)
@@ -96,20 +96,28 @@
 /* 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)
 

Modified: trunk/mono/libgc/include/private/gcconfig.h
===================================================================
--- trunk/mono/libgc/include/private/gcconfig.h 2005-04-11 13:49:32 UTC (rev 
42785)
+++ trunk/mono/libgc/include/private/gcconfig.h 2005-04-11 14:12:45 UTC (rev 
42786)
@@ -1186,8 +1186,8 @@
 #      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
@@ -1501,8 +1501,8 @@
 #   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

Modified: trunk/mono/libgc/os_dep.c
===================================================================
--- trunk/mono/libgc/os_dep.c   2005-04-11 13:49:32 UTC (rev 42785)
+++ trunk/mono/libgc/os_dep.c   2005-04-11 14:12:45 UTC (rev 42786)
@@ -702,10 +702,10 @@
 #   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 @@
 #   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 @@
 #        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 @@
     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

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to