Port to cygwin. Warns a lot when compiling, syscalls mostly gone; tests pass.