swiftc(1) requires every -D option to be prefixed with -Xcc, which
is not easy to achieve using autoconf.
Now instead of setting configuration macros like HAVE_LSEEK64 on the
command line using -D, they are defined in config.h, which is generated
by ./configure, ignored by Git, and included by all headers and source
files that use any configuration macro.
The dependency on Makefile has been replaced with a dependency on
Makefile.in and config.h, which helps avoid some redundant full
recompiles after running ./configure, because the configure script
does not overwrit config.h if its content does not change.
The quit-on-monitor-client-disconnect test was non-deterministic
depending on load (eg, other concurrently running tests). Under load,
it was likely that the server did not process the "monitor quit" command
before checking for disconnect, so the server did not terminate.
The fix was to make the monitor interface read and process all queued
input from the client before checking for HUP or ERR condition on the
socket. With this fix, the "sleep 1" kludges before and after the echo
"monitor quit" to the console command are no longer needed.
In the process the monitor interface code was modernised: eg, now it
calls read_nonblock() instead of read(2).
Original DEBUG() and DEBUGF() macros renamed to _DEBUG() and _DEBUGF()
New DEBUG() and DEBUGF() macros, first argument is flagname
New DEBUGF2(foo, bar, ...) macro does if(config.debug.foo||config.debug.bar) test
Replace almost all config.debug.xxx references to IF_DEBUG(xxx)
Make .o files in separate subdirectories for servald and library
Factor struct __sourceloc and __WHENCE__ from "log.h" into "whence.h"
Factor sid_t etc from "serval.h" into "serval_types.h"
Factor rhizome_bid_t etc from "rhizome.h" into "rhizome_types.h"
Do not include "serval.h" in library sources
Add log_stderr.c and logMessage.c for stand-alone executables
The recently added cmp_sockaddr() function does not call stat(2) any
more to compare local AF_UNIX socket address paths, so not it is stable
enough to use for ordering sockaddr structs.
New function: real_sockaddr() converts the file path of a local AF_UNIX
file socket using realpath(3). The MDP client uses it on the sender
address of every MDP reply packet it receives to ensure that symlinks in
the instance path do not cause MDP client failures.
Rename recently added socket_setname() function: make_local_sockaddr().
Finish the work started by Daniel in 2012, by using abstract local
AF_UNIX sockets on platforms that support them (Linux, Android).
Fix all sorts of bugs and issues that prevented the existing MDP and
Monitor client and server code from working with abstract socket names.
Handle selection between normal & abstract sockets in a single place.
overlay_mdp.c tried to have both but this seems like a bug so I've removed the second socket (needs tests).