Package: libsigsegv
Severity: important
Version: 2.4-1
Tags: patch


Hi,

the current version fails to build on GNU/kFreeBSD.

It needs small tweaks to configure.ac and regenerate configure.
Please find attached patch with changes to configure.ac.

It would also be nice if you can ask upstream
to include this changes.

Thanks in advance

                        Petr

--- configure.ac.orig   2006-07-02 23:46:24.000000000 +0200
+++ configure.ac        2006-07-03 22:16:46.000000000 +0200
@@ -74,7 +74,7 @@
 dnl List of signals that are sent when an invalid virtual memory address
 dnl is accessed, or when the stack overflows.
 case "$host_os" in
-  sunos4* | freebsd* | openbsd* | netbsd*)
+  sunos4* | freebsd* | openbsd* | netbsd* | k*bsd*)
     CFG_SIGNALS=signals-bsd.h ;;
   hpux*)
     CFG_SIGNALS=signals-hpux.h ;;
@@ -107,7 +107,7 @@
 
 dnl FIXME: Put in some more known values into the third argument.
 SV_TRY_FAULT([POSIX], sv_cv_fault_posix,
-  [*-*-solaris2.[7-9] | i?86-*-linux2.[4-9]* | i?86-*-freebsd[4-9]* | 
alpha*-dec-osf[4-9]* | *-*-hpux11* | mips-sgi-irix6*],
+  [*-*-solaris2.[7-9] | i?86-*-linux2.[4-9]* | i?86-*-freebsd[4-9]* | 
i?86-*-kfreebsd[4-9]* | alpha*-dec-osf[4-9]* | *-*-hpux11* | mips-sgi-irix6*],
   [],
   [int sig, siginfo_t *sip, void *ucp],
   [sip->si_addr],
@@ -147,7 +147,7 @@
    action.sa_flags = SA_SIGINFO;])
 
 dnl FIXME: Put in some more known values into the third argument.
-SV_TRY_FAULT([BSD], sv_cv_fault_bsd, [i?86-*-freebsd[4-9]*],
+SV_TRY_FAULT([BSD], sv_cv_fault_bsd, [i?86-*-freebsd[4-9]* | 
i?86-*-kfreebsd[4-9]*],
   [],
   [int sig, int code, struct sigcontext *scp, void *addr],
   [addr])
@@ -298,7 +298,7 @@
 fi
 if test -z "$CFG_FAULT" && test "$sv_cv_fault_bsd" = yes; then
   case "$host_os" in
-    freebsd*)
+    freebsd*| kfreebsd*)
       case "$host_cpu" in
         i?86 | x86_64)
           CFG_FAULT=fault-freebsd-i386.h
@@ -630,7 +630,10 @@
   esac
 fi
 if test -z "$CFG_STACKVMA" && test $ac_cv_func_mincore = yes; then
-  CFG_STACKVMA=stackvma-mincore.c
+  case "$host_os" in
+    kfreebsd*) ;; dnl mincore() does not work
+    *) CFG_STACKVMA=stackvma-mincore.c ;;
+  esac  
 fi
 if test -n "$CFG_STACKVMA"; then
   AC_DEFINE(HAVE_STACKVMA, 1,
@@ -731,7 +734,7 @@
 dnl FIXME: Put in some more known values into the third argument.
 SV_TRY_LEAVE_HANDLER_LONGJMP([ and sigaltstack],
   sv_cv_leave_handler_longjmp_sigaltstack,
-  [*-*-freebsd*],
+  [*-*-freebsd*|*-*-kfreebsd*],
   [
 #ifndef SS_ONSTACK
 #define SS_ONSTACK SA_ONSTACK
@@ -789,7 +792,7 @@
 dnl FIXME: Put in some more known values into the third argument.
 SV_TRY_LEAVE_HANDLER_SIGLONGJMP([ and sigaltstack],
   sv_cv_leave_handler_siglongjmp_sigaltstack,
-  [*-*-freebsd*],
+  [*-*-freebsd*|*-*-kfreebsd*],
   [
 #ifndef SS_ONSTACK
 #define SS_ONSTACK SA_ONSTACK

Reply via email to