On Sun, 14 Mar 2010, Paul Harris wrote: > I hadn't heard of strlcpy before,so I googled it: > http://www.cppreference.com/wiki/c/string/strlcpy > > why not just use strncpy ?
because strlcpy/strlcat is much easier, and it can easily be bundled to be used on systems lacking it. > > On 14 March 2010 08:15, Tamas TEVESZ <[email protected]> wrote: > > > > > hi, > > > > what would be the reaction if i were to introduce the use of strlcpy > > and strlcat? > > > > i've been having this itch about all thouse unbounded string ops > > everywhere (just try GNUSTEP_USER_ROOT=`perl -e 'print "a"x1500'` > > getstyle), and while they can be fixed with strncat/strncpy, strl* is > > just easier. > > > > they are almost everywhere by now (except glibc, of course, but it it > > not unprecedented for linux vendors to patch it in), but for those > > systems lacking, a (isc-licensed) reference implementation could be > > lifted easily. > > > > of course i'd be relying heavily on sir raorn to do the autoconf stuff > > :) > > > > -- > > [-] > > > > mkdir /nonexistent > > > > > > -- > > To unsubscribe, send mail to [email protected] > > . > > > -- [-] mkdir /nonexistent -- To unsubscribe, send mail to [email protected].
