>From 3b1e345bf6a16e54731107af92c832c2a3a7f08e Mon Sep 17 00:00:00 2001
From: Zhongteng Gui <[email protected]>
Date: Fri, 23 Oct 2026 02:06:05 +0800
Subject: [PATCH] crt: Add missing __MINGW_IMP_SYMBOL

_wcstof_l and __setusermatherr are both declared with _CRTIMP, while
missing __MINGW_IMP_SYMBOL.

Followup of 373c7dd747951e55c5b6207d72ba3f5ea9a70d4e.

See also:
https://github.com/skeeto/w64devkit/blob/v2.10.1/src/mingw/imp-strtof_l.patch

Signed-off-by: Zhongteng Gui <[email protected]>
---
 mingw-w64-crt/misc/dummy__setusermatherr.c | 1 +
 mingw-w64-crt/stdio/_wcstof_l.c            | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/mingw-w64-crt/misc/dummy__setusermatherr.c 
b/mingw-w64-crt/misc/dummy__setusermatherr.c
index 344278686..142fa1e49 100644
--- a/mingw-w64-crt/misc/dummy__setusermatherr.c
+++ b/mingw-w64-crt/misc/dummy__setusermatherr.c
@@ -9,3 +9,4 @@
 
 #undef __setusermatherr
 void __setusermatherr(__UNUSED_PARAM(int (__cdecl *f)(struct _exception *))) { 
}
+void (*__MINGW_IMP_SYMBOL(__setusermatherr))(int (__cdecl *)(struct _exception 
*)) = __setusermatherr;
diff --git a/mingw-w64-crt/stdio/_wcstof_l.c b/mingw-w64-crt/stdio/_wcstof_l.c
index af5110943..3e9178d55 100644
--- a/mingw-w64-crt/stdio/_wcstof_l.c
+++ b/mingw-w64-crt/stdio/_wcstof_l.c
@@ -8,6 +8,7 @@
 #include <errno.h>
 #include <math.h>
 #include <locale.h>
+#include <wchar.h>
 
 float _wcstof_l( const wchar_t *nptr, wchar_t **endptr, _locale_t _Locale)
 {
@@ -26,3 +27,4 @@ float _wcstof_l( const wchar_t *nptr, wchar_t **endptr, 
_locale_t _Locale)
   }
   return ret;
 }
+float (*__MINGW_IMP_SYMBOL(_wcstof_l))(const wchar_t *, wchar_t **, _locale_t) 
= _wcstof_l;
-- 
2.56.0.windows.2



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to