|
|
Subscribe / Log in / New account

The ups and downs of strlcpy()

The ups and downs of strlcpy()

Posted Jul 19, 2012 15:40 UTC (Thu) by msbrown (guest, #38262)
Parent article: The ups and downs of strlcpy()

First, an apology to Michael; he sent me (as a member of the joint POSIX/ISO/SUS working group that made the decision not to include strl*() ) a request for more information on the decision -- but his email came to me while I was in a set of meetings and I did not respond in time for this article.

At the time that strl*() was being proposed, the *_s() routines were being discussed in ISO C. As POSIX (and SUS) defer to ISO C in places where there are conflicts this was one reason not to add strl*().

Additionally, the glibc participants pointed out that to *correctly* use strl*() typically required more lines of code than coding the operation from scratch - as noted in Paul Eggert's observations.

The result was that there was no consensus in the WG for adding the functions at the time the 2008 specification was being worked.


to post comments


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