Alexandre Julliard : msvcrt: Don't export _matherr().
Alexandre Julliard
julliard at winehq.org
Fri Apr 5 16:04:58 CDT 2019
Module: wine
Branch: master
Commit: 9a364c1a663611f9ef6668ebb71e792f03be1add
URL: https://source.winehq.org/git/wine.git/?a=commit;h=9a364c1a663611f9ef6668ebb71e792f03be1add
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Apr 5 09:27:37 2019 +0200
msvcrt: Don't export _matherr().
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msvcrt/math.c | 28 +++++++++++-----------------
dlls/msvcrt/msvcrt.spec | 1 -
dlls/msvcrt20/msvcrt20.c | 10 ++++++++++
dlls/msvcrt20/msvcrt20.spec | 2 +-
4 files changed, 22 insertions(+), 19 deletions(-)
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index ca181d9..754e46c 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -62,24 +62,26 @@ void msvcrt_init_math(void)
}
/*********************************************************************
- * _matherr (MSVCRT.@)
+ * _matherr (CRTDLL.@)
*/
int CDECL MSVCRT__matherr(struct MSVCRT__exception *e)
{
- int ret;
+ return 0;
+}
- if (e)
- TRACE("(%p = {%d, \"%s\", %g, %g, %g})\n", e, e->type, e->name, e->arg1, e->arg2, e->retval);
- else
- TRACE("(null)\n");
+
+static void math_error(int type, const char *name, double arg1, double arg2, double retval)
+{
+ TRACE("(%d, %s, %g, %g, %g)\n", type, debugstr_a(name), arg1, arg2, retval);
if (MSVCRT_default_matherr_func)
{
- ret = MSVCRT_default_matherr_func(e);
- if (ret) return ret;
+ struct MSVCRT__exception exception = {type, (char *)name, arg1, arg2, retval};
+
+ if (MSVCRT_default_matherr_func(&exception)) return;
}
- switch (e->type)
+ switch (type)
{
case _DOMAIN:
*MSVCRT__errno() = MSVCRT_EDOM;
@@ -94,8 +96,6 @@ int CDECL MSVCRT__matherr(struct MSVCRT__exception *e)
default:
ERR("Unhandled math error!\n");
}
-
- return 0;
}
/*********************************************************************
@@ -107,12 +107,6 @@ void CDECL MSVCRT___setusermatherr(MSVCRT_matherr_func func)
TRACE("new matherr handler %p\n", func);
}
-static inline void math_error(int type, const char *name, double arg1, double arg2, double retval)
-{
- struct MSVCRT__exception exception = {type, (char *)name, arg1, arg2, retval};
- MSVCRT__matherr(&exception);
-}
-
/*********************************************************************
* _set_SSE2_enable (MSVCRT.@)
*/
diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec
index 101e2c7..0c2881d 100644
--- a/dlls/msvcrt/msvcrt.spec
+++ b/dlls/msvcrt/msvcrt.spec
@@ -683,7 +683,6 @@
@ cdecl _makepath(ptr str str str str) MSVCRT__makepath
@ cdecl _makepath_s(ptr long str str str str) MSVCRT__makepath_s
# stub _malloc_dbg(long long str long)
-@ cdecl _matherr(ptr) MSVCRT__matherr
@ cdecl _mbbtombc(long)
# stub _mbbtombc_l(long ptr)
@ cdecl _mbbtype(long long)
diff --git a/dlls/msvcrt20/msvcrt20.c b/dlls/msvcrt20/msvcrt20.c
index e8d2b3c..3cb1e67 100644
--- a/dlls/msvcrt20/msvcrt20.c
+++ b/dlls/msvcrt20/msvcrt20.c
@@ -19,6 +19,7 @@
*/
#include <stdarg.h>
+#include <math.h>
#include "windef.h"
@@ -48,3 +49,12 @@ void CDECL MSVCRT20__wgetmainargs( int *argc, WCHAR** *wargv, WCHAR** *wenvp,
{
__wgetmainargs( argc, wargv, wenvp, expand_wildcards, &new_mode );
}
+
+
+/*********************************************************************
+ * _matherr (MSVCRT20.@)
+ */
+int CDECL MSVCRT20__matherr(struct _exception *e)
+{
+ return 0;
+}
diff --git a/dlls/msvcrt20/msvcrt20.spec b/dlls/msvcrt20/msvcrt20.spec
index 6ced0fd..84a1014 100644
--- a/dlls/msvcrt20/msvcrt20.spec
+++ b/dlls/msvcrt20/msvcrt20.spec
@@ -1012,7 +1012,7 @@
@ cdecl _ltoa(long ptr long) msvcrt._ltoa
@ cdecl _ltow(long ptr long) msvcrt._ltow
@ cdecl _makepath(ptr str str str str) msvcrt._makepath
-@ cdecl _matherr(ptr) msvcrt._matherr
+@ cdecl _matherr(ptr) MSVCRT20__matherr
@ cdecl _mbbtombc(long) msvcrt._mbbtombc
@ cdecl _mbbtype(long long) msvcrt._mbbtype
@ cdecl _mbccpy(ptr ptr) msvcrt._mbccpy
More information about the wine-cvs
mailing list