add port.h and port.cpp, used to port *nix programs to windows