Module: wine Branch: master Commit: 95be8e4928ac6cd4361ca34f27213fd24ad6fe2c URL: https://source.winehq.org/git/wine.git/?a=commit;h=95be8e4928ac6cd4361ca34f2...
Author: Jacek Caban jacek@codeweavers.com Date: Fri Feb 21 16:41:07 2020 +0100
stdio.h: Add ucrt printf_s and vprintf_s declarations.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
include/msvcrt/stdio.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/include/msvcrt/stdio.h b/include/msvcrt/stdio.h index ebdcd616cb..76bf70d81b 100644 --- a/include/msvcrt/stdio.h +++ b/include/msvcrt/stdio.h @@ -130,7 +130,6 @@ int __cdecl getc(FILE*); int __cdecl getchar(void); char* __cdecl gets(char*); void __cdecl perror(const char*); -int WINAPIV printf_s(const char*,...); int __cdecl putc(int,FILE*); int __cdecl putchar(int); int __cdecl puts(const char*); @@ -148,7 +147,6 @@ int WINAPIV _snscanf_l(const char*,size_t,const char*,_locale_t,...); FILE* __cdecl tmpfile(void); char* __cdecl tmpnam(char*); int __cdecl ungetc(int,FILE*); -int __cdecl vprintf_s(const char*,__ms_va_list); unsigned int __cdecl _get_output_format(void); unsigned int __cdecl _set_output_format(void);
@@ -278,6 +276,22 @@ static inline int WINAPIV printf(const char *format, ...) return ret; }
+static inline int vprintf_s(const char *format, __ms_va_list args) +{ + return __stdio_common_vfprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, stdout, format, NULL, args); +} + +static inline int WINAPIV printf_s(const char *format, ...) +{ + int ret; + __ms_va_list args; + + __ms_va_start(args, format); + ret = __stdio_common_vfprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, stdout, format, NULL, args); + __ms_va_end(args); + return ret; +} + #else /* _UCRT */
_ACRTIMP int WINAPIV _scprintf(const char *,...); @@ -288,9 +302,11 @@ _ACRTIMP int __cdecl _vsprintf_p_l(char*,size_t,const char*,_locale_t,__ms_va_li _ACRTIMP int WINAPIV fprintf(FILE*,const char*,...); _ACRTIMP int WINAPIV fprintf_s(FILE*,const char*,...); _ACRTIMP int WINAPIV printf(const char*,...); +_ACRTIMP int WINAPIV printf_s(const char*,...); _ACRTIMP int __cdecl vfprintf(FILE*,const char*,__ms_va_list); _ACRTIMP int __cdecl vfprintf_s(FILE*,const char*,__ms_va_list); _ACRTIMP int __cdecl vprintf(const char*,__ms_va_list); +_ACRTIMP int __cdecl vprintf_s(const char*,__ms_va_list); _ACRTIMP int __cdecl vsprintf(char*,const char*,__ms_va_list); _ACRTIMP int __cdecl vsprintf_s(char*,size_t,const char*,__ms_va_list);