On Wed, 27 Nov 2024, Pali Rohár wrote:

This ensures that mingwex wprintf implementation will not be used and
statically linked when not needed. And also make it more predictable as %ls
format is always using wide string.

But the mingwex implementation shouldn't really be used here anyway? All of mingw-w64-crt is compiled with -D__USE_MINGW_ANSI_STDIO=0?

So this shouldn't have any functional effect, it only makes things clearer - or do I misunderstand something here?

---
mingw-w64-crt/crt/crtexe.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mingw-w64-crt/crt/crtexe.c b/mingw-w64-crt/crt/crtexe.c
index cdf5dcd25894..2c6fbd7e7062 100644
--- a/mingw-w64-crt/crt/crtexe.c
+++ b/mingw-w64-crt/crt/crtexe.c
@@ -89,8 +89,8 @@ __mingw_invalidParameterHandler (const wchar_t * 
__UNUSED_PARAM_1(expression),
                                 uintptr_t __UNUSED_PARAM(pReserved))
{
#ifdef __MINGW_SHOW_INVALID_PARAMETER_EXCEPTION
-  wprintf(L"Invalid parameter detected in function %s. File: %s Line: %d\n", 
function, file, line);
-  wprintf(L"Expression: %s\n", expression);
+  __ms_wprintf(L"Invalid parameter detected in function %ls. File: %ls Line: 
%d\n", function, file, line);
+  __ms_wprintf(L"Expression: %ls\n", expression);
#endif
}

Both before and after this change, I get errors due to calling an undefined function, if I compile this file with -D__MINGW_SHOW_INVALID_PARAMETER_EXCEPTION - so I'd like to have that fixed too before I'd be willing to take on this change.

// Martin

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to