[prev in list] [next in list] [prev in thread] [next in thread] 

List:       aumix
Subject:    Re: [aumix] first change set against aumix 2.5
From:       Christian Weisgerber <naddy () unix-ag ! uni-kl ! de>
Date:       2000-03-31 16:21:19
[Download RAW message or body]

Trevor Johnson:

> > Erm... You can't use sig_t like this. Fails to build for both ccc and gcc.
> 
> Sorry, I was programming under FreeBSD and hadn't checked it under
> Linux.

It's simply wrong under FreeBSD, too.
sig_t defines a pointer to a sighandler function (= a function that
takes an int parameter and returns void). So

    sig_t f(...);

defines a function that returns a pointer to a signal handler. A signal
handler is still

    void f(int);

Note that for 2.6g "gcc -Wall" warns about

interactive.c: In function `AumixSignalHandler':
interactive.c:21: warning: control reaches end of non-void function

Another clue that something's amiss is the need to cast the second
argument to signal() explicitly to sig_t.

-- 
Christian "naddy" Weisgerber                     naddy@unix-ag.uni-kl.de

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic