Which *nix ? BSD : System V

Rob Warnock rpw3 at redwood.UUCP
Thu Mar 7 16:05:04 AEST 1985


+---------------
| As an alternative to including <sys/ioctl.h>, here is something that works
| MUCH BETTER.  | | Include <signal.h>...
| <signal.h> has other goodies for system differention.  I always use SIGSTOP
| to check for job control, and SIGVTALRM for 4.2 BSD exclusivity.
+---------------

Much better, and this approach brings us closer to the "real"
issue, which is NOT "what system is this?" but "how do I do XYZ?";
NOT "am I on 4.2", but "do I assume 4.2-style signals?" (Example:
the 68000 system I use has a "v7" kernel, a "4.1" tty driver, but
no "job control". Is it "v.7" or "4.1"?)

With the varieties of UNIX ports around, each of which has chosen
different combinations of features from different sources, it is
better (where possible) to make our "feature tests" be just that,
tests of "features" rather than "versions". Unless we set up a
central registry which hands out unique labels for versions of
UNIX (like Xerox's Ethernet "types"), we will continue to have
portability glitches.


Rob Warnock
Systems Architecture Consultant

UUCP:	{ihnp4,ucbvax!dual}!fortune!redwood!rpw3
DDD:	(415)572-2607
USPS:	510 Trinidad Lane, Foster City, CA  94404



More information about the Comp.unix mailing list