Subject: ecl: use of 3-arg signal handler when SA_SIGINFO is undefined
From: Pierre THIERRY <[email-masked]>
To: Debian Bug Tracking System <[email-masked]>
Date: Sat, 10 Feb 2007 05:37:03 +0100

Package: ecl
Version: 0.9i-2
Severity: important
Tags: patch
Justification: fails to build from source

Not all uses of functions and flags related to SA_SIGINFO where protected by the
needed #ifdef:

diff -r 0169839bd656 src/c/unixint.d
--- a/src/c/unixint.d   Sat Feb 10 04:52:54 2007 +0100
+++ b/src/c/unixint.d   Sat Feb 10 05:35:39 2007 +0100
@@ -54,9 +54,15 @@ mysignal(int code, void *handler)
 {
        struct sigaction new_action, old_action;

+#ifdef SA_SIGINFO
        new_action.sa_sigaction = handler;
        sigemptyset(&new_action.sa_mask);
        new_action.sa_flags = SA_SIGINFO;
+#else
+       new_action.sa_handler = handler;
+       sigemptyset(&new_action.sa_mask);
+       new_action.sa_flags = 0;
+#endif
        sigaction(code, &new_action, &old_action);
 }
 #else
@@ -136,7 +142,11 @@ signal_catcher(int sig)
        mysignal(sig, signal_catcher);
 #ifdef HAVE_SIGPROCMASK
        CL_UNWIND_PROTECT_BEGIN {
+#ifdef SA_SIGINFO
                handle_signal(sig, siginfo, data);
+#else
+               handle_signal(sig);
+#endif
        } CL_UNWIND_PROTECT_EXIT {
                sigset_t block_mask;
                sigemptyset(&block_mask);
@@ -162,7 +172,7 @@ si_check_pending_interrupts(void)
 {
        int what = cl_env.interrupt_pending;
        cl_env.interrupt_pending = 0;
-#ifdef HAVE_SIGPROCMASK
+#if defined (HAVE_SIGPROCMASK) && defined(SA_SIGINFO)
        handle_signal(what, 0, 0);
 #else
        handle_signal(what);

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (990, 'testing'), (501, 'stable'), (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-2-k7
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages ecl depends on:
ii  common-lisp-controller    6.9            This is a Common Lisp source and c
ii  gcc-4.1                   4.1.1-21       The GNU C compiler
ii  libc6                     2.3.6.ds1-10   GNU C Library: Shared libraries
ii  libgc-dev                 1:6.8-1        conservative garbage collector for
ii  libgc1c2                  1:6.8-1        conservative garbage collector for
ii  libgmp3-dev               2:4.2.1+dfsg-4 Multiprecision arithmetic library 
ii  libgmp3c2                 2:4.2.1+dfsg-4 Multiprecision arithmetic library
ii  libncurses5-dev           5.5-5          Developer's libraries and docs for

ecl recommends no packages.

-- no debconf information

-- 
[email-masked]
OpenPGP 0xD9D50D8A