crt: Use _CRT_INTERNAL_LOCAL_PRINTF_OPTIONS in narrow printfs Currently, _CRT_INTERNAL_LOCAL_PRINTF_OPTIONS only affects the format for wide strings, but include it everywhere for consistency. Signed-off-by: Martin Storsjö <martin@martin.st>
diff --git a/mingw-w64-crt/stdio/ucrt__scprintf.c b/mingw-w64-crt/stdio/ucrt__scprintf.c index bae7d60..72e3216 100644 --- a/mingw-w64-crt/stdio/ucrt__scprintf.c +++ b/mingw-w64-crt/stdio/ucrt__scprintf.c
@@ -14,7 +14,7 @@ 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 8aec326..7b8794c 100644 --- a/mingw-w64-crt/stdio/ucrt__snprintf.c +++ b/mingw-w64-crt/stdio/ucrt__snprintf.c
@@ -14,7 +14,7 @@ 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 0bfe1ff..b5c4b8b 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 a82fd7d..fbdf4f8 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 a07a72c..ab223d6 100644 --- a/mingw-w64-crt/stdio/ucrt_fprintf.c +++ b/mingw-w64-crt/stdio/ucrt_fprintf.c
@@ -13,7 +13,7 @@ __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 50ac67c..4ecf154 100644 --- a/mingw-w64-crt/stdio/ucrt_printf.c +++ b/mingw-w64-crt/stdio/ucrt_printf.c
@@ -13,7 +13,7 @@ __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 8bd8f37..56bc740 100644 --- a/mingw-w64-crt/stdio/ucrt_snprintf.c +++ b/mingw-w64-crt/stdio/ucrt_snprintf.c
@@ -13,7 +13,7 @@ __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 1c1f317..69ee54c 100644 --- a/mingw-w64-crt/stdio/ucrt_sprintf.c +++ b/mingw-w64-crt/stdio/ucrt_sprintf.c
@@ -13,7 +13,7 @@ __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 59dc20e..7ee9c9b 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 6f30eef..2964dd1 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 ecdb01a..94ed44a 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 de272e6..3bdddd6 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;