Revert "fix uptime calculation for solaris"

This reverts commit 4acdab76b8f8442ba2932922a61fe291e422bd06.

(cherry picked from commit 4a7182fb8fbfeb5835208d76d4e1f118f32d46cf)
Fix "suggest parentheses" warning.

(cherry picked from commit 6e9b5b45174c2d09bacde50474fe09270a512aae)
Added missing include, Solaris was failing compilation.

(cherry picked from commit c1ddb39596f78feff9055f31895e2c8162cf4faf)
Test for isfinite().

Fixes compilation on Solaris 9.

(cherry picked from commit 908a42370cd924c4e6544908a4d434c8b5694e15)
Mark setenv() as deprecated, putenv() is a more portable alternative.

(cherry picked from commit 84e2b96bd685bcf1af069cc3f57df073475a2408)
Fix Solaris missing definition.

(cherry picked from commit 35674f74a2d6c82c42ef1e43ceea5e8a17c041d7)
Always include platform.h first in tests, by always including test.h first.

(cherry picked from commit 46b4e06692fce7622a45e13815703cbfe363f1e3)
Removed shady piece of code that caused linking error on Solaris 9.

(cherry picked from commit fd612a03f4ea54fb5cf8056db2af3888704b9747)
Fix warning about signed char array subscript on Solaris.

(cherry picked from commit bf755073797054086e0b27e66729fbdd10908e1d)
Fix warnings on Solaris by including platform.h first.

(cherry picked from commit f301a2c2b3a2222802f78ad27bd08cb41e80e6d6)
file_writer_test was refactored.

The reason is that previously we were redefining libc's fwrite() to
change the output location of WriterWrite(). However, on Solaris 9
fwrite() is also used in our printf() replacement which is called for
other reasons in the tests, so random crashes/behaviour was happening.

The test is now including the writer.c source file directly, which
overrides fwrite() only if #ifdef CFENGINE_TEST.

(cherry picked from commit b1287cf9077c56d7886a3d7506d957cf464eaee1)
On Solaris uptime was wrong, fix it to read the proper kstat statistic.

(cherry picked from commit 19bdfc05b6eebeba7d5c9821b5d68aab317ad962)
Added two ways to compute uptime on UNIX.

Tested on Linux and Solaris 9.

(cherry picked from commit c36dae4584c30e0a03034ccc52a6083e2539190a)
Fix dependencies for sysinfo_test.

(cherry picked from commit aed8c697eea23622d2b0a49e91f465214080a82c)
Print uptime in sysinfo_test so that it can be verified visually.

(cherry picked from commit 7958dcf7fb1364785f00fa9b41e79ea4e36cf8ee)
Prioritize uptime alternatives in headers, not in implementation.

Also simplified the logic a bit, since libpcre is now a hard dependency,
so we can always parse the "uptime" command output thus uptime
calculation will never fail.

(cherry picked from commit 1b8de7f34a38631587c4b5491302436ec4cc92bc)
Solaris 10 kstat gives absurd boot_time.

(cherry picked from commit 09b9ab30c5a583adc6053dea7f7f4466e03f14e1)
Redmine #6171: Improve acceptance test speed on Windows.

Run the entire test suite under one single GAINROOT umbrella, instead
of launching it for each test. This dramatically improves the testing
speed on Windows.

(cherry picked from commit 988641deb60a4d6947a1e5e28bb1c591b4d2d0b9)
Redmine #6215, #6220: Avoid Solaris ISA error because of fakeroot.

It boils down to certain tools being 64-bit, while fakeroot is 32-bit,
so the fakeroot library preload fails which causes further problems
later. Conveniently however, Solaris comes with alternate 32-bit
tools, we just need to know where to look for them. So specify these
alternate folders when looking for platform tools.

(cherry picked from commit c8cbffed8e73bc9f14d1573f0063a4ce732edcf7)
Revert "Redmine#6220: on Solaris 10 acceptance tests, use a Perl sort to enable 10_files/02_maintain/changes_depth_search.cf"

This reverts commit c95775ffae980ba47f0d8cd5df26a139aadbefd7.

(cherry picked from commit 8e76c87526246bb84e8766f98bccfdb9ebc157ba)