various compile fixes for clang and FreeBSD

The patches fix various compile warnings noticed by clang 3.3 on FreeBSD and also to wrap Linuxisms with proper ifdef PLATFORM_LINUX.

The patch for support/posix.mk fixes an annoying packaging issue for all distributions I'd guess. The correct path for manpages is $mandir + man1 section on almost all Linux distributions including FreeBSD.