146035553Spatrick // -*- C++ -*- 2*4bdff4beSrobert //===----------------------------------------------------------------------===// 346035553Spatrick // 446035553Spatrick // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 546035553Spatrick // See https://llvm.org/LICENSE.txt for license information. 646035553Spatrick // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 746035553Spatrick // 846035553Spatrick //===----------------------------------------------------------------------===// 946035553Spatrick 1046035553Spatrick #ifndef _LIBCPP_FENV_H 1146035553Spatrick #define _LIBCPP_FENV_H 1246035553Spatrick 1346035553Spatrick 1446035553Spatrick /* 1546035553Spatrick fenv.h synopsis 1646035553Spatrick 1746035553Spatrick This entire header is C99 / C++0X 1846035553Spatrick 1946035553Spatrick Macros: 2046035553Spatrick 2146035553Spatrick FE_DIVBYZERO 2246035553Spatrick FE_INEXACT 2346035553Spatrick FE_INVALID 2446035553Spatrick FE_OVERFLOW 2546035553Spatrick FE_UNDERFLOW 2646035553Spatrick FE_ALL_EXCEPT 2746035553Spatrick FE_DOWNWARD 2846035553Spatrick FE_TONEAREST 2946035553Spatrick FE_TOWARDZERO 3046035553Spatrick FE_UPWARD 3146035553Spatrick FE_DFL_ENV 3246035553Spatrick 3346035553Spatrick Types: 3446035553Spatrick 3546035553Spatrick fenv_t 3646035553Spatrick fexcept_t 3746035553Spatrick 3846035553Spatrick int feclearexcept(int excepts); 3946035553Spatrick int fegetexceptflag(fexcept_t* flagp, int excepts); 4046035553Spatrick int feraiseexcept(int excepts); 4146035553Spatrick int fesetexceptflag(const fexcept_t* flagp, int excepts); 4246035553Spatrick int fetestexcept(int excepts); 4346035553Spatrick int fegetround(); 4446035553Spatrick int fesetround(int round); 4546035553Spatrick int fegetenv(fenv_t* envp); 4646035553Spatrick int feholdexcept(fenv_t* envp); 4746035553Spatrick int fesetenv(const fenv_t* envp); 4846035553Spatrick int feupdateenv(const fenv_t* envp); 4946035553Spatrick 5046035553Spatrick 5146035553Spatrick */ 5246035553Spatrick 5346035553Spatrick #include <__config> 5446035553Spatrick 5546035553Spatrick #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 5646035553Spatrick # pragma GCC system_header 5746035553Spatrick #endif 5846035553Spatrick 59*4bdff4beSrobert #if __has_include_next(<fenv.h>) 6046035553Spatrick # include_next <fenv.h> 61*4bdff4beSrobert #endif 6246035553Spatrick 6346035553Spatrick #ifdef __cplusplus 6446035553Spatrick 6546035553Spatrick extern "C++" { 6646035553Spatrick 6746035553Spatrick #ifdef feclearexcept 6846035553Spatrick #undef feclearexcept 6946035553Spatrick #endif 7046035553Spatrick 7146035553Spatrick #ifdef fegetexceptflag 7246035553Spatrick #undef fegetexceptflag 7346035553Spatrick #endif 7446035553Spatrick 7546035553Spatrick 7646035553Spatrick #ifdef feraiseexcept 7746035553Spatrick #undef feraiseexcept 7846035553Spatrick #endif 7946035553Spatrick 8046035553Spatrick #ifdef fesetexceptflag 8146035553Spatrick #undef fesetexceptflag 8246035553Spatrick #endif 8346035553Spatrick 8446035553Spatrick 8546035553Spatrick #ifdef fetestexcept 8646035553Spatrick #undef fetestexcept 8746035553Spatrick #endif 8846035553Spatrick 8946035553Spatrick #ifdef fegetround 9046035553Spatrick #undef fegetround 9146035553Spatrick #endif 9246035553Spatrick 9346035553Spatrick #ifdef fesetround 9446035553Spatrick #undef fesetround 9546035553Spatrick #endif 9646035553Spatrick 9746035553Spatrick #ifdef fegetenv 9846035553Spatrick #undef fegetenv 9946035553Spatrick #endif 10046035553Spatrick 10146035553Spatrick #ifdef feholdexcept 10246035553Spatrick #undef feholdexcept 10346035553Spatrick #endif 10446035553Spatrick 10546035553Spatrick 10646035553Spatrick #ifdef fesetenv 10746035553Spatrick #undef fesetenv 10846035553Spatrick #endif 10946035553Spatrick 11046035553Spatrick #ifdef feupdateenv 11146035553Spatrick #undef feupdateenv 11246035553Spatrick #endif 11346035553Spatrick 11446035553Spatrick } // extern "C++" 11546035553Spatrick 11646035553Spatrick #endif // defined(__cplusplus) 11746035553Spatrick 11846035553Spatrick #endif // _LIBCPP_FENV_H 119