Re: src/lib __progname cleanup ; review please
Mark Murray <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.audit |
|---|---|
| Message-ID | <[email protected]> |
> 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 [email protected] with "unsubscribe freebsd-audit" in the body of the message