On Mon, 27 Sep 2010, Carlos R. Mafra wrote:
> In the linux kernel lib/string.c there seems to be a "simpler" strlcpy()
> implementation:
> if (size) {
> size_t len = (ret >= size) ? size - 1 : ret;
> memcpy(dest, src, len);
i am not sure that on the strings (length-wise) wm operates on,
calling out to libc for a (potentially faster (than a loop)) memcpy
would pay off (otoh, it might not matter).
> Perhaps we should just copy this into wmaker and use it without
> even bothering to check for bsd libs and stuff? I think it would
> be simpler and it would avoid some #ifdefs etc.
do they have a matching strlcat? if not, i definitely don't want to
mix them; if yes, maybe.
all in all, i feel more comfortable with the bsd versions.
(ps. could you push yesterday's osdep_stub patch?)
--
[-]
mkdir /nonexistent
--
To unsubscribe, send mail to [email protected].