tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Replacing GNU diff



At Fri, 28 Nov 2025 15:16:58 +0000, nia <nia%NetBSD.org@localhost> wrote:
Subject: Replacing GNU diff
>
> I chose FreeBSD diff as a basis rather than OpenBSD diff primarily
> because more work has been done to support GNU extensions, making
> it essentially feature-compatible with our GPLv2 diff. OpenBSD diff3
> unfortunately also relies on ksh.

Saying OpenBSD's diff3 "relies on ksh" is a bit strong.

The first thing it does is turn on POSIX mode after all.

I think the only thing the script needs beyond what any old-fashioned
Bourne shell provides is getopts and arithmetic expressions, both of
which are of course available in NetBSD's /bin/sh.

Note also that OpenBSD _only_ has their version of pdksh -- they install
it as /bin/sh.

> It seems to work well. A future task is porting some of the ATF tests
> from FreeBSD also.

I've been exclusively using the OpenBSD version for a long time now, and
it does work A-OK for everything I've needed.

I don't have any preference for OpenBSD's version vs. FreeBSD's -- I
just wanted to point out that the diff3 script from OpenBSD was actually
portable enough to be used with NetBSD's /bin/sh too.

--
					Greg A. Woods <gwoods%acm.org@localhost>

Kelowna, BC     +1 250 762-7675           RoboHack <woods%robohack.ca@localhost>
Planix, Inc. <woods%planix.com@localhost>     Avoncote Farms <woods%avoncote.ca@localhost>

Attachment: pgpDg0NiKILR8.pgp
Description: OpenPGP Digital Signature



Home | Main Index | Thread Index | Old Index