Jacek Caban : stdio.h: Add ucrt vsprintf declaration.
Alexandre Julliard
julliard at winehq.org
Thu Feb 20 18:26:13 CST 2020
Module: wine
Branch: master
Commit: a68c92d45a61427698e1b901dac3c9e97c5de495
URL: https://source.winehq.org/git/wine.git/?a=commit;h=a68c92d45a61427698e1b901dac3c9e97c5de495
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Feb 20 15:21:55 2020 +0100
stdio.h: Add ucrt vsprintf declaration.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
include/msvcrt/stdio.h | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/include/msvcrt/stdio.h b/include/msvcrt/stdio.h
index 8eef90bbf6..5fe472ef3c 100644
--- a/include/msvcrt/stdio.h
+++ b/include/msvcrt/stdio.h
@@ -159,7 +159,6 @@ int __cdecl vfprintf(FILE*,const char*,__ms_va_list);
int __cdecl vfprintf_s(FILE*,const char*,__ms_va_list);
int __cdecl vprintf(const char*,__ms_va_list);
int __cdecl vprintf_s(const char*,__ms_va_list);
-int __cdecl vsprintf(char*,const char*,__ms_va_list);
int __cdecl vsprintf_s(char*,size_t,const char*,__ms_va_list);
unsigned int __cdecl _get_output_format(void);
unsigned int __cdecl _set_output_format(void);
@@ -196,10 +195,18 @@ static inline int __cdecl _vscprintf(const char *format, __ms_va_list args)
return ret < 0 ? -1 : ret;
}
+static inline int __cdecl vsprintf(char *buffer, const char *format, __ms_va_list args)
+{
+ int ret = __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION,
+ buffer, -1, format, NULL, args);
+ return ret < 0 ? -1 : ret;
+}
+
#else /* _UCRT */
_ACRTIMP int __cdecl _vscprintf(const char*,__ms_va_list);
_ACRTIMP int __cdecl _vsnprintf_s(char*,size_t,size_t,const char*,__ms_va_list);
+_ACRTIMP int __cdecl vsprintf(char*,const char*,__ms_va_list);
int __cdecl _vsnprintf(char*,size_t,const char*,__ms_va_list);
static inline int vsnprintf(char *buffer, size_t size, const char *format, __ms_va_list args) { return _vsnprintf(buffer,size,format,args); }
More information about the wine-cvs
mailing list