Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!think!ames!pacbell!pbhyf!kjk From: kjk@pbhyf.PacBell.COM (Ken Keirnan) Newsgroups: comp.unix.microport Subject: Re: Compile errors on V/386 3.0E Message-ID: <4386@pbhyf.PacBell.COM> Date: 12 Dec 88 17:37:04 GMT References: <680@wa3wbu.UUCP> <417@zinn.MV.COM> <273@uport.UUCP> Reply-To: kjk@pbhyf.PacBell.COM (Ken Keirnan) Organization: Pacific * Bell, San Ramon, CA Lines: 52 In article <273@uport.UUCP> plocher@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 ) > > 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@pbhyf.PacBell.COM