[libcxx-commits] [PATCH] D59525: Speed up certain locale functions	on Windows
    Tom Anderson via Phabricator via libcxx-commits 
    libcxx-commits at lists.llvm.org
       
    Tue Mar 19 13:19:46 PDT 2019
    
    
  
thomasanderson updated this revision to Diff 191380.
thomasanderson marked 2 inline comments as done.
thomasanderson edited the summary of this revision.
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59525/new/
https://reviews.llvm.org/D59525
Files:
  src/support/win32/locale_win32.cpp
Index: src/support/win32/locale_win32.cpp
===================================================================
--- src/support/win32/locale_win32.cpp
+++ 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;
 }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59525.191380.patch
Type: text/x-patch
Size: 610 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190319/52a6b791/attachment.bin>
    
    
More information about the libcxx-commits
mailing list