Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 May 2003 18:11:35 -0500
From:      "Jacques A. Vidrine" <nectar@FreeBSD.org>
To:        "Andrey A. Chernov" <ache@nagual.pp.ru>
Cc:        Dag-Erling Smorgrav <des@ofug.org>
Subject:   Re: `Hiding' libc symbols
Message-ID:  <20030505231135.GA21953@madman.celabo.org>
In-Reply-To: <20030505205051.GA40572@nagual.pp.ru>
References:  <20030501182820.GA53641@madman.celabo.org> <XFMail.20030501144502.jhb@FreeBSD.org> <20030501191027.GA53801@madman.celabo.org> <20030505110601.H53365@beagle.fokus.fraunhofer.de> <20030505175426.GA19352@madman.celabo.org> <xzpk7d53zu5.fsf@flood.ping.uio.no> <20030505205051.GA40572@nagual.pp.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 06, 2003 at 12:50:51AM +0400, Andrey A. Chernov wrote:
> On Mon, May 05, 2003 at 22:25:54 +0200, Dag-Erling Smorgrav wrote:
> > "Jacques A. Vidrine" <nectar@FreeBSD.org> writes:
> > > So, I advocate hiding all symbols in libc by default.  The Real World
> > > doesn't seem to care whether the symbols are defined by any standard or
> > > not.
> > 
> > I'm with you, but I would also like to point out that there is a small
> > number of ports which will require changes: ports like electricfence,
> > boehm-gc and others that rely at least in part on replacing libc's
> > malloc(), calloc(), realloc() and free().
> 
> Unless my point was not clear from my previous posts, I advocate exact
> opposite: to unhide all standard symbols from libc, including here
> standard prefixes like str*. We must not encourage programmer error 
> when he define standard function, it easily leads to unexpected results. 
> Better reject such error automatically at the linkage stage. Programmers 
> are always free to redefine their functions in case of conflict.

And what will you do with the hundreds (perhaps thousands) of
applications that (IMHO most legitimately, some not) define symbols
that are technically in some standard's space, such as `snprintf',
`strlcpy', `accept', `close', ... ?  ``Fix'' them all?  Throw them
away?

What about applications that are already compiled?

I think such fascism would result in us behaving in a very un-UNIX
fashion.

Cheers,
-- 
Jacques Vidrine   . NTT/Verio SME      . FreeBSD UNIX       . Heimdal
nectar@celabo.org . jvidrine@verio.net . nectar@freebsd.org . nectar@kth.se



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030505231135.GA21953>