Alexandre Julliard : msvcp: Define _vsnprintf().

Alexandre Julliard julliard at winehq.org
Tue Apr 2 16:09:58 CDT 2019


Module: wine
Branch: master
Commit: 4f1f95b1b3e25d302c2a0c4118ca303c649cc9dd
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=4f1f95b1b3e25d302c2a0c4118ca303c649cc9dd

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Apr  2 16:47:01 2019 +0200

msvcp: Define _vsnprintf().

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcp90/msvcp_main.c |  6 ++++++
 dlls/vcruntime140/misc.c  | 10 ++++++++++
 2 files changed, 16 insertions(+)

diff --git a/dlls/msvcp90/msvcp_main.c b/dlls/msvcp90/msvcp_main.c
index 7aef4cd..fbf4a79 100644
--- a/dlls/msvcp90/msvcp_main.c
+++ b/dlls/msvcp90/msvcp_main.c
@@ -136,6 +136,12 @@ int WINAPIV sprintf(char *buf, const char *fmt, ...)
     __ms_va_end(valist);
     return ret;
 }
+
+int __cdecl _vsnprintf( char *buf, size_t size, const char *fmt, __ms_va_list args )
+{
+    return __stdio_common_vsprintf( UCRTBASE_PRINTF_STANDARD_SNPRINTF_BEHAVIOUR,
+                                    buf, size, fmt, NULL, args );
+}
 #endif
 
 static void init_cxx_funcs(void)
diff --git a/dlls/vcruntime140/misc.c b/dlls/vcruntime140/misc.c
index cc64175..028bde5 100644
--- a/dlls/vcruntime140/misc.c
+++ b/dlls/vcruntime140/misc.c
@@ -22,6 +22,10 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(vcruntime);
 
+#define UCRTBASE_PRINTF_STANDARD_SNPRINTF_BEHAVIOUR      (0x0002)
+int __cdecl __stdio_common_vsprintf(unsigned __int64 options, char *str, size_t len, const char *format,
+                                    _locale_t locale, __ms_va_list valist);
+
 int* CDECL __processing_throw(void);
 
 /*********************************************************************
@@ -54,3 +58,9 @@ int __cdecl __uncaught_exceptions(void)
 {
     return *__processing_throw();
 }
+
+int __cdecl _vsnprintf( char *buf, size_t size, const char *fmt, __ms_va_list args )
+{
+    return __stdio_common_vsprintf( UCRTBASE_PRINTF_STANDARD_SNPRINTF_BEHAVIOUR,
+                                    buf, size, fmt, NULL, args );
+}




More information about the wine-cvs mailing list