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):
Complete history of additions/modifications are here (to be used later with
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
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
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 \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the hlfs-dev