summaryrefslogtreecommitdiffstats
path: root/libcxx/include/support/win32/support.h
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/support/win32/support.h')
-rw-r--r--libcxx/include/support/win32/support.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/libcxx/include/support/win32/support.h b/libcxx/include/support/win32/support.h
index 48225690d7a..8ce947a16a3 100644
--- a/libcxx/include/support/win32/support.h
+++ b/libcxx/include/support/win32/support.h
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===--------------------------- support/win32/support.h --------------------------===//
+//===----------------------- support/win32/support.h ----------------------===//
//
// The LLVM Compiler Infrastructure
//
@@ -8,16 +8,24 @@
//
//===----------------------------------------------------------------------===//
+#ifndef _LIBCPP_SUPPORT_WIN32_SUPPORT_H
+#define _LIBCPP_SUPPORT_WIN32_SUPPORT_H
+
/*
Functions and constants used in libc++ that are missing from the Windows C library.
*/
-#if __MINGW32__
-#include <stdio.h>
-#define swprintf snwprintf
-#endif // __MINGW32__
+#include <wchar.h> // mbstate_t
+#include <stdio.h> // _snwprintf
+#define swprintf _snwprintf
+#define vswprintf _vsnwprintf
+
int vasprintf( char **sptr, const char *__restrict__ fmt , va_list ap );
+int asprintf(char **sptr, const char *__restrict__ fmt, ...);
+
size_t mbsnrtowcs( wchar_t *__restrict__ dst, const char **__restrict__ src,
size_t nmc, size_t len, mbstate_t *__restrict__ ps );
size_t wcsnrtombs( char *__restrict__ dst, const wchar_t **__restrict__ src,
size_t nwc, size_t len, mbstate_t *__restrict__ ps );
+
+#endif // _LIBCPP_SUPPORT_WIN32_SUPPORT_H \ No newline at end of file
OpenPOWER on IntegriCloud