Redmine #2573; correct mistake in placement of pragmas

The #pragma is not allowed inside functions, so move it outside.
Merge pull request #666 from kacfengine/hpuxFix

Redmine #2573; correct mistake in placement of pragmas
Take alternative workdir into account in test.
Merge pull request #667 from kacfengine/testFix

Take alternative workdir into account in test.
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.
Merge pull request #669 from cduclos/master

Fixing an evident compilation failure
Aggregate changes from 3.5 pre-releases
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.
Merge pull request #675 from cduclos/master

platform.h instead of system headers for HPUX