Make sure list is free'd in case of error. A bit cleanups as well.
If a file starts with the terminator string, at least it won't be ignored if it's longer.
Exit with error if connection is closed before having received CFD_TERMINATOR.
No need for memset, but explicitly set the double bytes to '\0' to show the intent.
Make more clear that we're waiting for double '\0'.
Testcase for Redmine 6569
Support or-entries not evaluated to a scalar

If any entry in an or-list was not evaluated to a scalar, consider it a
"class not set" and evaluate the rest of the entries.

Behavior change for classes promises that use an or constraint where
one of the list entries cannot be evaluated.

Implements redmine 6569
Separate the per-connection stat cache.
If client fails to run time() send 0 in SYNCH packet. Server should then not fail, unless denybadclocks is set.
Testcase for Redmine 3172

Shows that touch attribute ignores warn_only action policy.
Respect warn-only action policy when touching files

Also, use correct logging mechanism and update
compliance status for promise.

Fixes Redmine 3172.
Test case for an aspect of Redmine 6027

If create, depth_search and copy_from attributes are mixed in a
promise, then a file is created unless explicitly marked as a
directory via trailing "/.".
Minor cleanups.

Declare fd when it's needed, and move comment into right location.
Remove comment that adds no value.
Assume promiser is a directory if depth_search is set

depth_search only makes sense if the promiser should be a directory
that might be copied from a remote server. So make sure we execute
the same code as if the policy writer expliclty asked for the promiser
to be created as a directory by suffixing with "/.".

Attempt to fix various redmine tickets reporting that copy_from
promises for remote directories create local files. Assumption is
that network interruption aborts transmission of data that tells
client that remote sources are a directory tree, and lacking the
'/.' in the promiser the client defaults to file creation.

Redmine #3400, 6027
Move test case for bug in files into right place
Record a kept promise only if nothing was repaired.

There is no code anywhere that sets a class "repaired", so this
call to cfPS would happen in all cases where the basedir was
not included, incorrectly setting "kept" classes.

Fixes Redmine 6509
Fix bug in testcase.

The file_select body in those examples never should have
matched the base-directory, so no kept or repaired class
should have been set for it either.
Update with latest test result status for Solaris 10.
Fix fatal error on Mac OS X - redmine 6578

*BSD use unsigned long as second argument to ioctl() while POSIX
 specifies *signed* int.
Merge pull request #1992 from vohi/redmine/3172

Redmine/3172