Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site hadron.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!trwatf!rlgvax!prcrs!hadron!jsdy From: jsdy@hadron.UUCP (Joseph S. D. Yao) Newsgroups: net.unix-wizards Subject: Re: Re(cap): Which Unix? Message-ID: <179@hadron.UUCP> Date: Mon, 6-May-85 23:32:29 EDT Article-I.D.: hadron.179 Posted: Mon May 6 23:32:29 1985 Date-Received: Fri, 10-May-85 08:20:35 EDT References: <237@dadla.UUCP> Distribution: net Organization: Hadron, Inc., Fairfax, VA Lines: 42 > [No matter where you go..... there you are. Buckaroo Banzai] > > It seems to me that (when this was bandied about on the net > a few weeks ago) there never was a EASY method for determining > which version of UN*X a program was being compiled under. > ... > What I'm proposing is for ALL UN*X systems to have a single > (additional) include file: /usr/include/unix.h, which would > contain something like: > -Roger [Southwick] > UUCP: ...!tektronix!dadla!rogers Many but not all UNIces already have an include file . It does not bother to define a value for each type of UNIX, but just tries to: #define BSD4_1 /* N O T BSD.4.1 !!! */ or #define SYSVR2 or whatnot, and then use: #ifdef BSD4_1 ... #endif BSD4_1 /* So who likes the ANSI restriction? */ Thus, you need not have a global update of all machines' uparm.h's: just make sure that your symbol is a universally agreed-on one. (What good is #ifdef BSD41 above?) You may wish to define several for particular things available on your machine (#define BSD4_2; #define SCCS; #define RCS). If you want to mess anybody who isn't in your list of machines: #ifdef SYSVR1 ... # elif BSD4_1 /* well, I do like most of ANSI. */ ... # else THIS WILL UPSET THE COMPILER! #endif SYSTEMS /* but not all. */ Anybody want to contribute the symbols for their machine that they like best? Joe Yao hadron!jsdy@seismo.{ARPA,UUCP}