2020-03-19 14:40:26 +00:00
|
|
|
/**
|
|
|
|
* This file has no copyright assigned and is placed in the Public Domain.
|
|
|
|
* This file is part of the Wine project.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _INC_FENV
|
|
|
|
#define _INC_FENV
|
|
|
|
|
|
|
|
#include <float.h>
|
|
|
|
|
|
|
|
#define FE_TONEAREST _RC_NEAR
|
|
|
|
#define FE_UPWARD _RC_UP
|
|
|
|
#define FE_DOWNWARD _RC_DOWN
|
|
|
|
#define FE_TOWARDZERO _RC_CHOP
|
|
|
|
|
2020-11-20 11:51:23 +00:00
|
|
|
#define FE_INEXACT _SW_INEXACT
|
|
|
|
#define FE_UNDERFLOW _SW_UNDERFLOW
|
|
|
|
#define FE_OVERFLOW _SW_OVERFLOW
|
|
|
|
#define FE_DIVBYZERO _SW_ZERODIVIDE
|
|
|
|
#define FE_INVALID _SW_INVALID
|
|
|
|
#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW)
|
|
|
|
|
2020-03-19 14:40:26 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2020-11-20 11:51:23 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
__msvcrt_ulong _Fe_ctl;
|
|
|
|
__msvcrt_ulong _Fe_stat;
|
|
|
|
} fenv_t;
|
|
|
|
|
2021-03-12 07:12:08 +00:00
|
|
|
typedef __msvcrt_ulong fexcept_t;
|
|
|
|
|
2020-11-20 11:51:23 +00:00
|
|
|
_ACRTIMP int __cdecl fegetenv(fenv_t*);
|
|
|
|
_ACRTIMP int __cdecl fesetenv(const fenv_t*);
|
2021-03-12 07:12:10 +00:00
|
|
|
_ACRTIMP int __cdecl fegetexceptflag(fexcept_t*, int);
|
2020-11-20 11:51:23 +00:00
|
|
|
_ACRTIMP int __cdecl fegetround(void);
|
2021-05-18 19:07:04 +00:00
|
|
|
_ACRTIMP int __cdecl feholdexcept(fenv_t*);
|
2020-03-19 14:40:26 +00:00
|
|
|
_ACRTIMP int __cdecl fesetround(int);
|
2021-03-12 07:12:08 +00:00
|
|
|
_ACRTIMP int __cdecl fesetexceptflag(const fexcept_t*, int);
|
2021-03-12 07:12:09 +00:00
|
|
|
_ACRTIMP int __cdecl feclearexcept(int);
|
2021-03-12 07:12:07 +00:00
|
|
|
_ACRTIMP int __cdecl fetestexcept(int);
|
2020-03-19 14:40:26 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _INC_FENV */
|