At Fri, 28 Nov 2025 15:16:58 +0000, nia <[email protected]> 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 <[email protected]>
Kelowna, BC +1 250 762-7675 RoboHack <[email protected]>
Planix, Inc. <[email protected]> Avoncote Farms <[email protected]>
pgpj9toLpQitL.pgp
Description: OpenPGP Digital Signature
