modify for mingw