LWN.net Logo

Here's hoping strlcat gets in

Here's hoping strlcat gets in

Posted May 6, 2009 16:33 UTC (Wed) by epa (subscriber, #39769)
Parent article: Debian switching to EGLIBC

I wonder if the EGLIBC maintainer will be less obstructive about including the sorely needed strlcpy and strlcat functions.


(Log in to post comments)

Here's hoping strlcat gets in

Posted May 6, 2009 17:23 UTC (Wed) by nevyn (subscriber, #33129) [Link]

Probably, although they aren't really that much better (if you want a real string API in C, go use one). Having a compatible version of asprintf() will be nice though (assuming he takes that), and I imagine there's a bunch of other minor things on other people's wishlist.

Here's hoping strlcat gets in

Posted May 6, 2009 17:27 UTC (Wed) by notting (guest, #28878) [Link]

Given a goal of "[striving] to be source and binary compatible with GLIBC", adding functions, or changing the semantics of existing ones, would seem to be out of scope.

Here's hoping strlcat gets in

Posted May 6, 2009 17:31 UTC (Wed) by aurel32 (subscriber, #7059) [Link]

Doing so will break ABI compatibility, so this is unlikely to be done. But those functions are available in libbsd ( http://libbsd.freedesktop.org/ )

Here's hoping strlcat gets in

Posted May 7, 2009 8:03 UTC (Thu) by epa (subscriber, #39769) [Link]

How would adding a function break compatibility? If that were the case, no new function could ever be added to any library without breaking compatibility with the old version.

Here's hoping strlcat gets in

Posted May 7, 2009 9:25 UTC (Thu) by nix (subscriber, #2304) [Link]

It breaks compatibility in that adding a function to eglibc means that you
can no longer reliably replace eglibc with glibc. (Whether this is
problematic is another matter.)

Here's hoping strlcat gets in

Posted May 7, 2009 12:05 UTC (Thu) by epa (subscriber, #39769) [Link]

Obviously, fixing the ARM bug linked in the article also means that you can no longer reliably replace eglibc with glibc, since this would break (or at least break the build) on previously working ARM systems. I think your definition of compatibility is a bit too strict.

Here's hoping strlcat gets in

Posted May 7, 2009 8:46 UTC (Thu) by ncm (subscriber, #165) [Link]

Here's hoping they don't. A more misbegotten function would be hard to imagine if strtok didn't exist already.

Here's hoping strlcat gets in

Posted May 7, 2009 14:46 UTC (Thu) by nix (subscriber, #2304) [Link]

You want misbegotten functions? gets(). Why on earth it wasn't thrown out in the early 1980s along with the rest of the pre-stdio I/O library I have no idea.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds