With earlier versions of RPC and TIRPC it seems that svctcp_create()
calles listen() on the socket (as seen by debugger and strace).
Tooltalk expects this behavior.
However, with newer systems (ArchLinux 5/18+ and similar bleeding edge
versions of SuSE's equivalent: Tumbleweed), this behavior seems to
have changed.
ttsession goes into an infinite loop trying to accept() a connection
in the TIRPC library (via svc_getreqset()).
It appears listen() is no longer called on the socket when it is
created via svctcp_create(). The hack in this commit, always causes
listen() to be called on the socket, and seems to resolve the problem.
But it is a hack I think. I don't know if this is the correct
behavior of svctcp_create() or we were just lucky before.
There were a variety of potential 64b problems due to the complete
lack of prototype declarations. So, we add a file, isam_prototypes.h,
generated mostly by the 'cproto' tool.
We also fixed up some errors that having proper prototypes pointed
out, mainly in passing ints where pointers were expected and vice
versa. The iserase() function was supposed to accept a char *, but
was defined as only accepting a char. Fun stuff like that.
This program has never worked very well, and it may still not work
very well. This commit removes the ancient C++ headers and uses
modern replacements with some changes required due to the different
interfaces.
It builds a lot cleaner, and no longer does stupid things like
deleteing char *, ostream.str()'s, and the like.
This program could be really useful if it worked well. Some thought
should be givien in the future to decouple this SW from dtappbuilder
and maybe just rewrite from scratch.