Date: Wed, 7 May 2003 11:18:04 +0200 (CEST) From: Harti Brandt <brandt@fokus.fraunhofer.de> To: Dag-Erling Smorgrav <des@ofug.org> Cc: freebsd-arch@freebsd.org Subject: Re: `Hiding' libc symbols Message-ID: <20030507111600.H3008@beagle.fokus.fraunhofer.de> In-Reply-To: <xzp1xzbg8zc.fsf@flood.ping.uio.no> References: <20030505175426.GA19352@madman.celabo.org> <xzpk7d53zu5.fsf@flood.ping.uio.no> <20030505231135.GA21953@madman.celabo.org> <xzpy91k3j9n.fsf@flood.ping.uio.no> <xzpllxkez78.fsf@flood.ping.uio.no> <xzp8ytjgbq4.fsf@flood.ping.uio.no> <xzp1xzbg8zc.fsf@flood.ping.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 6 May 2003, Dag-Erling Smorgrav wrote: DS>"Andrey A. Chernov" <ache@nagual.pp.ru> 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><math.h> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030507111600.H3008>