Merge branch 'pt/mingw-misc-fixes' into next