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