summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libcxx/include/stdio.h7
-rw-r--r--libcxx/src/support/win32/locale_win32.cpp4
-rw-r--r--libcxx/src/support/win32/support.cpp2
3 files changed, 4 insertions, 9 deletions
diff --git a/libcxx/include/stdio.h b/libcxx/include/stdio.h
index f1241764016..77a314bf383 100644
--- a/libcxx/include/stdio.h
+++ b/libcxx/include/stdio.h
@@ -109,13 +109,6 @@ void perror(const char* s);
#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
diff --git a/libcxx/src/support/win32/locale_win32.cpp b/libcxx/src/support/win32/locale_win32.cpp
index fdca7efff06..cad9d4e8146 100644
--- a/libcxx/src/support/win32/locale_win32.cpp
+++ b/libcxx/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 asprintf_l( char **ret, locale_t loc, const char *format, ... )
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)
diff --git a/libcxx/src/support/win32/support.cpp b/libcxx/src/support/win32/support.cpp
index dbd1c4c418a..aa636fba50b 100644
--- a/libcxx/src/support/win32/support.cpp
+++ b/libcxx/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.
OpenPOWER on IntegriCloud