In some cases replace if (a == null) a = malloc(x); else a =
realloc(a, x); with simple reallocf(a, x). Per ANSI-C, this is
guaranteed to be the same thing.
I've been running these on my system here w/o ill effects for some
time. However, the CTM-express is at part 6 of 34 for the CAM
changes, so I've not been able to do a build world with the CAM in the
tree with these changes. Shouldn't impact anything, but...
changes to bsd.lib.mk can handle building it early enough. Don't
use the same rule for ss_err.h and ss_err.c, else `make -jN' would
run the rule twice concurrently. Don't put ss_err.c out of order
in SRCS; doing so was a kludge to get ss_err.h built early enough
for plain `make'.
Don't put a non-generated file in CLEANFILES.
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
built early enough to always be installed by the `includes' target
in /usr/src/Makefile. This is supposed to be handled by not
installing it if it doesn't exist. However, a stale, uninstallable
copy sometimes exists in the source directory, and the existence
test sometimes found the wrong copy.
specified in the top level Makefiles.
Previously I missed dozens of Makefiles that skip the install after
using `cmp -s' to decide that the install isn't necessary.
when I'm not sure whether or not that directory exists."
Today I discovered that rebuilding /usr/include completely from scratch
doesn't work, because the libss Makefile tries to install headers into
/usr/include/ss, which 'make includes' does not create. The result is that
the libss Makefile plants the header files in /usr/include as individual
files called 'ss,' with the second one overwriting the first, and the
third one overwriting the second. So instead of a directory called
/usr/include/ss, you end up with just one file called /usr/include/ss with
only the last header file in it. Check out /usr/include/ss on freefall
and you'll see what I mean.
I've modified the beforeinstall target in the libss Makefile to check
for the presence of the ${DESTDIR}/usr/include/lbss directory and to
create it if it isn't already there. Hopefully I did it right.
1) Link against object directory version of libcom_err.so.
2) Don't try to install ss_err.h if we haven't made it yet. It's not
on the critical path for `make world' at this point.