From owner-cvs-all@FreeBSD.ORG Thu Aug 5 22:57:48 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A79FE16A4CE; Thu, 5 Aug 2004 22:57:48 +0000 (GMT) Received: from VARK.homeunix.com (adsl-69-107-119-143.dsl.pltn13.pacbell.net [69.107.119.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FD0443D4C; Thu, 5 Aug 2004 22:57:48 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.homeunix.com (localhost [127.0.0.1]) by VARK.homeunix.com (8.12.11/8.12.10) with ESMTP id i75MwFYV014665; Thu, 5 Aug 2004 15:58:15 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.homeunix.com (8.12.11/8.12.10/Submit) id i75MwFiT014664; Thu, 5 Aug 2004 15:58:15 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Thu, 5 Aug 2004 15:58:15 -0700 From: David Schultz To: Alexey Dokuchaev Message-ID: <20040805225815.GA14607@VARK.homeunix.com> Mail-Followup-To: Alexey Dokuchaev , Tim Robbins , Garance A Drosehn , src-committers@FreeBSD.ORG, cvs-src@FreeBSD.ORG, cvs-all@FreeBSD.ORG References: <200408012045.i71KjtFX087582@repoman.freebsd.org> <20040802034509.GB81089@regency.nsu.ru> <20040802042750.GA24962@cat.robbins.dropbear.id.au> <20040804210524.GA8512@VARK.homeunix.com> <20040805033534.GA11375@regency.nsu.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040805033534.GA11375@regency.nsu.ru> cc: cvs-src@FreeBSD.ORG cc: src-committers@FreeBSD.ORG cc: Garance A Drosehn cc: Tim Robbins cc: cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/usr.bin/patch - Imported sources X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Aug 2004 22:57:48 -0000 On Thu, Aug 05, 2004, Alexey Dokuchaev wrote: > On Wed, Aug 04, 2004 at 02:05:24PM -0700, David Schultz wrote: > > On Mon, Aug 02, 2004, Tim Robbins wrote: > > > On Mon, Aug 02, 2004 at 10:45:09AM +0700, Alexey Dokuchaev wrote: > > > > On Sun, Aug 01, 2004 at 08:45:55PM +0000, Garance A Drosehn wrote: > > > > > gad 2004-08-01 20:45:55 UTC > > > > > > > > > > FreeBSD src repository > > > > > > > > > > src/usr.bin/patch - Imported sources > > > > > Update of /home/ncvs/src/usr.bin/patch > > > > > In directory repoman.freebsd.org:/tmp/cvs-serv87568 > > > > > > > > > > Log Message: > > > > > Import of a BSD-licensed version of `patch', which will eventually > > > > > replace the version we currently have in src/gnu/usr.bin/patch/. > > > > > Among other things, this version includes a --posix option for strict > > > > > POSIX conformance. > > > > > > > > > > This version is the current source from OpenBSD as of today. It is > > > > > their 3.5-release, plus a few updates to patch.c and pch.c that they > > > > > made about three weeks ago. > > > > > > > > May I ask why you preferred OpenBSD's version over NetBSD's? It was > > > > shown in the past that OpenBSD's way of doing thing is a bit rough on > > > > the edges sometimes (humanize_number(3) vs. fmt_scaled(3) and > > > > scan_scaled(3), ftw(3) and nftw(3), etc). > > > > > > Actually, OpenBSD's ftw()/nftw() implementation is better than the one > > > we recently imported, in terms of both style and functionality; I wish we'd > > > gone with it instead. What we have in -CURRENT at the moment is incredibly > > > buggy for such a simple function. The droll, inane comments ("Because > > > errno is our friend") and style violations only make things worse. > > > > I agree about the style. What's wrong with the functionality? > > > > I have no objection to switching to Todd's (much cleaner) [n]ftw() > > implementation, although I'm not aware of any non-stylistic > > problems with the current code. > > I also recall you (David) mentioning that current implementation > does the same thing in half the lines of code, despite its style(9) > deficiencies, and that was the reason why it was imported instead of > OpenBSD's one. Now when Tim says OpenBSD's one is functionally ahead, > I wonder what is better: to improve our (current) version WRT both style > and functionality, probably without doubling the code lines, or make a > step backwards and import OpenBSD version? The [n]ftw() rountines are really simple; anyone who groks fts(3) could implement and test them in a few hours, since they're just wrappers. Therefore, the differences between the two versions in terms of functionality are trivial. However, one important consideration that I didn't think of before when I glanced at the OpenBSD version is that the OpenBSD code is more likely to be maintained by someone else, namely Todd. When I committed Joel's code, it was practically a coin toss between the two in my mind. But Todd's competence speaks for itself, so I'm definitely leaning towards the OpenBSD [n]ftw() implementation now.