Currently, _CRT_INTERNAL_LOCAL_PRINTF_OPTIONS only affects the format for wide strings, but include it everywhere for consistency.
Signed-off-by: Martin Storsjö <mar...@martin.st> --- mingw-w64-crt/stdio/ucrt__scprintf.c | 2 +- mingw-w64-crt/stdio/ucrt__snprintf.c | 2 +- mingw-w64-crt/stdio/ucrt__vscprintf.c | 2 +- mingw-w64-crt/stdio/ucrt__vsnprintf.c | 2 +- mingw-w64-crt/stdio/ucrt_fprintf.c | 2 +- mingw-w64-crt/stdio/ucrt_printf.c | 2 +- mingw-w64-crt/stdio/ucrt_snprintf.c | 2 +- mingw-w64-crt/stdio/ucrt_sprintf.c | 2 +- mingw-w64-crt/stdio/ucrt_vfprintf.c | 2 +- mingw-w64-crt/stdio/ucrt_vprintf.c | 2 +- mingw-w64-crt/stdio/ucrt_vsnprintf.c | 2 +- mingw-w64-crt/stdio/ucrt_vsprintf.c | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/mingw-w64-crt/stdio/ucrt__scprintf.c b/mingw-w64-crt/stdio/ucrt__scprintf.c index bae7d6016..72e321615 100644 --- a/mingw-w64-crt/stdio/ucrt__scprintf.c +++ b/mingw-w64-crt/stdio/ucrt__scprintf.c @@ -14,7 +14,7 @@ int __cdecl _scprintf(const char * __restrict__ _Format, ...) int ret; va_list _ArgList; va_start(_ArgList, _Format); - ret = __stdio_common_vsprintf(_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, NULL, 0, _Format, NULL, _ArgList); + ret = __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, NULL, 0, _Format, NULL, _ArgList); va_end(_ArgList); return ret; } diff --git a/mingw-w64-crt/stdio/ucrt__snprintf.c b/mingw-w64-crt/stdio/ucrt__snprintf.c index 8aec32612..7b8794c90 100644 --- a/mingw-w64-crt/stdio/ucrt__snprintf.c +++ b/mingw-w64-crt/stdio/ucrt__snprintf.c @@ -14,7 +14,7 @@ int __cdecl _snprintf(char * __restrict__ _Dest, size_t _Count, const char * __r int ret; va_list _Args; va_start(_Args, _Format); - ret = __stdio_common_vsprintf(_CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION, _Dest, _Count, _Format, NULL, _Args); + ret = __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION, _Dest, _Count, _Format, NULL, _Args); va_end(_Args); return ret; } diff --git a/mingw-w64-crt/stdio/ucrt__vscprintf.c b/mingw-w64-crt/stdio/ucrt__vscprintf.c index 0bfe1ff9f..b5c4b8b05 100644 --- a/mingw-w64-crt/stdio/ucrt__vscprintf.c +++ b/mingw-w64-crt/stdio/ucrt__vscprintf.c @@ -10,6 +10,6 @@ int __cdecl _vscprintf(const char * __restrict__ _Format, va_list _ArgList) { - return __stdio_common_vsprintf(_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, NULL, 0, _Format, NULL, _ArgList); + return __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, NULL, 0, _Format, NULL, _ArgList); } int __cdecl (*__MINGW_IMP_SYMBOL(_vscprintf))(const char *__restrict__, va_list) = _vscprintf; diff --git a/mingw-w64-crt/stdio/ucrt__vsnprintf.c b/mingw-w64-crt/stdio/ucrt__vsnprintf.c index a82fd7dde..fbdf4f881 100644 --- a/mingw-w64-crt/stdio/ucrt__vsnprintf.c +++ b/mingw-w64-crt/stdio/ucrt__vsnprintf.c @@ -10,6 +10,6 @@ int __cdecl _vsnprintf(char * __restrict__ _Dest,size_t _Count,const char * __restrict__ _Format,va_list _Args) __MINGW_ATTRIB_DEPRECATED_SEC_WARN { - return __stdio_common_vsprintf(_CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION, _Dest, _Count, _Format, NULL, _Args); + return __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION, _Dest, _Count, _Format, NULL, _Args); } int __cdecl (*__MINGW_IMP_SYMBOL(_vsnprintf))(char *__restrict__, size_t, const char *__restrict__, va_list) = _vsnprintf; diff --git a/mingw-w64-crt/stdio/ucrt_fprintf.c b/mingw-w64-crt/stdio/ucrt_fprintf.c index a07a72cfe..ab223d62f 100644 --- a/mingw-w64-crt/stdio/ucrt_fprintf.c +++ b/mingw-w64-crt/stdio/ucrt_fprintf.c @@ -13,7 +13,7 @@ int __cdecl fprintf(FILE * __restrict__ _File,const char * __restrict__ _Format, __builtin_va_list ap; int ret; __builtin_va_start(ap, _Format); - ret = __stdio_common_vfprintf(0, _File, _Format, NULL, ap); + ret = __stdio_common_vfprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _File, _Format, NULL, ap); __builtin_va_end(ap); return ret; } diff --git a/mingw-w64-crt/stdio/ucrt_printf.c b/mingw-w64-crt/stdio/ucrt_printf.c index 50ac67cbb..4ecf1548c 100644 --- a/mingw-w64-crt/stdio/ucrt_printf.c +++ b/mingw-w64-crt/stdio/ucrt_printf.c @@ -13,7 +13,7 @@ int __cdecl printf(const char * __restrict__ _Format,...) __builtin_va_list ap; int ret; __builtin_va_start(ap, _Format); - ret = __stdio_common_vfprintf(0, stdout, _Format, NULL, ap); + ret = __stdio_common_vfprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, stdout, _Format, NULL, ap); __builtin_va_end(ap); return ret; } diff --git a/mingw-w64-crt/stdio/ucrt_snprintf.c b/mingw-w64-crt/stdio/ucrt_snprintf.c index 8bd8f374c..56bc7400e 100644 --- a/mingw-w64-crt/stdio/ucrt_snprintf.c +++ b/mingw-w64-crt/stdio/ucrt_snprintf.c @@ -13,7 +13,7 @@ int __cdecl snprintf (char * __restrict__ __stream, size_t __n, const char * __r __builtin_va_list ap; int ret; __builtin_va_start(ap, __format); - ret = __stdio_common_vsprintf(_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, __stream, __n, __format, NULL, ap); + ret = __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, __stream, __n, __format, NULL, ap); __builtin_va_end(ap); return ret; } diff --git a/mingw-w64-crt/stdio/ucrt_sprintf.c b/mingw-w64-crt/stdio/ucrt_sprintf.c index 1c1f31739..69ee54cae 100644 --- a/mingw-w64-crt/stdio/ucrt_sprintf.c +++ b/mingw-w64-crt/stdio/ucrt_sprintf.c @@ -13,7 +13,7 @@ int __cdecl sprintf(char * __restrict__ _Dest,const char * __restrict__ _Format, __builtin_va_list ap; int ret; __builtin_va_start(ap, _Format); - ret = __stdio_common_vsprintf(_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, _Dest, (size_t)-1, _Format, NULL, ap); + ret = __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, _Dest, (size_t)-1, _Format, NULL, ap); __builtin_va_end(ap); return ret; } diff --git a/mingw-w64-crt/stdio/ucrt_vfprintf.c b/mingw-w64-crt/stdio/ucrt_vfprintf.c index 59dc20e05..7ee9c9b74 100644 --- a/mingw-w64-crt/stdio/ucrt_vfprintf.c +++ b/mingw-w64-crt/stdio/ucrt_vfprintf.c @@ -10,6 +10,6 @@ int __cdecl vfprintf(FILE * __restrict__ _File,const char * __restrict__ _Format,va_list _ArgList) { - return __stdio_common_vfprintf(0, _File, _Format, NULL, _ArgList); + return __stdio_common_vfprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _File, _Format, NULL, _ArgList); } int __cdecl (*__MINGW_IMP_SYMBOL(vfprintf))(FILE *__restrict__, const char *__restrict__, va_list) = vfprintf; diff --git a/mingw-w64-crt/stdio/ucrt_vprintf.c b/mingw-w64-crt/stdio/ucrt_vprintf.c index 6f30eef42..2964dd1be 100644 --- a/mingw-w64-crt/stdio/ucrt_vprintf.c +++ b/mingw-w64-crt/stdio/ucrt_vprintf.c @@ -10,6 +10,6 @@ int __cdecl vprintf(const char * __restrict__ _Format,va_list _ArgList) { - return __stdio_common_vfprintf(0, stdout, _Format, NULL, _ArgList); + return __stdio_common_vfprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, stdout, _Format, NULL, _ArgList); } int __cdecl (*__MINGW_IMP_SYMBOL(vprintf))(const char *__restrict__, va_list) = vprintf; diff --git a/mingw-w64-crt/stdio/ucrt_vsnprintf.c b/mingw-w64-crt/stdio/ucrt_vsnprintf.c index ecdb01af4..94ed44add 100644 --- a/mingw-w64-crt/stdio/ucrt_vsnprintf.c +++ b/mingw-w64-crt/stdio/ucrt_vsnprintf.c @@ -10,6 +10,6 @@ int __cdecl vsnprintf (char * __restrict__ __stream, size_t __n, const char * __restrict__ __format, va_list __local_argv) { - return __stdio_common_vsprintf(_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, __stream, __n, __format, NULL, __local_argv); + return __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, __stream, __n, __format, NULL, __local_argv); } int __cdecl (*__MINGW_IMP_SYMBOL(vsnprintf))(char *__restrict__, size_t, const char *__restrict__, va_list) = vsnprintf; diff --git a/mingw-w64-crt/stdio/ucrt_vsprintf.c b/mingw-w64-crt/stdio/ucrt_vsprintf.c index de272e6f6..3bdddd6c6 100644 --- a/mingw-w64-crt/stdio/ucrt_vsprintf.c +++ b/mingw-w64-crt/stdio/ucrt_vsprintf.c @@ -10,6 +10,6 @@ int __cdecl vsprintf(char * __restrict__ _Dest,const char * __restrict__ _Format,va_list _Args) __MINGW_ATTRIB_DEPRECATED_SEC_WARN { - return __stdio_common_vsprintf(_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, _Dest, (size_t)-1, _Format, NULL, _Args); + return __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, _Dest, (size_t)-1, _Format, NULL, _Args); } int __cdecl (*__MINGW_IMP_SYMBOL(vsprintf))(char *__restrict__, const char *__restrict__, va_list) = vsprintf; -- 2.34.1 _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public