From owner-freebsd-current@FreeBSD.ORG Fri Jun 26 16:11:13 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8363106564A; Fri, 26 Jun 2009 16:11:13 +0000 (UTC) (envelope-from shuvaev@physik.uni-wuerzburg.de) Received: from mailrelay.rz.uni-wuerzburg.de (mailrelay.rz.uni-wuerzburg.de [132.187.3.28]) by mx1.freebsd.org (Postfix) with ESMTP id 633B28FC0A; Fri, 26 Jun 2009 16:11:13 +0000 (UTC) (envelope-from shuvaev@physik.uni-wuerzburg.de) Received: from virusscan.mail (localhost [127.0.0.1]) by mailrelay.mail (Postfix) with ESMTP id 2C85DA089F; Fri, 26 Jun 2009 18:10:58 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by virusscan.mail (Postfix) with ESMTP id 1EE0CA089D; Fri, 26 Jun 2009 18:10:58 +0200 (CEST) Received: from mail.physik.uni-wuerzburg.de (wthp192.physik.uni-wuerzburg.de [132.187.40.192]) by mailmaster.uni-wuerzburg.de (Postfix) with ESMTP id 09F22A0894; Fri, 26 Jun 2009 18:10:58 +0200 (CEST) Received: from wep4035 ([132.187.37.35]) by mail.physik.uni-wuerzburg.de (Lotus Domino Release 8.0.2FP1HF244) with ESMTP id 2009062618105763-15846 ; Fri, 26 Jun 2009 18:10:57 +0200 Received: by wep4035 (sSMTP sendmail emulation); Fri, 26 Jun 2009 18:10:57 +0200 Date: Fri, 26 Jun 2009 18:10:57 +0200 From: Alexey Shuvaev To: Gabor Kovesdan Message-ID: <20090626161057.GA47554@wep4035.physik.uni-wuerzburg.de> References: <4A246C4D.6080409@FreeBSD.org> <4A407CB1.2060107@FreeBSD.org> MIME-Version: 1.0 In-Reply-To: <4A407CB1.2060107@FreeBSD.org> Organization: Universitaet Wuerzburg User-Agent: Mutt/1.5.19 (2009-01-05) X-MIMETrack: Itemize by SMTP Server on domino1/uni-wuerzburg(Release 8.0.2FP1HF244 | April 7, 2009) at 06/26/2009 06:10:57 PM, Serialize by Router on domino1/uni-wuerzburg(Release 8.0.2FP1HF244 | April 7, 2009) at 06/26/2009 06:10:57 PM Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at uni-wuerzburg.de Cc: FreeBSD Current Subject: Re: RFC: Replacing bc/dc to BSDL versions X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2009 16:11:14 -0000 On Tue, Jun 23, 2009 at 08:56:49AM +0200, Gabor Kovesdan wrote: > Gabor Kovesdan escribi=F3: >> Hello, >> >> as you might know, I'm working on a BSDL grep. It isn't totally ready =20 >> yet, because there are compatibility issues, which I have to resolve. =20 >> But looking at another BSDL tools, I've found out that OpenBSD has =20 >> BSDL bc and dc utilities. I've thought of replacing them. I think in =20 >> the bc/dc case, such a strict GNU compatibility isn't necessary as in =20 >> the case of grep, so we may replace them in base system. If there's no = >> objection to replacing them, I'll post a patch for review. > Thanks for all your input. It took a while because of other priorities =20 > but I've made some tests concerning BSDL bc/dc. I've made a complete =20 > buildworld and tried mergemaster, which worked fine. I've also checked =20 > the GNU regression tests comparing the two versions. There's little =20 > difference. The speed is varying, sometimes GNU is faster, sometimes the = =20 > BSDL versions. The accuracy seems to be the same up to 18 digits after =20 > the decimal point. I've also checked the OpenBSD regression tests found = > only one case, which didn't work but these tests seem to be specific for = =20 > BSDL bc/dc as they don't really work with the GNU version. > > I've made a patch, which doesn't remove GNU bc/dc yet, just detaches =20 > them from the build so that in case of a regression we can easily revert = =20 > while the problem is fixed: > http://kovesdan.org/patches/bcdc.diff > Thanks! I'm running the system with BSD bc/dc now. The only small thing I've noticed is: ~> dc -h dc: invalid option -- h usage: dc [-hVx] [-e expression] [file] ~> dc --help usage: dc [-hVx] [-e expression] [file] This seems to come from this line in dc.c: + /* accept and ignore a single dash to be 4.4BSD dc(1) compatible */ + while ((ch =3D getopt=5Flong(argc, argv, "e:f:Vx", long=5Foptions, = NULL)) !=3D -1) { Possibly one should just use "e:f:Vhx"? Otherwise looks good, I'm using dc from time to time. Alexey.