This is used by strsafe.c from mingwex.
Signed-off-by: Jacek Caban <[email protected]>
---
mingw-w64-crt/Makefile.am | 1 +
mingw-w64-crt/stdio/ucrt__vsnwprintf.c | 15 +++++++++++++++
mingw-w64-headers/crt/stdio.h | 6 +-----
3 files changed, 17 insertions(+), 5 deletions(-)
create mode 100644 mingw-w64-crt/stdio/ucrt__vsnwprintf.c
diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index 62ac1dbc..f6dbd652 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -216,6 +216,7 @@ src_ucrtbase=\
stdio/ucrt_snprintf.c \
stdio/ucrt_sprintf.c \
stdio/ucrt__vsnprintf.c \
+ stdio/ucrt__vsnwprintf.c \
stdio/ucrt_vfprintf.c \
stdio/ucrt_vprintf.c \
stdio/ucrt_vsnprintf.c \
diff --git a/mingw-w64-crt/stdio/ucrt__vsnwprintf.c b/mingw-w64-crt/stdio/ucrt__vsnwprintf.c
new file mode 100644
index 00000000..0d995031
--- /dev/null
+++ b/mingw-w64-crt/stdio/ucrt__vsnwprintf.c
@@ -0,0 +1,15 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+
+#undef __MSVCRT_VERSION__
+#define __MSVCRT_VERSION__ 0x1400
+#include <stdio.h>
+
+int __cdecl _vsnwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,va_list _Args) __MINGW_ATTRIB_DEPRECATED_SEC_WARN
+{
+ return __stdio_common_vsprintf(UCRTBASE_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION, _Dest, _Count, _Format, NULL, _Args);
+}
+int __cdecl (*__MINGW_IMP_SYMBOL(_vsnwprintf))(wchar_t *__restrict__, size_t, const wchar_t *__restrict__, va_list) = _vsnwprintf;
diff --git a/mingw-w64-headers/crt/stdio.h b/mingw-w64-headers/crt/stdio.h
index f3ea8e1e..d981f701 100644
--- a/mingw-w64-headers/crt/stdio.h
+++ b/mingw-w64-headers/crt/stdio.h
@@ -1140,11 +1140,7 @@ int vsnwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builti
__builtin_va_end(ap);
return ret;
}
- __mingw_ovr
- int __cdecl _vsnwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,va_list _Args) __MINGW_ATTRIB_DEPRECATED_SEC_WARN
- {
- return __stdio_common_vswprintf(UCRTBASE_PRINTF_DEFAULT_WIDE | UCRTBASE_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION, _Dest, _Count, _Format, NULL, _Args);
- }
+ int __cdecl _vsnwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,va_list _Args) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
#if !defined (__USE_MINGW_ANSI_STDIO) || __USE_MINGW_ANSI_STDIO == 0
__mingw_ovr
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public