Index: libcxx/trunk/src/support/win32/locale_win32.cpp =================================================================== --- libcxx/trunk/src/support/win32/locale_win32.cpp +++ libcxx/trunk/src/support/win32/locale_win32.cpp @@ -87,10 +87,16 @@ int snprintf_l(char *ret, size_t n, locale_t loc, const char *format, ...) { +#if !defined(_LIBCPP_MSVCRT) __libcpp_locale_guard __current(loc); +#endif va_list ap; va_start( ap, format ); +#if defined(_LIBCPP_MSVCRT) + int result = _vsnprintf_l( ret, n, format, loc, ap ); +#else int result = vsnprintf( ret, n, format, ap ); +#endif va_end(ap); return result; }