msvcrt: Use _Dcomplex definition from public header.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2020-12-04 15:50:01 +01:00 committed by Alexandre Julliard
parent 200fe8ac42
commit 494a789407
4 changed files with 32 additions and 5 deletions

View File

@ -35,6 +35,7 @@
* ====================================================
*/
#include <complex.h>
#include <stdio.h>
#include <fenv.h>
#include <fpieee.h>
@ -4177,14 +4178,14 @@ double CDECL _except1(DWORD fpe, _FP_OPERATION_CODE op, double arg, double res,
_Dcomplex* CDECL _Cbuild(_Dcomplex *ret, double r, double i)
{
ret->x = r;
ret->y = i;
ret->_Val[0] = r;
ret->_Val[1] = i;
return ret;
}
double CDECL MSVCR120_creal(_Dcomplex z)
{
return z.x;
return z._Val[0];
}
/*********************************************************************

View File

@ -283,8 +283,6 @@ extern unsigned msvcrt_create_io_inherit_block(WORD*, BYTE**) DECLSPEC_HIDDEN;
extern FILE MSVCRT__iob[];
typedef struct _complex _Dcomplex;
#ifdef __i386__
struct MSVCRT___JUMP_BUFFER {
unsigned long Ebp;

View File

@ -443,6 +443,7 @@ SOURCES = \
mstask.idl \
mstcpip.h \
msvcrt/assert.h \
msvcrt/complex.h \
msvcrt/conio.h \
msvcrt/corecrt.h \
msvcrt/corecrt_startup.h \

27
include/msvcrt/complex.h Normal file
View File

@ -0,0 +1,27 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the Wine project.
*/
#ifndef _COMPLEX_H_DEFINED
#define _COMPLEX_H_DEFINED
#include <corecrt.h>
#ifndef _C_COMPLEX_T
#define _C_COMPLEX_T
typedef struct _C_double_complex
{
double _Val[2];
} _C_double_complex;
typedef struct _C_float_complex
{
float _Val[2];
} _C_float_complex;
#endif
typedef _C_double_complex _Dcomplex;
typedef _C_float_complex _Fcomplex;
#endif /* _COMPLEX_H_DEFINED */