From: Bernhard Übelacker bernhardu@mailbox.org
--- include/msvcrt/stdio.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/include/msvcrt/stdio.h b/include/msvcrt/stdio.h index 8c75930322e..1e1d28f3f70 100644 --- a/include/msvcrt/stdio.h +++ b/include/msvcrt/stdio.h @@ -326,6 +326,19 @@ static inline int __cdecl printf_s(const char *format, ...) return ret; }
+static inline int __cdecl _sprintf_l(char *buffer, const char *format, _locale_t locale, ...) __WINE_CRT_PRINTF_ATTR(2, 4); +static inline int __cdecl _sprintf_l(char *buffer, const char *format, _locale_t locale, ...) +{ + int ret; + va_list args; + + va_start(args, locale); + ret = __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION, + buffer, -1, format, locale, args); + va_end(args); + return ret < 0 ? -1 : ret; +} + static inline int __cdecl sscanf(const char *buffer, const char *format, ...) __WINE_CRT_SCANF_ATTR(2, 3); static inline int __cdecl sscanf(const char *buffer, const char *format, ...) { @@ -519,6 +532,7 @@ static inline int __cdecl sprintf(char *buffer, const char *format, ...) _ACRTIMP int __cdecl snprintf(char*,size_t,const char*,...) __WINE_CRT_PRINTF_ATTR(3, 4); _ACRTIMP int __cdecl _snprintf(char*,size_t,const char*,...) __WINE_CRT_PRINTF_ATTR(3, 4); _ACRTIMP int __cdecl sprintf(char*,const char*,...) __WINE_CRT_PRINTF_ATTR(2, 3); +_ACRTIMP int __cdecl _sprintf_l(char*,const char*,_locale_t,...) __WINE_CRT_PRINTF_ATTR(2, 4);
#endif /* !_NO_CRT_STDIO_INLINE */