Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jan 1996 02:35:22 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-hackers@freebsd.org, spaz@u.washington.edu
Subject:   Re: incorrect proto of sa_handler in 2.05R, 2.1R ?
Message-ID:  <199601221535.CAA05096@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>	I am trying to get a snapshot of octave to build on a 2.0.5 
>machine and i have run into a problem. I am curious as to wether or not 
>this has been changed in 2.1 RELEASE. I am also curious as to weather or 

No, but, it has been changed in -current.

>not the author of octave is incorrect in asserting that the following 
>prototype is in error. Please respond at your earliest convienience so i 
>can inform him if he needs to ifdef this in for current and future freebsd 
>releases

>	This is the definition of sa_handler in /usr/include/sys/signal.h:
>mira: {4} grep sa_handler /usr/include/sys/*.h
>/usr/include/sys/signal.h:      void    (*sa_handler)();

This prototype is specified by POSIX.1-1990 3.3.4.2.  However, it is
braindamaged, and POSIX conformant programs can't tell the difference
if it is changed to `void (*sa_handler)(int);', so I changed it.

>	I have just been told that this is not a correct prototype for 
>this, and that it should be :
>			        void    (*sa_handler)(int);

The problem is probably that sa_handler is a (pointer to) a function
with no args in C++ because C its declaration isn't wrapped with `extern
"C" { ... }' like it should be.  You can probably work around this by
wrapping the #include of <signal.h> with `extern "C" { ... }'.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199601221535.CAA05096>