[patch] abuse of strncpy

Mike Frysinger vapier at gentoo.org
Thu Jun 8 21:34:08 UTC 2006


On Thursday 08 June 2006 17:07, Rob Landley wrote:
> On Wednesday 07 June 2006 10:26 am, Mike Frysinger wrote:
> > On Tuesday 06 June 2006 17:31, Rob Landley wrote:
> > > On Friday 02 June 2006 9:05 am, Robert P. J. Day wrote:
> > > > On Fri, 2 Jun 2006, walter harms wrote:
> > > > > lets call it bb_strlcpy(), so there is less confusion.
> > > > > re,
> > > > >  wh
> > > >
> > > > i have a better idea -- let's not.  in fact, let's do away with this
> > > > whole notion of arbitrarily prefixing modified library routines with
> > > > that thoroughly useless "bb_" prefix.
> > >
> > > I'm not a fan of the bb_prefix.  It's a recent addition, and it was
> > > originally there solely due to name collisions.  I see no downside to
> > > removing it.
> >
> > that'll put us back to having naming space issues then ?
>
> When?  When did we actually have namespace issues?  The bb_blah prefix was
> added to fix a problem we weren't seeing.

i was asking ... generally glibc declares such functions as weak (like the 
str* funcs) so that you can override them without build failures when you 
link statically

i dont know if there is a hard rule about this though, so i'm not sure you can 
just override any old symbol provided by the libc

> As far as I can tell, the prefix started getting added everywhere when the
> shared library went in

*shrug* by not using the standard name, you're guaranteed gcc/glibc wont slip 
in its own version on you

gcc has builtins that can be disabled if we add -fno-builtin, but i'm not sure 
it'll be so easy/sane to override things the libc throws at us via headers
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20060608/a1384772/attachment-0002.pgp 


More information about the busybox mailing list