1 // -*- C++ -*-
2 //===----------------------------------------------------------------------===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef _LIBCPP_FENV_H
11 #define _LIBCPP_FENV_H
12 
13 
14 /*
15     fenv.h synopsis
16 
17 This entire header is C99 / C++0X
18 
19 Macros:
20 
21     FE_DIVBYZERO
22     FE_INEXACT
23     FE_INVALID
24     FE_OVERFLOW
25     FE_UNDERFLOW
26     FE_ALL_EXCEPT
27     FE_DOWNWARD
28     FE_TONEAREST
29     FE_TOWARDZERO
30     FE_UPWARD
31     FE_DFL_ENV
32 
33 Types:
34 
35     fenv_t
36     fexcept_t
37 
38 int feclearexcept(int excepts);
39 int fegetexceptflag(fexcept_t* flagp, int excepts);
40 int feraiseexcept(int excepts);
41 int fesetexceptflag(const fexcept_t* flagp, int excepts);
42 int fetestexcept(int excepts);
43 int fegetround();
44 int fesetround(int round);
45 int fegetenv(fenv_t* envp);
46 int feholdexcept(fenv_t* envp);
47 int fesetenv(const fenv_t* envp);
48 int feupdateenv(const fenv_t* envp);
49 
50 
51 */
52 
53 #include <__config>
54 
55 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
56 #  pragma GCC system_header
57 #endif
58 
59 #if __has_include_next(<fenv.h>)
60 #  include_next <fenv.h>
61 #endif
62 
63 #ifdef __cplusplus
64 
65 extern "C++" {
66 
67 #ifdef feclearexcept
68 #undef feclearexcept
69 #endif
70 
71 #ifdef fegetexceptflag
72 #undef fegetexceptflag
73 #endif
74 
75 
76 #ifdef feraiseexcept
77 #undef feraiseexcept
78 #endif
79 
80 #ifdef fesetexceptflag
81 #undef fesetexceptflag
82 #endif
83 
84 
85 #ifdef fetestexcept
86 #undef fetestexcept
87 #endif
88 
89 #ifdef fegetround
90 #undef fegetround
91 #endif
92 
93 #ifdef fesetround
94 #undef fesetround
95 #endif
96 
97 #ifdef fegetenv
98 #undef fegetenv
99 #endif
100 
101 #ifdef feholdexcept
102 #undef feholdexcept
103 #endif
104 
105 
106 #ifdef fesetenv
107 #undef fesetenv
108 #endif
109 
110 #ifdef feupdateenv
111 #undef feupdateenv
112 #endif
113 
114 } // extern "C++"
115 
116 #endif // defined(__cplusplus)
117 
118 #endif // _LIBCPP_FENV_H
119