[net.unix] Which *nix -- Poster's summary of responses

daveb@rtech.ARPA (Dave Brower) (03/05/85)

[Finding out which Unix version you're got at compile time]

My orginal suggestion was to look at fcntl.h for a BSD specific define.
Unfortunately, there's no fcntl.h in 4.1 or V7.  It's still an ok rude
check for 4.2/Sys V distinctions.  (Arguably all else is now irrelevant.)

Others suggested looking for BSD special signals in signal.h.  That was
my first try, but it fails on a Pyramid, which defines all the BSD
signals even when in the System V "Universe".

A further suggestion was to look for FIONREAD in ioctl.h.  Other have
pointed out that UniSoft has FIONREAD in UniPlus+ System V's.

The best suggestion, and the one I'm now using after hearing the
discussion was a shell script that dealt with all of the bizzarities.  
In the interest of net bandwidth, I direct you to the archives rather
than posting it again.

Thanx for all the ideas.  Be careful out there!

(and now for something of a tangent)

For similar problems regarding machine identification, be sure to get
a copy of the recent UNIX REVIEW.  Bill Tuthill has a handy list of most
of the "magic symbols" buried in the pre-processor to help you divine
that part of the environment.  Coomonly used symbols include "unix,"
"vax11c," "sun," etc.  You might note that 68000's are known both as
"mc68k" and as "mc68000."

An addition to the list:  The CCI Power 6/32 is known by the symbol "tahoe".

-dB
-- 
----------------
{ucbvax, decvax}!mtxinu!rtech!daveb

"The closer you look, the worse it gets."