crum%alicudi.usc.edu@USC.EDU (Gary L. Crum) (12/05/89)
This explains it. Glauco's badNews() function isn't a valid signal handler, and the new C++ signal.h include file allowed g++ to catch that. I wish C++ include files had an extension other than .h. Gary Return-Path: <english@alicudi.usc.edu> Date: Mon, 4 Dec 89 20:01:46 PST From: english@alicudi.usc.edu (Joe English) To: crum@alicudi.usc.edu, masotti@alicudi.usc.edu Subject: Re: (EC++ problem with signals under v1.36) Cc: agrawal@alicudi.usc.edu, requicha@alicudi.usc.edu [Re: the problem with signal() in 1.35 vs. 1.36 ] The file /usr/include/signal.h is identical on both systems I use. There is a 'signal.h' in /usr/public/lib/g++-include, though. That defines: typedef void (*SignalHandler) (...); extern SignalHandler signal(int sig, SignalHandler action); There is no 'signal.h' in the g++-include or gcc-include directories in 1.35; just in 1.36. I think that g++ and gcc search these directories before they search /usr/include. One note: you shouldn't use the function extern int badNews(int code=0, char* context=""); as a signal handler, since the operating system passes different parameters to handler functions (the signal code, a sigcontext structure, and two other things that I can't remember. It's at the end of the man pages for sigvec(2), though). SignalHandlers are probably declared as variadic in the GNU header file because most handler functions choose to ignore the parameters passed. --Joe