`Hiding' libc symbols
Harti Brandt
brandt at fokus.fraunhofer.de
Wed May 7 06:42:00 PDT 2003
On Wed, 7 May 2003, Christoph Hellwig wrote:
CH>On Wed, May 07, 2003 at 02:32:40AM -0700, David Schultz wrote:
CH>> > strlcpy(struct string *a, struct string *b)
CH>> > {
CH>> > if (a->size == 0) {
CH>> > b->size = 0;
CH>> > return;
CH>> > }
CH>> > /* really copy the string */
CH>> > }
CH>>
CH>> Hmm...but that program is broken. If someone overrides a symbol
CH>> reserved by the C standard, he deserves whatever he gets. It is
CH>> not unreasonable to expect applications to avoid using reserved
CH>> symbols for thier own purposes.
CH>
CH>strlcpy is not in any standard..
It is in ANSI's standard namespace...
harti
--
harti brandt,
http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private
brandt at fokus.fraunhofer.de, harti at freebsd.org
More information about the freebsd-arch
mailing list