`Hiding' libc symbols

M. Warner Losh imp at bsdimp.com
Thu May 8 08:35:39 PDT 2003


In message: <20030507143611.A23293 at infradead.org>
            Christoph Hellwig <hch at infradead.org> writes:
: On Wed, May 07, 2003 at 02:32:40AM -0700, David Schultz wrote:
: > >   strlcpy(struct string *a, struct string *b)
: > >   {
: > > 	  if (a->size == 0) {
: > > 		  b->size = 0;
: > > 		  return;
: > > 	  }
: > > 	  /* really copy the string */
: > >   }
: > 
: > Hmm...but that program is broken.  If someone overrides a symbol
: > reserved by the C standard, he deserves whatever he gets.  It is
: > not unreasonable to expect applications to avoid using reserved
: > symbols for thier own purposes.
: 
: strlcpy is not in any standard..

str* symbols are reserved to the implementation symbols.  Any program
that defines them is non-conforming to the standard.

Geeze people, can't you read the whole thread before posting the same
old crap?

Warner


More information about the freebsd-arch mailing list