Date: Tue, 26 Mar 2002 08:24:53 +0000 From: Mark Murray <mark@grondar.za> To: Dag-Erling Smorgrav <des@ofug.org> Cc: audit@FreeBSD.ORG Subject: Re: src/lib __progname cleanup ; review please Message-ID: <200203260824.g2Q8OrxG078620@grimreaper.grondar.org> In-Reply-To: <xzpsn6oa7pp.fsf@flood.ping.uio.no> ; from Dag-Erling Smorgrav <des@ofug.org> "25 Mar 2002 18:16:34 %2B0100." References: <xzpsn6oa7pp.fsf@flood.ping.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
> The name "getprogname" is in the application namespace. If an > application that calls err(3) (directly or indirectly) defines a > non-static function or variable called getprogname, then err(3) will > use that instead of the "real" getprogname(), possibly with very > unpleasant consequences. You should therefore rename getprogname() to > _getprogname(), which is in the implementation namespace, use only > _getprogname() internally in libc, and add getprogname() as a weak > alias for _getprogname() like this: > > __weak_alias(getprogname, _getprogname) This does not work (getprogname is not in the library, whereas _getprogname is). If I grep -r for __weak_alias, I only find what looks like deprecated uses in libraries. It is not documented or declared anywhere else. M -- o Mark Murray \_ O.\_ Warning: this .sig is umop ap!sdn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203260824.g2Q8OrxG078620>