Wrong signature for mocked function

In logging_test.c we mock "sendto" to avoid sending data. In HPUX the compiler
is a little bit more strict than anticipated so it was complaining about the
type of the signature. It is interesting that this worked all over the place
and no other compiler complained even though it is evidently a failure.
(cherry picked from commit fbd070496208f87498558cf1bb71b4fddac3c892)
fix for redmine #2635
(cherry picked from commit 49018b38e52f81b0d0f3b663e32fcbcb6544ce23)
Aggregate changes from 3.5 pre-releases
(cherry picked from commit ac11043f9835051d711d628d253d8f402a6d05a0)
Redmine #2675: /bin/bash is not available on all supported plaforms

The test script test/acceptance/08_commands/01_modules/003.cf.script
uses a /bin/bash shebang, and the Bash shell is not available on
stock HP-UX systems among others, preventing the test from running
properly. This commit changes bash to sh to conform with all the
other test scripts.
Using platform.h instead of system headers

This way all the logic for deciding which headers need to be called is
kept inside platform.h.