Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site rlgvax.UUCP Path: utzoo!utcs!lsuc!pesnta!hplabs!hao!seismo!rlgvax!guy From: guy@rlgvax.UUCP (Guy Harris) Newsgroups: net.unix-wizards Subject: Re: Which *nix ? BSD : System V Message-ID: <492@rlgvax.UUCP> Date: Sat, 16-Feb-85 15:22:44 EST Article-I.D.: rlgvax.492 Posted: Sat Feb 16 15:22:44 1985 Date-Received: Mon, 18-Feb-85 08:45:14 EST References: <147@rtech.ARPA> Distribution: net Organization: CCI Office Systems Group, Reston, VA Lines: 34 > If you need to know at compile time whether you're on a Berklix or > a System V system, this might help. It seems to work on all of our > systems, including the Pyramid split universe wonder: > > # include > # ifdef FNDELAY > # define BSD > # else > # define SYS5 > # endif > > This assumes that FNDELAY is not defined in the System V fcntl.h, and > is in the BSD. Can anyone think of a case where this is not true, Yes - 4.1BSD. It would produce an error complaining that couldn't be found. If you assume that the only UNIXes you're interested in are 4.2BSD and System III/System V, this will work (no V7, no 4.1BSD). It also won't work on the OS we're doing for the Power 6/32, if you're really interested in a strict 4.2/S5 distinction. It would think you were on a 4.2 system - we don't have two universes. However, most 4.2 stuff should work; our TTY driver, though S5 based, has all the Berkeley features in it (job control, correct "echoe" handling, "prterase", "crtkill", "ctlecho", etc., etc.) and has replaced the UNIX/TS 1.0 backward compatible "ioctl"s with V7/4.2BSD backward compatible "ioctl"s (I've successfully run the off-the-tape 4.2BSD binaries of "csh" and "vi"). I'm not sure what the result would be with Doug Gwyn's SysV emulation under 4.2BSD, either; if it doesn't provide a separate copy of your program would be built for 4.2BSD, but would be linked with SysV libraries. Guy Harris {seismo,ihnp4,allegra}!rlgvax!guy