On Mon, 27 Sep 2010, Carlos R. Mafra wrote: > Yes, they do. See > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=lib/string.c;h=f71bead1be3efaf5694cbbe1df1d59edb18b74ae;hb=HEAD > > /** > * strlcat - Append a length-limited, %NUL-terminated string to another > * @dest: The string to be appended to > * @src: The string to append to it > * @count: The size of the destination buffer. > */ > size_t strlcat(char *dest, const char *src, size_t count) > { > size_t dsize = strlen(dest); > size_t len = strlen(src); > size_t res = dsize + len; > > /* This would be a bug */ > BUG_ON(dsize >= count); > > dest += dsize; > count -= dsize; > if (len >= count) > len = count-1; > memcpy(dest, src, len); > dest[len] = 0; > return res; > }
this is not interchangeable with the bsd version (note that it doesn't even claim so in the kernel sources). -- [-] mkdir /nonexistent -- To unsubscribe, send mail to [email protected].
