1#ifndef _FENV_H
2#include <math/fenv.h>
3
4#ifndef _ISOMAC
5# include <stdbool.h>
6/* Now define the internal interfaces. */
7
8extern int __feclearexcept (int __excepts);
9extern int __fegetexcept (void);
10extern int __fegetexceptflag (fexcept_t *__flagp, int __excepts);
11extern int __feraiseexcept (int __excepts);
12extern int __fesetexceptflag (const fexcept_t *__flagp, int __excepts);
13extern int __fegetenv (fenv_t *__envp);
14extern int __fesetenv (const fenv_t *__envp);
15extern int __feupdateenv (const fenv_t *__envp);
16extern __typeof (fegetround) __fegetround __attribute_pure__;
17extern __typeof (feholdexcept) __feholdexcept;
18extern __typeof (fesetround) __fesetround;
19
20libm_hidden_proto (feraiseexcept)
21libm_hidden_proto (__feraiseexcept)
22libm_hidden_proto (fegetenv)
23libm_hidden_proto (__fegetenv)
24libm_hidden_proto (fegetround)
25libm_hidden_proto (__fegetround)
26libm_hidden_proto (fesetenv)
27libm_hidden_proto (__fesetenv)
28libm_hidden_proto (fesetround)
29libm_hidden_proto (__fesetround)
30libm_hidden_proto (feholdexcept)
31libm_hidden_proto (__feholdexcept)
32libm_hidden_proto (feupdateenv)
33libm_hidden_proto (__feupdateenv)
34libm_hidden_proto (fetestexcept)
35libm_hidden_proto (feclearexcept)
36
37/* Rounding mode context. This allows functions to set/restore rounding mode
38 only when the desired rounding mode is different from the current rounding
39 mode. */
40struct rm_ctx
41{
42 fenv_t env;
43 bool updated_status;
44};
45#endif
46
47#endif
48