Subject: Re: CVS commit: basesrc
To: None <tech-misc@netbsd.org, tech-userlevel@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-misc
Date: 08/12/2002 17:00:41
>> That makes namespace pollution in [libc] a very important matter.
>> Every time you add a function to libc, you are risking breaking
>> anything that used that name for its own purposes.
> No you aren't.  That's the whole point of how our linker works.  If
> you use the symbol for your own purposes you'll have no trouble at
> all.

Hm, I suppose that's true as far as the linker goes.  It is not true as
far as the include files go, and I consider them part of libc; they
describe the interface, and when you add something to libc you add it
to an include file too in some large subset of the cases (certainly the
ones where it's intended to be user-visible).

If you add something to libc and never add it to any include files
anywhere you may be right.  But, for example, heapsort showed up in
some include file which most of those heapsort-using programs of mine
included, and they broke at compile time as a result.  One reason - a
minor one, but still one - I'm not tracking current NetBSD at home is
that I don't need the pain of repeating the heapsort exercise every
time NetBSD thinks some common name should be dropped into some
heavily-used include file, thereby breaking all of my code which uses
that name for its own purposes.  (Well, most - all that also uses the
affected include file.)

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B