Include unix_dir.c when compiling under cygwin.
Fix missing type declaration.
Fix poor promiser form for commands promise
Spaces in commands type promisers cause warnings about binary not
existing. Any spaces in the promiser should be in the args attribute.
Closes Redmine 1277
Implement $(sys.cpus) on HP-UX platform

Uses the HP-UX mpctl() function to query the number of processors
available system-wide (as opposed to within a processor set) in order
to populate the $(sys.cpus) variable.

In HP-UX running on Intel Itanium Hyper-Thread Technology processors,
where each CPU core has two virtual cores, the total number of virtual
- rather than physical - cores is provided, which corresponds to the
behavior of the Linux scan of the /proc/stat file with HTT is enabled
on x86 platforms.

On a PA-RISC system, the total number of physical cores is set. The
PA-8900 processor has two physical cores per CPU socket, so an rp8420
with 16 PA-8900 processors will set $(sys.cpus) to 32, as expected.

It may be worthwhile to implement a $(sys.cpusockets) variable too,
in light of things like Oracle and Red Hat licensing.

The mpctl() function is documented at this page:
http://h20000.www2.hp.com/bc/docs/support/SupportManual/c02264569/c02264569.pdf
Replace date +%s in testall with more widely compatible code (Mantis #1254)

In order to calculate the total run time of acceptance tests, the
testall script needs the UNIX seconds - a time() call - of the start
and end times of the test runs. It currently uses the command
"date +%s" to get these times.

Many older OS platforms - such as HP-UX 11.11, Solaris 8 and 9, and
others - do not support the "%s" format for the date command.

This patch creates a unix_seconds() subroutine which uses the modern
"date +%s" command if available, falls back to a Perl "print time()"
call, and failing that it falls back to pulling the octal date out of
a pax-created cpio header for an empty temporary file and converting
it to decimal using "bc."

This code will work on every POSIX-compliant platform (since the
pax/cpio/bc approach is strictly POSIX) as well as any platorm that
has a copy of Perl in the path.
Fix incorrect comparison for package manager verify status
Improve user feedback during package installation
Add detection of Joyent SmartOS - a variant of solaris 10
Merge pull request #201 from markburgess/master

Add support for smartos
Prevent adding NaN and infinite real values to JSON by setting to 0

We treat this silently by setting the value to 0.0 when a caller
attempts to add a NaN or infinite value, maintaining the invariant
that no such values should ever exist in a JSON structure.

The JSON standard does not support NaN or inifinity so this is a
pragmatic compromise.
check for BN_new() failure
Allow arbitrary shell command in cfruncommand (Mantis #1268)

cfruncommand may contain arbirtrary shell command, but was validated as an
absolute path. Relax the constraint to match the semantics.
Sanely reimplement splayclasses() (Mantis #1307)

Previously due to miscalculation in CFEngine, daily splayclass was actually
triggered every hour on ~4.17% of all computers.

Existing logic was very opaque, reimplement it sanely.
Allow paths up to 4096 bytes in MD5 network protocol command (Redmine #1199)

Previously filenames were silently truncated. Full audit of filename paths
handling and error modes is pending.
Refresh more state on cf-serverd reload (Redmine #1487)

Previously roles and ACLs on resources were leaking memory over time.
Split setting timeout on fd into separate function
Implement receive network timeout on server-side

Previously stale connections were stuck for a long time if something went wrong
(up to several hours), so server may ran out of connection limit.
Decrease duplication of code
Fix wrong message if abortclass kicks in (Redmine #1077)
Restore scopes after reloading policies in cf-monitord.

(Redmine #1485)