*BSD News Article 30960


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!yarrina.connect.com.au!munnari.oz.au!spool.mu.edu!howland.reston.ans.net!EU.net!ieunet!news.ieunet.ie!jkh
From: jkh@whisker.hubbard.ie (Jordan K. Hubbard)
Newsgroups: comp.os.386bsd.development
Subject: Re: Request to ``ports'' developers
Date: 29 May 1994 08:59:21 GMT
Organization: Jordan Hubbard
Lines: 36
Distribution: world
Message-ID: <JKH.94May29085921@whisker.hubbard.ie>
References: <2s291q$pnl@meatball.rwwa.com> <2s37a4$mp9@pdq.coe.montana.edu>
	<VIXIE.94May27220527@office.home.vix.com> <hm.770154713@hcswork>
	<VIXIE.94May28221230@office.home.vix.com>
NNTP-Posting-Host: whisker.hubbard.ie
In-reply-to: vixie@vix.com's message of 28 May 94 22:12:30

In article <VIXIE.94May28221230@office.home.vix.com> vixie@vix.com (Paul A Vixie) writes:

   But really, using system-style #ifdef's is OK as long as you pick the right
   macro.  I really doubt that "__386bsd" is ever the right thing, or "__netbsd"
   or "__freebsd", or "__bsdi__", since I don't think those systems add anything
   new to the basic (BSD >= 199103) interface.  So if you use the common #ifdef
   you essentially get those other "ports" for free.

Just to add a note here, there is in fact NO way other than checking
BSD for one of these magic values to tell that you're running on a
*BSD (or BSD* :) system - each of the *BSDs no longer defines
__386BSD__, so software that uses this to detect either environment
will now break.  If you *really* want to configure yourself for one of
the *BSD's because you're sure your software won't compile under BSDI
or some other BSD incarnation (and it does give me pause, wondering
whether or not any of the BSD *derived* but significantly hacked
systems out there define BSD?), then check for __FreeBSD__ and/or
__NetBSD__.

Also, just for the record, let me be said that I _really hate_ this
BSD convention.  I can see why they did it, but seeing an
`#if (BSD >= 19411207)' in the code tells me little more than the fact
that this particular BSD variant was released during the attack on
Pearl Harbor and nothing at all as to WHY the coder is targeting this
particular release (unless I happen to personally know something about
the PH release).  It's about as informative as a politician's speach, and
one shudders to think of what would happen if major vendors started
following similar examples (#if HPUX > 930104 || AIX <= 9403) - one
would have to start thinking of operating systems releases in terms
of vintages ("Oh, I see this is an april '93 HPUX - that was a very
fine year!  Yes, vendor, I'll have that please!" :-).

					Jordan

--
Jordan K. Hubbard	FreeBSD core team	Friend to mollusks