Date: Tue, 6 May 2003 19:25:20 +1000 From: Peter Jeremy <peterjeremy@optushome.com.au> To: Harti Brandt <brandt@fokus.fraunhofer.de> Cc: freebsd-arch@freebsd.org Subject: Re: Re: `Hiding' libc symbols Message-ID: <20030506092519.GA3158@cirb503493.alcatel.com.au> In-Reply-To: <20030506093754.B838@beagle.fokus.fraunhofer.de> References: <20030501182820.GA53641@madman.celabo.org> <XFMail.20030501144502.jhb@FreeBSD.org> <20030505110601.H53365@beagle.fokus.fraunhofer.de> <20030505175426.GA19352@madman.celabo.org> <20030506093754.B838@beagle.fokus.fraunhofer.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 06, 2003 at 09:46:12AM +0200, Harti Brandt wrote: >On Mon, 5 May 2003, Jacques A. Vidrine wrote: >JAV>So, I advocate hiding all symbols in libc by default. The Real World >JAV>doesn't seem to care whether the symbols are defined by any standard or >JAV>not. > >No. If I define my own printf() I want that printf to be called even by >library internal calls. What if I define my own printf() that doesn't fully implement all the functionality of the FreeBSD printf()? It works meets all the requirements for my code (and maybe even runs correctly elsewhere) but doesn't work on FreeBSD because a library internal call (hypothetically) relies on functionality that I don't need. This is most likely to surface in functions like strlcpy(), strlcat() and snprintf() where the return value includes a reference to the size of the buffer that would be required to perform the requested operation without truncation. This is the most likely area where an implementor may cut corners if hir application does not rely on the return value. >The situation may be different for non-standardized functions with names >in the application space like err(). Last time I checked, the base system included a program that included its own err() function - with functionality substantially different to err(3). Peter
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030506092519.GA3158>