Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!mcnc!rti!bnrunix!rrs From: rrs@bnrunix.UUCP (Randall Stewart) Newsgroups: comp.sys.hp Subject: HP-UX type declaration problem with signal(2) Keywords: HP-UX signal Message-ID: <218@bnrunix.UUCP> Date: 23 Jun 89 14:58:50 GMT Organization: BNR Inc., RTP, NC Lines: 41 saves the old signal handler and then set's a signal handler and of course at a later time restores the original signal handler... ******************************************************************** #include int (*old)(),newhand(); old = signal(SIGINT,newhand); .. ...code of module .. signal(SIGINT,old); When compiling on a 6.2 machine I had no problems but when I compile on a 6.5 machine. I get "line xxxx: warning: incorrect pointer combination" upon looking at and comparing the 6.2 vs: the 6.5, I find this difference... 6.2--- extern (*signal())(); 6.5--- extern void (*signal())(); ****************************************************** Should not 6.5 have a statement more like 6.2????? Or to be real picky I would prefer: extern int (*signal())(); --------- Being the paranoid type I even wrote a small test program to make sure that the 6.5 signal call still returns the old function pointer. It worked as expected and I did get a return of a function pointer from signal. What do y'all think? Randall