From owner-freebsd-hackers Mon Jan 22 07:40:13 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id HAA21757 for hackers-outgoing; Mon, 22 Jan 1996 07:40:13 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id HAA21567 for ; Mon, 22 Jan 1996 07:38:30 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id CAA05096; Tue, 23 Jan 1996 02:35:22 +1100 Date: Tue, 23 Jan 1996 02:35:22 +1100 From: Bruce Evans Message-Id: <199601221535.CAA05096@godzilla.zeta.org.au> To: freebsd-hackers@freebsd.org, spaz@u.washington.edu Subject: Re: incorrect proto of sa_handler in 2.05R, 2.1R ? Sender: owner-hackers@freebsd.org Precedence: bulk > 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 with `extern "C" { ... }'. Bruce