I was hoping to remove more of them: at least CENV_SYS_BSD for example which
would allow removing several more.
Unfortunately CENV_SYS_BSD is used in tape control behaviour checks.
There is no way of checking those with configure. Worse, how well tape
worked on various Unixen when the tape code was written may be totally
different in later versions.
For signal handling I could at least remove CENV_SYS_BSD by implementing
the suggestion to use sigvec(2) (now deprecated). Falling back to plain
V7-style signal(2) is probably not good enough, so that is an error case
now. Fortunately that is totally unneeded on any modern Unix.
Remove KLH10S_CENV_CPU_ and KLH10S_CENV_SYS_ and CENV_CPUF_BIGEND and
CENV_CPUF_LILEND since they are all already detected and defined by the
configure script.
"klh10.h" includes "cenv.h".
This is possibly needed on systems that need some defines before
including system headers, for Long File Support.
I either moved an existing include line up or added #include "cenv.h"
where none of these was included before.
Note that most of the definitions in the "cenv.h" file are, or should be,
obsolete. Where still relevant, they should be detected by the
configure script.
Instead of accepting new input pkts after checking that the input pkt is shaped OK, do it after actually reading the pkt to ITS. Otherwise read pkts can be overwritten while only partially read to ITS, leading to corruption of data.
I'm terribly sorry about this, which dates back to 2005 (or earlier). The effect is on packets >127 bytes (data), but only when receiving from Ethernet, as far as I can see, where a "trailer" is added at the wrong place, resulting in garbage at the ITS end. (I think I've seen this live occasionally.)
This needs to check for libusb-1.0. Since this shouldn't be linked to
the auxiliary programs, add another Makefile variable to record it in:
CPULIBS.
Stub out calls to outb() if it is unavailable, so that it can at least
use libusb in that case.
Without this, doing something like:
devmount mta0 /tmp/foo
devunmount mta0
(i.e. without specifying fmt=bar to the devmount) will leak a FILE * and
file descriptor.