[PATCH] D42405: libcxx: Rename vasprintf function to __libcpp_vasprintf.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 10:55:44 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL323237: libcxx: Rename vasprintf function to __libcpp_vasprintf. (authored by pcc, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D42405?vs=130998&id=131106#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D42405

Files:
  libcxx/trunk/include/stdio.h
  libcxx/trunk/src/support/win32/locale_win32.cpp
  libcxx/trunk/src/support/win32/support.cpp


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
@@ -13,6 +13,8 @@
 #include <memory>
 #include <type_traits>
 
+int __libcpp_vasprintf(char **sptr, const char *__restrict fmt, va_list ap);
+
 using std::__libcpp_locale_guard;
 
 // FIXME: base currently unused. Needs manual work to construct the new locale
@@ -105,7 +107,7 @@
 int vasprintf_l( char **ret, locale_t loc, const char *format, va_list ap )
 {
     __libcpp_locale_guard __current(loc);
-    return vasprintf( ret, format, ap );
+    return __libcpp_vasprintf( ret, format, ap );
 }
 
 #if !defined(_LIBCPP_MSVCRT)
Index: libcxx/trunk/src/support/win32/support.cpp
===================================================================
--- libcxx/trunk/src/support/win32/support.cpp
+++ libcxx/trunk/src/support/win32/support.cpp
@@ -19,7 +19,7 @@
 // Like sprintf, but when return value >= 0 it returns
 // a pointer to a malloc'd string in *sptr.
 // If return >= 0, use free to delete *sptr.
-int vasprintf( char **sptr, const char *__restrict format, va_list ap )
+int __libcpp_vasprintf( char **sptr, const char *__restrict format, va_list ap )
 {
     *sptr = NULL;
     // Query the count required.
Index: libcxx/trunk/include/stdio.h
===================================================================
--- libcxx/trunk/include/stdio.h
+++ libcxx/trunk/include/stdio.h
@@ -109,13 +109,6 @@
 
 #ifdef __cplusplus
 
-// snprintf
-#if defined(_LIBCPP_MSVCRT_LIKE)
-extern "C" {
-int vasprintf(char **sptr, const char *__restrict fmt, va_list ap);
-}
-#endif
-
 #undef getc
 #undef putc
 #undef clearerr


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42405.131106.patch
Type: text/x-patch
Size: 1747 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180123/3d29a74b/attachment.bin>


More information about the llvm-commits mailing list