netbsd's patch(1)

Robert Connolly robert at linuxfromscratch.org
Thu Sep 21 17:47:16 PDT 2006


I've constructed an almost complete diffutils package. The goal of this 
package is to have code using use strlcat/strlcpy() and mkstemp() functions, 
compile with gcc4 without warnings, and disregard Windows portability (to 
keep the source simpler):

http://www.topside.org/~ashes/new/bsd-diffutils.tar.bz2

Complete history of additions/modifications are here (to be used later with 
svn):

http://www.topside.org/~ashes/new/bsd-diffutils-patches.tar.bz2

I also want to add the autofoo stuff. Note that -D_GNU_SOURCE must be used for 
vasprintf() in diff/, and asprintf() in sdiff/.

This package includes:

cmp(1) from OpenBSD, BSD-like license (University of California)
diff(1) from OpenBSD, BSD-like license (Todd C. Miller)
diff3(1) from OpenBSD, BSD-like license (Caldera International, and
	University of California)
patch(1) from NetBSD, BSD-like license (Larry Wall)
sdiff(1) from OpenBSD, Public Domain (Raymond Lai)

The lib/ directory contains code for fgetln(), fparseln(), strlcat(), 
strlcpy(), and strtonum(), because most Linux's do not have these in libc.

The sdiff code needs a special version of quene.h, which I included. But Owl 
also has this version of quene.h, so I probably should add a check for it. 
Other than that the code part of this package is done, just the autofoo stuff 
is left.

Note that the sdiff program is compatable with GNU's sdiff options. I'm pretty 
sure there is no loss in functionality in these programs, compared to their 
GNU counterparts. And unlike their GNU counterparts all this code is actively 
maintained.

All of this code compiles with:
-O2 -D_FORTIFY_SOURCE=2 -fstack-protector-all -fpie -pie \
	-Wl,-z,now -Wl,-z,now -Wstack-protector -Wformat=2 -Wall \
	-Werror -Wfatal-errors

robert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/hlfs-dev/attachments/20060921/1dc5281a/attachment.sig>


More information about the hlfs-dev mailing list