From owner-freebsd-questions@FreeBSD.ORG Thu Sep 25 03:24:03 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5F921065687 for ; Thu, 25 Sep 2008 03:24:03 +0000 (UTC) (envelope-from unga888@yahoo.com) Received: from web57008.mail.re3.yahoo.com (web57008.mail.re3.yahoo.com [66.196.97.112]) by mx1.freebsd.org (Postfix) with SMTP id 9C5CB8FC1D for ; Thu, 25 Sep 2008 03:24:03 +0000 (UTC) (envelope-from unga888@yahoo.com) Received: (qmail 39957 invoked by uid 60001); 25 Sep 2008 03:24:02 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Message-ID; b=RvaHBysftKc3v+pybnBSWlsu8AIJ8i5aGadl2KS8x6atg5CMhMdS6WY/gaMnT0AHcO+lItPuEyKZ29/WmhCLvl+15iZXlH8yuy+hpvGT005kg+DlhNcxbNhcDrCWaS5h5s+4uZWiPWXxHIZQBsxSO59Z7HyRmDPgpSFL/dAEKZM=; X-YMail-OSG: CV5R0GcVM1kJMK0eKCamVi04LqmBe9yjVLLONSATKd9hNXkbEaxVeRpI9V.fXULKmAOwsdqC3crQ3FJLHEDhK7cLULV_DIVFn_REbJbufIPPfLt8asdwNQhVjVRKK_HWnoyGlZjnrgyYnPwgR_4JTeg4BYXVCtM57H79Qgxoa_rCn7c2Nn5CElakLBrWSLfGw.BN Received: from [220.255.7.147] by web57008.mail.re3.yahoo.com via HTTP; Wed, 24 Sep 2008 20:24:02 PDT X-Mailer: YahooMailWebService/0.7.218.2 Date: Wed, 24 Sep 2008 20:24:02 -0700 (PDT) From: Unga To: freebsd-questions@freebsd.org In-Reply-To: <20080924230717.GE1889@kokopelli.hydra> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <935484.39759.qm@web57008.mail.re3.yahoo.com> Subject: Re: Why not GNU cmp? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: unga888@yahoo.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2008 03:24:04 -0000 --- On Thu, 9/25/08, Chad Perrin wrote: > From: Chad Perrin > Subject: Re: Why not GNU cmp? > To: freebsd-questions@freebsd.org > Date: Thursday, September 25, 2008, 7:07 AM > On Wed, Sep 24, 2008 at 11:05:19AM -0400, matt donovan > wrote: > > On Wed, Sep 24, 2008 at 10:31 AM, Bill Moran > wrote: > > > Unga wrote: > > > > > > > > I have noted FreeBSD uses GNU diff, GNU > diff3 and GNU sdiff. Why FreeBSD > > > uses its own version of cmp? why not use GNU cmp? > Is the GNU cmp not > > > compatible with FreeBSD? > > > > > > The GNU version of cmp is not licensed under the > BSD license. > > > > > > Given enough time/manpower, all the GNU tools in > FreeBSD will eventually > > > be replaced with BSD-licensed versions. > > > > and it's not GNU diff it's BSD diff > > Are you sure about that? I thought FreeBSD was using GNU > diff as its > standard diff, and that a BSD diff was only available > through ports > (thanks in part to the efforts of someone working on > BSD-licensed text > tools during this year's Google SOC). > FreeBSD diff direcotry is /usr/src/gnu/usr.bin/diff . It refers to /usr/src/contrib/diff for diff sources. It seems FreeBSD apply a patch to GNU diff to get an option 'o' to get a old-style output. Applying a patch on a GNU app does not become BSD unless you write it from scratch. In my past experience, the GNU ncurses and Flex (http://flex.sourceforge.net/) are simple not compatible with FreeBSD even though Flex is licensed under BSD. I wanted to know whether the GNU cmp is also the same fate other than the license because all these GNU tools comes in one package, Diffutils. I was wondering why FreeBSD wrote their own version of cmp. If it just the license, then that's fine. I prefer the BSD versions of diff, etc. when available. Regards Unga