Date: Thu, 1 May 2003 09:53:45 -0500 From: "Jacques A. Vidrine" <nectar@FreeBSD.org> To: Paul Richards <paul@freebsd-services.com> Cc: freebsd-arch@FreeBSD.org Subject: Re: `Hiding' libc symbols (was Re: cvs commit: src/lib/libc/gen ...) Message-ID: <20030501145345.GA34884@madman.celabo.org> In-Reply-To: <20030501144600.GC1869@survey.codeburst.net> References: <Pine.GSO.4.10.10304300024280.1846-100000@pcnet1.pcnet.com> <20030430043303.GA46365@mero.morphisms.net> <20030430062647.GA82023@rot13.obsecurity.org> <20030430143121.GK39658@survey.codeburst.net> <20030430152708.GA26216@madman.celabo.org> <20030430153645.GL39658@survey.codeburst.net> <20030430164135.GB26508@madman.celabo.org> <20030501140255.GB1869@survey.codeburst.net> <20030501143032.GA34163@madman.celabo.org> <20030501144600.GC1869@survey.codeburst.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 01, 2003 at 03:46:00PM +0100, Paul Richards wrote: [...] > > No, it is done for some 150+ functions. If the technique didn't have > > 150+? I must have missed that in the commit and subsequent discussion. See src/lib/libc/include/namespace.h . [...] > Hmm, perhaps a more correct implementation of our libc would not > use the exported interface to implement the exported interface > (thinking aloud). > > i.e. there'd be a _strlcpy that strlcpy was just a wrapper for > and internally the _strlcpy would be used. Oh, Paul. That is exactly what we are doing today. strlcpy.c: 41 __weak_reference(_strlcpy, strlcpy); 42 /* 43 * Copy src to string dst of size siz. At most siz-1 characters 44 * will be copied. Always NUL terminates (unless siz == 0). 45 * Returns strlen(src); if retval >= siz, truncation occurred. 46 */ 47 size_t _strlcpy(dst, src, siz) 48 char *dst; 49 const char *src; 50 size_t siz; 51 { A libc consumer (getpwent.c): 587 namesize = _strlcpy(&keybuf[1], name, sizeof(keybuf)-1); Cheers, -- Jacques Vidrine . NTT/Verio SME . FreeBSD UNIX . Heimdal nectar@celabo.org . jvidrine@verio.net . nectar@freebsd.org . nectar@kth.se
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030501145345.GA34884>