Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 May 2003 07:20:08 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Harti Brandt <brandt@fokus.fraunhofer.de>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: `Hiding' libc symbols
Message-ID:  <3EB67318.17C3A06C@mindspring.com>
References:  <20030501182820.GA53641@madman.celabo.org> <XFMail.20030501144502.jhb@FreeBSD.org> <20030505110601.H53365@beagle.fokus.fraunhofer.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Harti Brandt wrote:
> On Thu, 1 May 2003, Jacques A. Vidrine wrote:
> JAV>   (c) Hide all symbols, except those that are likely to
> JAV>       be candidates to be overridden.  malloc/free seem
> JAV>       to be the only ones here.
> 
> As far as I know, all programs from J.Schilling (cdrecord, star, ...)
> carry their own printf (and a good other half of libc). I suppose there
> are others that do this. While overriding libc functions is not exactly
> standard supported (as far as I understand), it has been used ever since.
> If there are un-overridable functions (for whatever reasons) they should
> be documented somewhere (say in the man page of that function). We should
> not expect application writers/porters to dig around in libc internals.

Most commercial applications vendors I have ever worked for
have carried around their own libraries of functions that
were potentially implemented differently on different platforms,
and "printf" has always been at the top of this list, along with
the entire curses library, the entire termcap library, and all
termcap entries used by that library.

It just makes good portability sense to carry around anything
you suspect of being platform dependent, and minimizing your
system-dependent API "footprint" for your application, as much
as possible.

-- Terry



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3EB67318.17C3A06C>