SunOS: 1; portability: 0

Guy Harris guy at auspex.auspex.com
Sun Sep 24 08:01:29 AEST 1989


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

I have yet to see any example of code that ceases to work on the
implementations of UNIX generally available.  It may cause warnings from
your compiler, but that's life.

BTW, Sun decided to do that because bodies such as X3J11 and POSIX were
moving in that direction, and AT&T adopted that change for S5R3.  I seem
to remember some indication that Ultrix has done so as well; eventually,
I expect any non-stagnant version of UNIX to do so.

>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.

Have a #define to control it, set in an include file, and use some
scheme to set up the include file, either by having the user manually
supply it or having something like Larry Wall's configuration files.



More information about the Comp.unix.questions mailing list