Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: portability
Message-ID: <1989Jan20.173828.7231@utzoo.uucp>
Organization: U of Toronto Zoology
References: <16573@iuvax.cs.indiana.edu> <9419@smoke.BRL.MIL> <86097@sun.uucp>
Date: Fri, 20 Jan 89 17:38:28 GMT

In article <86097@sun.uucp> swilson@sun.UUCP (Scott Wilson) writes:
>... What happens
>to the names of routines used to implement standard library functions?
>Don't these pollute the name space?  Are implementations required to
>work around this?  For example can a pANS program with a routine
>called write() reliably be compiled and run on a UNIX system without
>causing printf (really _flsbuf) to call the user's routine and botching
>everything?  Does _flsbuf need to be rewritten to call __write() or
>something similar...

In a word, yes.  The name-space pollution situation was a major disaster
in the making, and X3J11 decided to call a halt to it.  A conforming
implementation can reserve those names specified in the standard, and
only those names specified in the standard (including those specified
as "reserved for future use").  All, repeat *all*, other names are open
for use by the user, and the user must be able to use any, repeat *any*,
other name without causing trouble.  Which means that any extra functions
needed by C-standard library functions must have names which are in
the "reserved for the implementation" space.
-- 
Allegedly heard aboard Mir: "A |     Henry Spencer at U of Toronto Zoology
toast to comrade Van Allen!!"  | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
