Module: wine Branch: master Commit: 6bc15730457b780c47374d3e922287cafd36b233 URL: https://source.winehq.org/git/wine.git/?a=commit;h=6bc15730457b780c47374d3e9...
Author: Jacek Caban jacek@codeweavers.com Date: Fri Feb 21 16:40:45 2020 +0100
stdio.h: Add ucrt _snprintf_s declaration.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
include/msvcrt/stdio.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/include/msvcrt/stdio.h b/include/msvcrt/stdio.h index 0fc374b06e..b246182e8c 100644 --- a/include/msvcrt/stdio.h +++ b/include/msvcrt/stdio.h @@ -84,7 +84,6 @@ int __cdecl _putw(int,FILE*); int __cdecl _rmtmp(void); int __cdecl _set_printf_count_output(int); int __cdecl _setmaxstdio(int); -int WINAPIV _snprintf_s(char*,size_t,size_t,const char*,...); char* __cdecl _tempnam(const char*,const char*); int __cdecl _unlink(const char*);
@@ -186,6 +185,17 @@ static inline int __cdecl _vsnprintf_s(char *buffer, size_t size, size_t count, return ret < 0 ? -1 : ret; }
+static inline int __cdecl _snprintf_s(char *buffer, size_t size, size_t count, const char *format, ...) +{ + int ret; + __ms_va_list args; + + __ms_va_start(args, format); + ret = __stdio_common_vsnprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, buffer, size, count, format, NULL, args); + __ms_va_end(args); + return ret; +} + static inline int __cdecl _vscprintf(const char *format, __ms_va_list args) { int ret = __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, @@ -237,6 +247,7 @@ static inline int __cdecl vfprintf_s(FILE *file, const char *format, __ms_va_lis #else /* _UCRT */
_ACRTIMP int WINAPIV _scprintf(const char *,...); +_ACRTIMP int WINAPIV _snprintf_s(char*,size_t,size_t,const char*,...); _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_p_l(char*,size_t,const char*,_locale_t,__ms_va_list);