diff options
author | Ian Moffett <ian@osmora.org> | 2024-03-07 17:28:00 -0500 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-03-07 17:28:32 -0500 |
commit | bd5969fc876a10b18613302db7087ef3c40f18e1 (patch) | |
tree | 7c2b8619afe902abf99570df2873fbdf40a4d1a1 /lib/mlibc/options/ansi/include/fenv.h | |
parent | a95b38b1b92b172e6cc4e8e56a88a30cc65907b0 (diff) |
lib: Add mlibc
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'lib/mlibc/options/ansi/include/fenv.h')
-rw-r--r-- | lib/mlibc/options/ansi/include/fenv.h | 44 |
1 files changed, 44 insertions, 0 deletions
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 <bits/types.h> +#include <bits/ansi/fenv.h> + +#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 + |