Subject: Re: port-alpha/5586: port alpha does not define "unix"
To: Greg A. Woods <woods@weird.com>
From: Perry E. Metzger <perry@piermont.com>
List: netbsd-bugs
Date: 06/16/1998 01:30:07
Greg A. Woods writes:
> > Polluting the user namespace is, in fact, forbidden.
> 
> I've been unable to find chapter and verse stating that in the "Single
> UNIX Specification".

It incorporates the ANSI C spec by reference. Have a read there.

> In any case, NetBSD need not be so anal, esp. for something widely used
> and expected.  Obviously it could define a name in the reserved space
> (eg. __unix__ or similar), but this wouldn't really help make anything
> more portable.

I have, over the years, suffered dramatically from namespace pollution 
issues. Someone innocently defines a structure in 4.3 BSD that
uses the name "sun" (thinking "s un") and the code mysteriously fails
for no good reason when compiled on my Sun, requiring large amounts of 
work to figure out what the hell is going on. Similar stuff has bit me 
over and over. I don't care if ancient practice was to define lots of
convenient preprocessor variables. The gods of portability spoke a
while back, and they made a reasonably good decision. Other unices
like Solaris have gone this route -- no reason we shouldn't follow.

.pm