Port to MSVC