We don't strictly need it, we can redirect to the right function using __MINGW_ASM_CALL() in the headers - this function was only added in c9eca28decb3aa5213fe22ab1f9883df91d79806 to fix the most immediate breakage after 581532b8e49a0e10cbdfe2332a8c1d61ff3d6820.
Note that we do need to keep ucrt_ms_fwprintf.c; CRT independent files in libmingwex.a do reference __ms_fwprintf, so we need to provide it as an actual symbol. Signed-off-by: Martin Storsjö <mar...@martin.st> --- mingw-w64-crt/Makefile.am | 1 - mingw-w64-crt/stdio/ucrt_ms_fprintf.c | 22 ---------------------- mingw-w64-headers/crt/stdio.h | 5 ++--- 3 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 mingw-w64-crt/stdio/ucrt_ms_fprintf.c diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am index 1fb0fd911..2376c97c7 100644 --- a/mingw-w64-crt/Makefile.am +++ b/mingw-w64-crt/Makefile.am @@ -414,7 +414,6 @@ src_ucrtbase=\ stdio/ucrt_fscanf.c \ stdio/ucrt_fwprintf.c \ stdio/ucrt_fwscanf.c \ - stdio/ucrt_ms_fprintf.c \ stdio/ucrt_ms_fwprintf.c \ stdio/ucrt_printf.c \ stdio/ucrt_scanf.c \ diff --git a/mingw-w64-crt/stdio/ucrt_ms_fprintf.c b/mingw-w64-crt/stdio/ucrt_ms_fprintf.c deleted file mode 100644 index 15588bcae..000000000 --- a/mingw-w64-crt/stdio/ucrt_ms_fprintf.c +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ - -#undef __MSVCRT_VERSION__ -#define _UCRT - -#include <stdio.h> -#include <stdarg.h> - -int __cdecl __ms_fprintf(FILE * restrict file, const char * restrict format, ...) -{ - va_list ap; - int ret; - va_start(ap, format); - ret = __stdio_common_vfprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, file, format, NULL, ap); - va_end(ap); - return ret; -} -int __cdecl (*__MINGW_IMP_SYMBOL(__ms_fprintf))(FILE * restrict, const char * restrict, ...) = __ms_fprintf; diff --git a/mingw-w64-headers/crt/stdio.h b/mingw-w64-headers/crt/stdio.h index 3b154e2b5..3f1d86795 100644 --- a/mingw-w64-headers/crt/stdio.h +++ b/mingw-w64-headers/crt/stdio.h @@ -239,9 +239,8 @@ extern __MINGW_UCRT_ASM_CALL(vprintf) __MINGW_NOTHROW; extern __MINGW_MS_PRINTF(2, 3) __MINGW_ATTRIB_NONNULL(2) - int __cdecl __ms_fprintf (FILE * __restrict__ , const char * __restrict__ , ...) __MINGW_NOTHROW; - // No __MINGW_UCRT_ASM_CALL for __ms_fprintf; this is provided as an - // actual function in the ucrt import libraries. + int __cdecl __ms_fprintf (FILE * __restrict__ , const char * __restrict__ , ...) + __MINGW_UCRT_ASM_CALL(fprintf) __MINGW_NOTHROW; extern __MINGW_MS_PRINTF(2, 0) __MINGW_ATTRIB_NONNULL(2) int __cdecl __ms_vfprintf (FILE * __restrict__ , const char * __restrict__ , va_list) -- 2.43.0 _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public