Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Feb 1997 08:32:48 -0500 (EST)
From:      Chuck Robey <chuckr@glue.umd.edu>
To:        FreeBSD-Hackers <FreeBSD-Hackers@FreeBSD.org>
Subject:   Re: conditionally including <sys/param.h>
Message-ID:  <Pine.OSF.3.95q.970203083034.3201H-100000@gilligan.eng.umd.edu>

next in thread | raw e-mail | index | archive | help
[reposted -- my mailer couldn't handle Thomas David Rivers ucbvax address]
On Sun, 2 Feb 1997, Thomas David Rivers wrote:

> > 
> > 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 <sys/param.h>.  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.

__unix__ seems unneeded, but __FreeBSD__, __NetBSD__, and __OpenBSD__ are
already used successfully by X11 (see /usr/X11R6/lib/X11/Imake.cf) and I
think they'll work fine for us.  We can add specific additional names, one
by one, as we get specific requests from other systems.  I'd like this.


----------------------------+-----------------------------------------------
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.970203083034.3201H-100000>