msvcp: Define _vsnprintf().

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-04-02 16:47:01 +02:00
parent b360bf81cb
commit 4f1f95b1b3
2 changed files with 16 additions and 0 deletions

View File

@ -136,6 +136,12 @@ int WINAPIV sprintf(char *buf, const char *fmt, ...)
__ms_va_end(valist); __ms_va_end(valist);
return ret; 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 #endif
static void init_cxx_funcs(void) static void init_cxx_funcs(void)

View File

@ -22,6 +22,10 @@
WINE_DEFAULT_DEBUG_CHANNEL(vcruntime); 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); int* CDECL __processing_throw(void);
/********************************************************************* /*********************************************************************
@ -54,3 +58,9 @@ int __cdecl __uncaught_exceptions(void)
{ {
return *__processing_throw(); 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 );
}