From owner-freebsd-arch@FreeBSD.ORG Tue May 6 02:25:39 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE86E37B401; Tue, 6 May 2003 02:25:39 -0700 (PDT) Received: from cirb503493.alcatel.com.au (c18609.belrs1.nsw.optusnet.com.au [210.49.80.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFC8B43FE1; Tue, 6 May 2003 02:25:35 -0700 (PDT) (envelope-from peterjeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1])h469PNp9003242; Tue, 6 May 2003 19:25:23 +1000 (EST) (envelope-from jeremyp@cirb503493.alcatel.com.au) Received: (from jeremyp@localhost) by cirb503493.alcatel.com.au (8.12.8/8.12.8/Submit) id h469PKaV003241; Tue, 6 May 2003 19:25:20 +1000 (EST) Date: Tue, 6 May 2003 19:25:20 +1000 From: Peter Jeremy To: Harti Brandt Message-ID: <20030506092519.GA3158@cirb503493.alcatel.com.au> References: <20030501182820.GA53641@madman.celabo.org> <20030505110601.H53365@beagle.fokus.fraunhofer.de> <20030505175426.GA19352@madman.celabo.org> <20030506093754.B838@beagle.fokus.fraunhofer.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030506093754.B838@beagle.fokus.fraunhofer.de> User-Agent: Mutt/1.4.1i cc: freebsd-arch@freebsd.org Subject: Re: Re: `Hiding' libc symbols X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2003 09:25:40 -0000 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