summaryrefslogtreecommitdiffstats
path: root/libcxx/src
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/src')
-rw-r--r--libcxx/src/support/win32/locale_win32.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libcxx/src/support/win32/locale_win32.cpp b/libcxx/src/support/win32/locale_win32.cpp
index c11adfe4cda..d02d7ffc3cd 100644
--- a/libcxx/src/support/win32/locale_win32.cpp
+++ b/libcxx/src/support/win32/locale_win32.cpp
@@ -87,10 +87,16 @@ int wctob_l( wint_t c, locale_t loc )
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;
}
OpenPOWER on IntegriCloud