SunOS: 1; portability: 0

Rahul Dhesi dhesi at sun505.UUCP
Sat Sep 23 05:23:19 AEST 1989


For about ten years, signal() has been a function returning pointer to
int.  It worked, and we were all happily writing portable code.

So what happens?  Both Sun and ANSI decide that milliions of lines of
existing code were all wrong, and that signal() ought really to return
pointer to void.

After much thinking I have found no advantage to this change, and the
big disadvantage that stable existing code now brreaks.

Now I'm faced with this problem:  How do I use signal() in such a way
that my code is portable, without manually editing it for each
implementation?   I need a way of having my code automatically use void
or int as appropriate.

Any suggestions?
--
Rahul Dhesi <dhesi%cirrusl at oliveb.ATC.olivetti.com>
UUCP:  oliveb!cirrusl!dhesi



More information about the Comp.unix.questions mailing list