[PATCH v3] Implement strlcpy [BZ #178]

Florian Weimer fweimer@redhat.com
Thu Oct 29 18:55:00 GMT 2015


This version is v2, rebased to current master, with a change to the
documentation to refer to the appropriate place in the GNU Coding Standards.

The reasons why I want to add this to glibc are unchanged.  We can do
much better than the existing implementations:  This version is based on
optimized strlen and memcpy implementations (the defaults, not the
optimized versions).  It has fortify support.  In fortify mode, there
are link-time warnings for common misuses.

Commit message:

This change may cause application code not to compile anymore, but
strlcpy is in the implementation namespace (per C11 7.31.13), so this
is an application issue.

Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Implement-strlcpy-BZ-178.patch
Type: text/x-patch
Size: 29273 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20151029/29482ae4/attachment.bin>


More information about the Libc-alpha mailing list