From owner-freebsd-hackers Thu Feb 6 15:20:02 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id PAA14199 for hackers-outgoing; Thu, 6 Feb 1997 15:20:02 -0800 (PST) Received: from po1.glue.umd.edu (root@po1.glue.umd.edu [129.2.128.44]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id PAA14144; Thu, 6 Feb 1997 15:19:51 -0800 (PST) Received: from skipper.eng.umd.edu (skipper.eng.umd.edu [129.2.103.24]) by po1.glue.umd.edu (8.8.5/8.7.3) with ESMTP id SAA08074; Thu, 6 Feb 1997 18:19:32 -0500 (EST) Received: from localhost (chuckr@localhost) by skipper.eng.umd.edu (8.8.5/8.7.3) with SMTP id SAA04597; Thu, 6 Feb 1997 18:19:31 -0500 (EST) X-Authentication-Warning: skipper.eng.umd.edu: chuckr owned process doing -bs Date: Thu, 6 Feb 1997 18:19:26 -0500 (EST) From: Chuck Robey X-Sender: chuckr@skipper.eng.umd.edu To: Bruce Evans cc: freebsd-ports@freebsd.org, hackers@freebsd.org, imp@village.org, obrien@NUXI.com Subject: Re: conditionally including In-Reply-To: <199702062019.HAA02499@godzilla.zeta.org.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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 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! ----------------------------+-----------------------------------------------