From owner-cvs-all Mon Dec 18 10:17:39 2000 From owner-cvs-all@FreeBSD.ORG Mon Dec 18 10:17:35 2000 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from earth.backplane.com (placeholder-dcat-1076843399.broadbandoffice.net [64.47.83.135]) by hub.freebsd.org (Postfix) with ESMTP id 13BA437B400; Mon, 18 Dec 2000 10:17:35 -0800 (PST) Received: (from dillon@localhost) by earth.backplane.com (8.11.1/8.9.3) id eBIIHYk45510; Mon, 18 Dec 2000 10:17:34 -0800 (PST) (envelope-from dillon) Date: Mon, 18 Dec 2000 10:17:34 -0800 (PST) From: Matt Dillon Message-Id: <200012181817.eBIIHYk45510@earth.backplane.com> To: Assar Westerlund Cc: Dag-Erling Smorgrav , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/libkern strlcat.c strlcpy.c src/sys/sys libkern.h src/sys/conf files References: <200012180408.eBI48wg99879@freefall.freebsd.org> <5l66khluty.fsf@assaris.sics.se> <5lsnnlkcf7.fsf@assaris.sics.se> <5l4s01ka92.fsf@assaris.sics.se> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :Dag-Erling Smorgrav writes: :> Ah, so you need to add one line and change another to make them comply :> with the man page. : :More than that. I've not managed to write any strlcpy that is :remarkable smaller than the one in libc in generated code and since I :do not understand the point of squeezing these bytes from the code. :Having the same code as in libc seems like more important to me. But :since you find it important to squeeze down these functions to their :minimal size, it's probably is better left in your hands writing them. : :/assar Just use the libc version of strlcpy/strlcat, guys. strcpy/strcat is not being used in any time-critical code and short of rewriting it in assembly you aren't going to be able to make it much smaller then what we already have in libc. GCC's optimizer does a pretty good job on the libc version. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message