Simplify POSIX macros

Remove some POSIX types which are not supported on Windows.  This is a breaking change, but we need a better story for supporting types that are not available on all platforms, so the interface needs to change at some point.

Simplify the remaining platform-specific code to minimise the conditionally-compiled portions.