diff options
author | Howard Hinnant <hhinnant@apple.com> | 2011-09-28 21:39:20 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2011-09-28 21:39:20 +0000 |
commit | 3438889dec44b623921f19943ca18b3decb95d92 (patch) | |
tree | 724cc0728516d9546651d600e16bbd8ddd754c7f /libcxx/src/support | |
parent | 7f168777e5313bf40d0b65a630a55c8b537571db (diff) | |
download | bcm5719-llvm-3438889dec44b623921f19943ca18b3decb95d92.tar.gz bcm5719-llvm-3438889dec44b623921f19943ca18b3decb95d92.zip |
Work on Windows port by Ruben Van Boxem
llvm-svn: 140728
Diffstat (limited to 'libcxx/src/support')
-rw-r--r-- | libcxx/src/support/win32/support.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libcxx/src/support/win32/support.cpp b/libcxx/src/support/win32/support.cpp index db80063c690..8ed2921d241 100644 --- a/libcxx/src/support/win32/support.cpp +++ b/libcxx/src/support/win32/support.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -//===--------------------------- support/win32/support.h --------------------------===// +//===----------------------- support/win32/support.h ----------------------===// // // The LLVM Compiler Infrastructure // @@ -8,12 +8,21 @@ // //===----------------------------------------------------------------------===// +#include <support/win32/support.h> +#include <stdarg.h> // va_start, va_end #include <stddef.h> // size_t #include <stdlib.h> // malloc #include <stdio.h> // vsprintf, vsnprintf #include <string.h> // strcpy, wcsncpy -#include <wchar.h> // mbstate_t +int asprintf(char **sptr, const char *__restrict__ fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + int result = vasprintf(sptr, fmt, ap); + va_end(ap); + return result; +} int vasprintf( char **sptr, const char *__restrict__ fmt, va_list ap ) { *sptr = NULL; |