Compile errors on V/386 3.0E
Ken Keirnan
kjk at pbhyf.PacBell.COM
Tue Dec 13 03:37:04 AEST 1988
In article <273 at uport.UUCP> plocher at uport.UUCP (John Plocher) writes:
[ stuff about declaration of signal deleted ]
>
>NO!
>
>In ATT System Vr3 (Microport's V/386 2.2 & 3.0e, ISC's 1.0x, BT's 3.0...)
>signal() was changed to be of type void. This is different from almost
>everyone else (uugh!) but that's how AT&T did it.
>
>(from <signal.h>)
>
> extern void(*signal())();
> extern void(*sigset())();
>
[ more stuff deleted ]
>
>I thought type void meant "nothing returned", yet signal is clearly type void
>and it returns something! What don't I understand here? :-)
>
> John Plocher
Actually, the declaration of signal() above doesn't say that signal() returns
void, but rather that signal() returns a pointer to some function that
returns "void". Therefore, any function name given to the signal() call
should be declared void:
void doexit()
{
(void)printf("\nGoodbye\n");
exit(0);
}
...
...
...
(void)signal(SIGINT, doexit);
...
...
Hope this helps.
Ken Keirnan
--
Ken Keirnan - Pacific Bell - {att,bellcore,sun,ames,pyramid}!pacbell!pbhyf!kjk
San Ramon, California kjk at pbhyf.PacBell.COM
More information about the Comp.unix.microport
mailing list