Piotr Caban : msvcrt: Make setlocale working with per thread locales.