Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Apr 2003 16:36:45 +0100
From:      Paul Richards <paul@freebsd-services.com>
To:        "Jacques A. Vidrine" <nectar@FreeBSD.org>
Cc:        "W. Josephson" <cvs-D20030429@morphisms.net>
Subject:   Re: cvs commit: src/lib/libc/gen check_utility_compat.c confstr.c un-namespace.hgethostbydns.c getnameinfo.c hesiod.c ...
Message-ID:  <20030430153645.GL39658@survey.codeburst.net>
In-Reply-To: <20030430152708.GA26216@madman.celabo.org>
References:  <xzpptn4rfww.fsf@flood.ping.uio.no> <20030430004907.GA32349@mero.morphisms.net> <20030430031856.GA20258@madman.celabo.org> <20030430144149.GA7786@dragon.nuxi.com> <20030430002014.GA1190@dragon.nuxi.com> <Pine.GSO.4.10.10304300024280.1846-100000@pcnet1.pcnet.com> <20030430043303.GA46365@mero.morphisms.net> <20030430062647.GA82023@rot13.obsecurity.org> <20030430143121.GK39658@survey.codeburst.net> <20030430152708.GA26216@madman.celabo.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 30, 2003 at 10:27:08AM -0500, Jacques A. Vidrine wrote:
> 
> We have no business exporting symbols from libc that are not described
> by any standard.  We have no business assuming that if an application
> defines a function called `strlcpy' that it resembles, in intent or in
> actual implementation, our own strlcpy.

That's an orthogonal issue really, since libc is not a "pure"
implementation of the standard C library, it also includes a number of
extensions that have been bundled into our libc because it's sometimes
a convenient dumping ground.

Hiding functions that aren't meant to be exported would make sense,
but hiding functions that are intended to be exported but aren't
part of the standard is not so useful.

strlcpy is part of the "FreeBSD libc" since it's a documented interface
for application writers to use.

The alternative is to split out these functions and keep libc pure, and
then link them into our applications if we use them. This is an approach
other platforms have taken but one we've not gone down because of the
proliferation of libraries that then have to be included when writing
apps.

-- 
Paul Richards



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