Subject: Re: #if defined(unix) (was Re: CVS commit: src)
To: Perry E. Metzger <perry@piermont.com>
From: Todd Vierling <tv@pobox.com>
List: tech-toolchain
Date: 08/31/1998 13:21:48
[sorry if I've missed part of the thread -- my mail/www server was down for
~14 hours, and I'm still receiving backlogged mails]

On Mon, 31 Aug 1998, Perry E. Metzger wrote:

: #if defined(__NetBSD__) || defined(unix)

: That's what I favor, because it means code will still compile on other 
: platforms.

The best solution for offending code (to keep compatibility) is:

#ifdef __NetBSD__
#define unix 1
#endif

or adding -Dunix to the cc command line.  Trying to hack cpp to turn off the
warning if the user has checked for __NetBSD__ is a lose, because it may
check for both for _different_ things, and you would be required to check
for __NetBSD__ first to terminate that warning.  It's very non-intuitive.

-- 
-- Todd Vierling (Personal tv@pobox.com; Bus. todd_vierling@xn.xerox.com)