Provide a missing break;

The -d flag to serverd used to imply -K (debug implies ignore locks).
If this was intended, I'll replace the break with a /* deliberate
fall-through */ comment, but I'm guessing it's simply a mistake.
Fix up some #if-ery to avoid unreachable code.

Some avahi-specific code ended in an exit() and was followed by more
code, which would thus be unreachable when the relevant avahi defines
are enabled.  The code involved also repeated a pair of #if tests in
three places; so make the first set a local define the other two can
use as a simpler test; have a #else clause for the formerly unreached
code; and share the common exit() between the two branches.
Simplify testing on NO_FORK.

Rather than testing it in three places, test it once and put all three
fragments of code in a single conditioned block.
Merge pull request #1503 from ediosyncratic/missing-fall-through

A missing break and some code simplification.
Fix transformer with echo

Do not pass the echo command as a string operand to the shell. Instead,
use $(G.echo) directly, which will work cross-platform.
Fix transformer with echo

On windows, do not pass the echo command as a string operand to the
shell. Instead, use $(G.echo) directly.
Use filestat() instead of perl stat
Suppress failure when using filestat, due to #4791.
new autoconf option to make state directory configurable: --with-statedir=<directory>
Make use of preprocessor macros for static known_dirs.c functions
rename MAX_WORKDIR_LENGTH macro to more generic MAX_DIR_LENGTH
add GetStateDir() and supporting functions
make use of GetStateDir() and replace hardcoded state/ paths
RemoveDates():
- use sizeof on datetime string literal to move computation to compile-time.
- comment on uncertainty of two-digit hh:mm:ss and time-zones shorter
  than three letters.

Pointed out by Edward Welbourne
LogTotalCompliance(): prevent cf-agent from bailing with custom logdir
adjust examples/measure_log.cf comment to account for compile-time statedir
MonNetworkInit(): use GetStateDir() and refactor
MonitorInitialize(): make use of GetStateDir()
make bootstrap.c functions, and their usage, respect GetStateDir()
Last of the needed GetStateDir() usage in generic_agent.c