msvcr120: Added _Cbuild implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
97a7a4ff0c
commit
84f5d8a619
|
@ -14,7 +14,7 @@
|
|||
@ cdecl -arch=i386 _CIsqrt() ucrtbase._CIsqrt
|
||||
@ cdecl -arch=i386 _CItan() ucrtbase._CItan
|
||||
@ cdecl -arch=i386 _CItanh() ucrtbase._CItanh
|
||||
@ stub _Cbuild
|
||||
@ cdecl _Cbuild(ptr double double) ucrtbase._Cbuild
|
||||
@ stub _Cmulcc
|
||||
@ stub _Cmulcr
|
||||
@ stub _FCbuild
|
||||
|
|
|
@ -824,7 +824,7 @@
|
|||
@ cdecl -arch=i386 _CItanh()
|
||||
@ cdecl _CRT_RTC_INIT(ptr ptr long long long)
|
||||
@ cdecl _CRT_RTC_INITW(ptr ptr long long long)
|
||||
@ stub _Cbuild
|
||||
@ cdecl _Cbuild(ptr double double) MSVCR120__Cbuild
|
||||
@ cdecl _CreateFrameInfo(ptr ptr)
|
||||
@ stdcall _CxxThrowException(ptr ptr)
|
||||
@ cdecl -arch=i386 -norelay _EH_prolog()
|
||||
|
|
|
@ -163,6 +163,12 @@ typedef struct
|
|||
unsigned int status;
|
||||
} fenv_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
double r;
|
||||
double i;
|
||||
} _Dcomplex;
|
||||
|
||||
static char* (CDECL *p_setlocale)(int category, const char* locale);
|
||||
static struct MSVCRT_lconv* (CDECL *p_localeconv)(void);
|
||||
static size_t (CDECL *p_wcstombs_s)(size_t *ret, char* dest, size_t sz, const wchar_t* src, size_t max);
|
||||
|
@ -184,6 +190,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 *, __ms_va_list valist);
|
||||
static _Dcomplex* (__cdecl *p__Cbuild)(_Dcomplex*, double, double);
|
||||
|
||||
/* make sure we use the correct errno */
|
||||
#undef errno
|
||||
|
@ -242,6 +249,7 @@ static BOOL init(void)
|
|||
SET(p_fegetenv, "fegetenv");
|
||||
SET(p__clearfp, "_clearfp");
|
||||
SET(p_vsscanf, "vsscanf");
|
||||
SET(p__Cbuild, "_Cbuild");
|
||||
if(sizeof(void*) == 8) { /* 64-bit initialization */
|
||||
SET(p_critical_section_ctor,
|
||||
"??0critical_section@Concurrency@@QEAA@XZ");
|
||||
|
@ -935,6 +943,20 @@ static void test_vsscanf(void)
|
|||
ok(v == 10, "got %d.\n", v);
|
||||
}
|
||||
|
||||
static void test__Cbuild(void)
|
||||
{
|
||||
_Dcomplex c;
|
||||
|
||||
memset(&c, 0, sizeof(c));
|
||||
p__Cbuild(&c, 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);
|
||||
|
||||
p__Cbuild(&c, 3.0, NAN);
|
||||
ok(c.r == 3.0, "c.r = %lf\n", c.r);
|
||||
ok(_isnan(c.i), "c.i = %lf\n", c.i);
|
||||
}
|
||||
|
||||
START_TEST(msvcr120)
|
||||
{
|
||||
if (!init()) return;
|
||||
|
@ -953,4 +975,5 @@ START_TEST(msvcr120)
|
|||
test__Condition_variable();
|
||||
test_wctype();
|
||||
test_vsscanf();
|
||||
test__Cbuild();
|
||||
}
|
||||
|
|
|
@ -818,7 +818,7 @@
|
|||
@ cdecl -arch=i386 _CIsqrt() msvcr120._CIsqrt
|
||||
@ cdecl -arch=i386 _CItan() msvcr120._CItan
|
||||
@ cdecl -arch=i386 _CItanh() msvcr120._CItanh
|
||||
@ stub _Cbuild
|
||||
@ cdecl _Cbuild(ptr 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
|
||||
|
|
|
@ -3383,4 +3383,11 @@ double CDECL _except1(DWORD fpe, _FP_OPERATION_CODE op, double arg, double res,
|
|||
return res;
|
||||
}
|
||||
|
||||
_Dcomplex* CDECL MSVCR120__Cbuild(_Dcomplex *ret, double r, double i)
|
||||
{
|
||||
ret->x = r;
|
||||
ret->y = i;
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* _MSVCR_VER>=120 */
|
||||
|
|
|
@ -458,6 +458,7 @@ struct MSVCRT__complex {
|
|||
double x; /* Real part */
|
||||
double y; /* Imaginary part */
|
||||
};
|
||||
typedef struct MSVCRT__complex _Dcomplex;
|
||||
|
||||
typedef struct MSVCRT__div_t {
|
||||
int quot; /* quotient */
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
@ cdecl -arch=i386 _CIsqrt()
|
||||
@ cdecl -arch=i386 _CItan()
|
||||
@ cdecl -arch=i386 _CItanh()
|
||||
@ stub _Cbuild
|
||||
@ cdecl _Cbuild(ptr double double) MSVCR120__Cbuild
|
||||
@ stub _Cmulcc
|
||||
@ stub _Cmulcr
|
||||
@ cdecl _CreateFrameInfo(ptr ptr)
|
||||
|
|
Loading…
Reference in New Issue