From: Stéphane Bacri frisou76@yahoo.fr
--- dlls/msvcr120/msvcr120.spec | 2 +- dlls/msvcr120/tests/msvcr120.c | 11 +++++++---- dlls/msvcr120_app/msvcr120_app.spec | 2 +- dlls/msvcrt/math.c | 7 ++++--- dlls/ucrtbase/ucrtbase.spec | 2 +- 5 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 78420df3757..d0b2ca9f2cf 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -825,7 +825,7 @@ @ cdecl -arch=i386 _CItanh() @ cdecl _CRT_RTC_INIT(ptr ptr long long long) @ cdecl _CRT_RTC_INITW(ptr ptr long long long) -@ cdecl _Cbuild(ptr double double) +@ cdecl -norelay _Cbuild(double double) @ cdecl _CreateFrameInfo(ptr ptr) @ stdcall _CxxThrowException(ptr ptr) @ cdecl -arch=i386 -norelay _EH_prolog() diff --git a/dlls/msvcr120/tests/msvcr120.c b/dlls/msvcr120/tests/msvcr120.c index 2c9569f750d..f63c86384d8 100644 --- a/dlls/msvcr120/tests/msvcr120.c +++ b/dlls/msvcr120/tests/msvcr120.c @@ -221,7 +221,7 @@ static _locale_t (__cdecl *p_wcreate_locale)(int, const wchar_t *); static void (__cdecl *p_free_locale)(_locale_t); static unsigned short (__cdecl *p_wctype)(const char*); static int (__cdecl *p_vsscanf)(const char*, const char *, va_list valist); -static _Dcomplex* (__cdecl *p__Cbuild)(_Dcomplex*, double, double); +static _Dcomplex (__cdecl *p__Cbuild)(double, double); static double (__cdecl *p_creal)(_Dcomplex); static double (__cdecl *p_nexttoward)(double, double); static float (__cdecl *p_nexttowardf)(float, double); @@ -1297,18 +1297,21 @@ static void test__Cbuild(void) _Dcomplex c; double d;
- memset(&c, 0, sizeof(c)); - p__Cbuild(&c, 1.0, 2.0); + c = p__Cbuild(1.0, 2.0); ok(c.r == 1.0, "c.r = %lf\n", c.r); ok(c.i == 2.0, "c.i = %lf\n", c.i); d = p_creal(c); ok(d == 1.0, "creal returned %lf\n", d);
- p__Cbuild(&c, 3.0, NAN); + c = p__Cbuild(3.0, NAN); ok(c.r == 3.0, "c.r = %lf\n", c.r); ok(_isnan(c.i), "c.i = %lf\n", c.i); d = p_creal(c); ok(d == 3.0, "creal returned %lf\n", d); + + c = p__Cbuild(NAN, 4.0); + ok(_isnan(c.r), "c.r = %lf\n", c.r); + ok(c.i == 4.0, "c.i = %lf\n", c.i); }
static void test_nexttoward(void) diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index c15de4d01ce..80ab50de9dc 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -820,7 +820,7 @@ @ cdecl -arch=i386 _CIsqrt() msvcr120._CIsqrt @ cdecl -arch=i386 _CItan() msvcr120._CItan @ cdecl -arch=i386 _CItanh() msvcr120._CItanh -@ cdecl _Cbuild(ptr double double) msvcr120._Cbuild +@ cdecl -norelay _Cbuild(double double) msvcr120._Cbuild @ cdecl _CreateFrameInfo(ptr ptr) msvcr120._CreateFrameInfo @ stdcall _CxxThrowException(ptr ptr) msvcr120._CxxThrowException @ cdecl -arch=i386 -norelay _EH_prolog() msvcr120._EH_prolog diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index be345fb7a4a..c620cb5fab9 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -2958,10 +2958,11 @@ double CDECL _except1(DWORD fpe, _FP_OPERATION_CODE op, double arg, double res, return res; }
-_Dcomplex* CDECL _Cbuild(_Dcomplex *ret, double r, double i) +_Dcomplex CDECL _Cbuild(double r, double i) { - ret->_Val[0] = r; - ret->_Val[1] = i; + _Dcomplex ret; + ret._Val[0] = r; + ret._Val[1] = i; return ret; }
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index cd8f9f23898..f3fda78e379 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -14,7 +14,7 @@ @ cdecl -arch=i386 _CIsqrt() @ cdecl -arch=i386 _CItan() @ cdecl -arch=i386 _CItanh() -@ cdecl _Cbuild(ptr double double) +@ cdecl -norelay _Cbuild(double double) @ stub _Cmulcc @ stub _Cmulcr @ cdecl _CreateFrameInfo(ptr ptr)