This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3] Implement strlcpy [BZ #178]
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Rich Felker <dalias at libc dot org>
- Cc: Tolga Dalman <tolga dot dalman at googlemail dot com>, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, <libc-alpha at sourceware dot org>
- Date: Mon, 9 Nov 2015 12:59:25 +0000
- Subject: Re: [PATCH v3] Implement strlcpy [BZ #178]
- Authentication-results: sourceware.org; auth=none
- References: <56326B79 dot 8070804 at redhat dot com> <20151105211104 dot D10932C3B22 at topped-with-meat dot com> <20151106040125 dot GY8645 at brightrain dot aerifal dot cx> <563C9871 dot 9090700 at linaro dot org> <563E9BE6 dot 40508 at googlemail dot com> <20151108010732 dot GH3818 at brightrain dot aerifal dot cx>
On Sat, 7 Nov 2015, Rich Felker wrote:
> Anyway, in general, if adding a function to glibc is a bad idea,
> adding it in its own separate .so file shipped with glibc is an even
> worse idea. There are no advantages and lots of disadvantages.
While it's trivially true that "adding a function to glibc is a bad idea"
means it's bad to add it to any library in glibc, existing or new, there
may well be cases where the conclusion is "it's a good idea to add this
function to glibc, but in a new library (which might be might not be
linked in automatically via AS_NEEDED in a .so linker script)". Cf.
libmvec or the libinux-syscalls.so.1 discussion. It's just that I don't
see strlcpy, strlcat or explicit_bzero as such cases - I see them as cases
that belong in libc.
--
Joseph S. Myers
joseph@codesourcery.com