From owner-freebsd-standards Fri Nov 30 5: 9:33 2001 Delivered-To: freebsd-standards@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 7820837B41C for ; Fri, 30 Nov 2001 05:09:27 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by khavrinen.lcs.mit.edu (8.11.4/8.11.4) with ESMTP id fAUD9OG25195 for ; Fri, 30 Nov 2001 08:09:25 -0500 (EST) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id AAA09817; Sat, 1 Dec 2001 00:09:18 +1100 Date: Sat, 1 Dec 2001 00:09:25 +1100 (EST) From: Bruce Evans X-X-Sender: To: Mike Barcroft Cc: Subject: Re: string.diff for review In-Reply-To: <20011128024424.E14652@espresso.q9media.com> Message-ID: <20011130235621.W1251-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 28 Nov 2001, Mike Barcroft wrote: > Mike Barcroft writes: > > Patch attached; comments appreciated. > > This patch has some issues. It is missing the removal of the asm > versions of bzero() and others. I also don't think the tree is ready > for macro versions of these functions just yet, so I'm going to > separate the replacement of bzero and others from the other changes > and generate a new patch. I think it is a mistake to replace any of the functions (that are already implemented as functions) by macros. The recommendation in the standard to replace bzero() by a macro that calls memset() is for applications, not implementations. > Index: include/strings.h POSIX standardized too many SysV mistakes :-(. > +#define bcmp(b1, b2, len) memcpy((b1), (b2), (size_t)(len)) Should use memcmp() and translate the return code if the macro version is kept (see sys/libkern.h to how not to do the reverse of this implementation. memcmp() can't be implemented using bcmp() because bcmp() doesn't return a trinary value). I'll wait for the patch without any changes to bzero() and others before reviewing this any more. The patch should be much smaller :-). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message