Hi all, I've been working on a patch to import diff and diff3 from FreeBSD to replace GNU diffutils in base (when MKBSDDIFF is enabled).
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. Work was done to remove or port FreeBSD-specific code, avoid the need for defining _OPENBSD_SOURCE to compile it, fixing some typing problems so that it compiles with WARNS. A couple of features were also removed since they are beyond the scope for replacing GPLv2 diff and complicate the code. The patch that integrates the result into our build system is available here: https://cdn.NetBSD.org/pub/NetBSD/misc/nia/diffimport.20251128.patch.gz (also available over plain ftp for your vax) It seems to work well. A future task is porting some of the ATF tests from FreeBSD also.
