From owner-freebsd-arch@FreeBSD.ORG Wed May 7 02:18:08 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 6E45F37B401 for ; Wed, 7 May 2003 02:18:08 -0700 (PDT) Received: from mailhub.fokus.fraunhofer.de (mailhub.fokus.fraunhofer.de [193.174.154.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 22C7343F3F for ; Wed, 7 May 2003 02:18:07 -0700 (PDT) (envelope-from brandt@fokus.fraunhofer.de) Received: from beagle (beagle [193.175.132.100])h479I4E21805; Wed, 7 May 2003 11:18:04 +0200 (MEST) Date: Wed, 7 May 2003 11:18:04 +0200 (CEST) From: Harti Brandt To: Dag-Erling Smorgrav In-Reply-To: Message-ID: <20030507111600.H3008@beagle.fokus.fraunhofer.de> References: <20030505175426.GA19352@madman.celabo.org> <20030505231135.GA21953@madman.celabo.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: "Andrey A. Chernov" cc: freebsd-arch@freebsd.org Subject: 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: Wed, 07 May 2003 09:18:08 -0000 On Tue, 6 May 2003, Dag-Erling Smorgrav wrote: DS>"Andrey A. Chernov" writes: DS>> On Tue, May 06, 2003 at 20:40:35 +0200, Dag-Erling Smorgrav wrote: DS>> > I would like to draw your attention to points b) and c) above and ask DS>> > how you plan to address them. DS>> About b), I don't quite understand, what you mean. If inside the same DS>> application some file includes, say, math.h and use sin() and another file DS>> not includes math.h and defines its own sin() it is error. DS> DS>No. It will lead to surprising results if the file that includes DS> really does use sin(), but if it doesn't there is no reason DS>why the other file can not define an external symbol named sin because DS>sin is in the application namespace in that file. No. The non-macro names in the headers that are defined by C are reserved for external linkage. You may defined a static sin() given that you don't include math.h, but you may never define an external sin(). (This is point 4 in 7.1.3 (at least in my 8/98 draft)). harti -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private brandt@fokus.fraunhofer.de, harti@freebsd.org