From owner-freebsd-hackers Sun Feb 2 17:50:39 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id RAA00413 for hackers-outgoing; Sun, 2 Feb 1997 17:50:39 -0800 (PST) Received: from dg-rtp.dg.com ([128.222.1.2]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id RAA00406 for ; Sun, 2 Feb 1997 17:50:37 -0800 (PST) Received: by dg-rtp.dg.com (5.4R3.10/dg-rtp-v02) id AA22124; Sun, 2 Feb 1997 20:50:04 -0500 Received: from ponds by dg-rtp.dg.com.rtp.dg.com; Sun, 2 Feb 1997 20:50 EST Received: from lakes.water.net (lakes [10.0.0.3]) by ponds.water.net (8.8.3/8.7.3) with ESMTP id UAA02990; Sun, 2 Feb 1997 20:17:54 -0500 (EST) Received: (from rivers@localhost) by lakes.water.net (8.8.3/8.6.9) id UAA18377; Sun, 2 Feb 1997 20:22:10 -0500 (EST) Date: Sun, 2 Feb 1997 20:22:10 -0500 (EST) From: Thomas David Rivers Message-Id: <199702030122.UAA18377@lakes.water.net> To: ponds!FreeBSD.ORG!hackers, ponds!NUXI.com!obrien Subject: Re: conditionally including Content-Type: text Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > Sorry to have to bring this back to light... > I was under the impression that we had agreed that > "#if (defined(__unix__) || defined(unix))" was the best way to > conditionally include . However, this email from Chuck, > implies that this is a Bad Thing. Unfortunately the symbols: unix FreeBSD NetBSD OpenBSD violate the user's name space. For example, I have programs that define some of these on the command line. If these were defined elsewhere things would break. [Of course, such things do break on other hosts; e.g. SunOS 4.x defines "unix".] I would suggest using: __unix__ __FreeBSD__ __NetBSD__ __OpenBSD__ as identifiers beginning with "_" are reserved (per ANSI) for the implementation. - Dave Rivers - > > So to re-hash this, what does the list think is the best way to have an > easy way to include ? Even thought I don't have all the > *BSD folks in my grips like I did at USENIX, I'm still not above trying > to get a new cpp symbol added (like __44bsd__ or something). > > Chuck Robey writes: > > > obrien 97/01/27 17:43:23 > > > Modified: share/doc/handbook porting.sgml > > > Document the "#if (defined(__unix__) || defined(unix))" way of including > > > sys/param.h. Change _HAVE_PARAM_H to "HAVE_SYS_PARAM_H" for those who > > > still like this method -- leading underscores are in the compiler/library > > > name space and the Ollivier says to follow GNU Autoconf anyway. > > > > That test is completely bogus, cause it passes for all sysv systems, > > which _don't_ have sys/param.h. It's a completely useless test, and > > someone justified it by saying that "most systems have a sys/param.h > > anyhow". > > > > What (in my own opinion) should have been done is to detect: > > > > #ifdef FreeBSD || NetBSD || OpenBSD > > > > that would have worked for those variants. Would be able to find out the > > one for BSDi systems, then we'd have a great deal of the important ones. > > That's how X11R6 does it. > > -- > -- David (obrien@NUXI.com -or- obrien@FreeBSD.org) >