Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Feb 1997 18:19:26 -0500 (EST)
From:      Chuck Robey <chuckr@glue.umd.edu>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        freebsd-ports@freebsd.org, hackers@freebsd.org, imp@village.org, obrien@NUXI.com
Subject:   Re: conditionally including <sys/param.h>
Message-ID:  <Pine.OSF.3.95q.970206181522.4477A-100000@skipper.eng.umd.edu>
In-Reply-To: <199702062019.HAA02499@godzilla.zeta.org.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 7 Feb 1997, Bruce Evans wrote:

> >> >Yes, but this whole thing got started because the #ifdef __FreeBSD__
> >> >was slowly turning into
> >> >	#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
> >> >in a bunch of places due to those projects riding along on the FreeBSD
> >> >port's coat tails.
> >> 
> >> Maybe include <sys/param.h> unconditionally?  I'm not sure why I mentioned
> >> the __FreeBSD__ ifdef above.  I've never liked ifdefing on the OS -
> >> it isn't necessary for one OS and gives too-large ifdefs for more than
> >> 2 OS's.  You'll still need large ifdefs if configuration depends on the
> >> value of `BSD' and the value is OS-dependent.
> >
> >No, that wouldn't work.  We're talking about something we'd ask authors of
> >packages that weren't written for FreeBSD to include (and to include for
> >NetBSD and OpenBSD) to get their packages to work with ours.  This isn't
> 
> But they certainly should accept anything with __FooBSD__ or BSD >= mmm
> or __FooBSD_version >= nnn.  That would give 100-line ifdefs to support
> 100 OS's.  It's also useless for communicating what is different in
> FooBSD.

I don't disagree, I'm just saying that flatly including sys/param.h with
no qualifiers means that it will be a fatal error on any machine that
doesn't have a sys/param.h, so that's not acceptable.

The stuff I heard about detecting __unix__ or unix is equally useless,
because such a test passes on all unixes, whether or not there is a
sys/param.h existing or not.  The test we finally recommend has to be
non-fatal in nature to systems without sys/param.h.  The method I suggest
above is messy, but (and _please_ correct me if I'm wrong) it has the sole
benefit of being the only one I've seen that is non-fatal on systems that
don't have a sys/param.h.

> 
> Bruce
> 

----------------------------+-----------------------------------------------
Chuck Robey                 | Interests include any kind of voice or data 
chuckr@eng.umd.edu          | communications topic, C programming, and Unix.
9120 Edmonston Ct #302      |
Greenbelt, MD 20770         | I run Journey2 and picnic, both FreeBSD
(301) 220-2114              | version 3.0 current -- and great FUN!
----------------------------+-----------------------------------------------




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.3.95q.970206181522.4477A-100000>