From bd5969fc876a10b18613302db7087ef3c40f18e1 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 7 Mar 2024 17:28:00 -0500 Subject: lib: Add mlibc Signed-off-by: Ian Moffett --- lib/mlibc/options/ansi/include/fenv.h | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 lib/mlibc/options/ansi/include/fenv.h (limited to 'lib/mlibc/options/ansi/include/fenv.h') diff --git a/lib/mlibc/options/ansi/include/fenv.h b/lib/mlibc/options/ansi/include/fenv.h new file mode 100644 index 0000000..11e38f3 --- /dev/null +++ b/lib/mlibc/options/ansi/include/fenv.h @@ -0,0 +1,44 @@ + +#ifndef _FENV_H +#define _FENV_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct { + __mlibc_uint32 __control_word; + __mlibc_uint32 __status_word; + __mlibc_uint32 __unused[5]; + __mlibc_uint32 __mxcsr; +} fenv_t; + +typedef __mlibc_uint16 fexcept_t; + +#ifndef __MLIBC_ABI_ONLY + +int feclearexcept(int); +int fegetenv(fenv_t *); +int fegetexceptflag(fexcept_t *, int); +int fegetround(void); +int feholdexcept(fenv_t *); +int feraiseexcept(int); +int fesetenv(const fenv_t *); +int fesetexceptflag(const fexcept_t *, int); +int fesetround(int); +int fetestexcept(int); +int feupdateenv(const fenv_t *); + +#endif /* !__MLIBC_ABI_ONLY */ + +#ifdef __cplusplus +} +#endif + +#define FE_DFL_ENV ((const fenv_t *) -1) + +#endif // _FENV_H + -- cgit v1.2.3