Compile errors on V/386 3.0E

Larry Jones scjones at sdrc.UUCP
Tue Dec 13 08:26:16 AEST 1988


In article <273 at uport.UUCP>, plocher at uport.UUCP (John Plocher) writes:
> (from <signal.h>)
> 		extern	void(*signal())();
> 		extern  void(*sigset())();
> 
> Under the DIAGNOSTICS section of signal(2) it says:
>    "Upon successful completion, SIGNAL returns the previous value of FUNC for
>     the specified signal SIG.  Otherwise a value of SIG_ERR is returned and
>     errno is set to indicate the error.  SIG_ERR is defined in the include
>     file SIGNAL.H."
> 
> I thought type void meant "nothing returned", yet signal is clearly type void
> and it returns something!  What don't I understand here? :-)

The declaration.  It says that signal is a function which returns
a pointer to a function that returns nothing.  Thus, signal is
not a void function, the signal handler function that it returns
a pointer to is.

----
Larry Jones                         UUCP: uunet!sdrc!scjones
SDRC                                      scjones at sdrc.uucp
2000 Eastman Dr.                    BIX:  ltl
Milford, OH  45150                  AT&T: (513) 576-2070
"Save the Quayles" - Mark Russell



More information about the Comp.unix.microport mailing list