Add config.h/port.h to allow compilation/linking in MSVC.
Fix some unsigned/signed warnings.

6 files changed