It would be used also in followup changes.
---
 mingw-w64-crt/Makefile.am                  |  1 +
 mingw-w64-crt/crt/crtdll_compat.c          |  5 -----
 mingw-w64-crt/misc/dummy__setusermatherr.c | 11 +++++++++++
 3 files changed, 12 insertions(+), 5 deletions(-)
 create mode 100644 mingw-w64-crt/misc/dummy__setusermatherr.c

diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index 5bb2c6477170..7b8acdfb8ef2 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -428,6 +428,7 @@ src_crtdll=\
   misc/__p__commode.c \
   misc/__p__fmode.c \
   misc/__set_app_type.c \
+  misc/dummy__setusermatherr.c \
   misc/invalid_parameter_handler.c \
   misc/lc_locale_func.c \
   misc/seterrno.c \
diff --git a/mingw-w64-crt/crt/crtdll_compat.c 
b/mingw-w64-crt/crt/crtdll_compat.c
index 39cc30023ecc..0f0b8d4820da 100644
--- a/mingw-w64-crt/crt/crtdll_compat.c
+++ b/mingw-w64-crt/crt/crtdll_compat.c
@@ -5,11 +5,6 @@
  */
 
 #include <internal.h>
-#include <math.h>
-
-/* Define dummy __setusermatherr() function as crtdll.dll does not provide it 
*/
-#undef __setusermatherr
-void __setusermatherr(__UNUSED_PARAM(int (__cdecl *f)(struct _exception *))) { 
}
 
 /* Define __getmainargs() function via crtdll.dll __GetMainArgs() function */
 extern void __GetMainArgs(int *argc, char ***argv, char ***envp, int 
expand_wildcards);
diff --git a/mingw-w64-crt/misc/dummy__setusermatherr.c 
b/mingw-w64-crt/misc/dummy__setusermatherr.c
new file mode 100644
index 000000000000..34427868629b
--- /dev/null
+++ b/mingw-w64-crt/misc/dummy__setusermatherr.c
@@ -0,0 +1,11 @@
+/**
+ * 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.
+ */
+
+#include <internal.h>
+#include <math.h>
+
+#undef __setusermatherr
+void __setusermatherr(__UNUSED_PARAM(int (__cdecl *f)(struct _exception *))) { 
}
-- 
2.20.1



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

Reply via email to