119 lines · c
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-exception7//8//===----------------------------------------------------------------------===//9 10#ifndef _LIBCPP_FENV_H11#define _LIBCPP_FENV_H12 13/*14 fenv.h synopsis15 16This entire header is C99 / C++0X17 18Macros:19 20 FE_DIVBYZERO21 FE_INEXACT22 FE_INVALID23 FE_OVERFLOW24 FE_UNDERFLOW25 FE_ALL_EXCEPT26 FE_DOWNWARD27 FE_TONEAREST28 FE_TOWARDZERO29 FE_UPWARD30 FE_DFL_ENV31 32Types:33 34 fenv_t35 fexcept_t36 37int feclearexcept(int excepts);38int fegetexceptflag(fexcept_t* flagp, int excepts);39int feraiseexcept(int excepts);40int fesetexceptflag(const fexcept_t* flagp, int excepts);41int fetestexcept(int excepts);42int fegetround();43int fesetround(int round);44int fegetenv(fenv_t* envp);45int feholdexcept(fenv_t* envp);46int fesetenv(const fenv_t* envp);47int feupdateenv(const fenv_t* envp);48 49 50*/51 52#if defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)53# include <__cxx03/__config>54#else55# include <__config>56#endif57 58#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)59# pragma GCC system_header60#endif61 62#if __has_include_next(<fenv.h>)63# include_next <fenv.h>64#endif65 66#ifdef __cplusplus67 68extern "C++" {69 70# ifdef feclearexcept71# undef feclearexcept72# endif73 74# ifdef fegetexceptflag75# undef fegetexceptflag76# endif77 78# ifdef feraiseexcept79# undef feraiseexcept80# endif81 82# ifdef fesetexceptflag83# undef fesetexceptflag84# endif85 86# ifdef fetestexcept87# undef fetestexcept88# endif89 90# ifdef fegetround91# undef fegetround92# endif93 94# ifdef fesetround95# undef fesetround96# endif97 98# ifdef fegetenv99# undef fegetenv100# endif101 102# ifdef feholdexcept103# undef feholdexcept104# endif105 106# ifdef fesetenv107# undef fesetenv108# endif109 110# ifdef feupdateenv111# undef feupdateenv112# endif113 114} // extern "C++"115 116#endif // defined(__cplusplus)117 118#endif // _LIBCPP_FENV_H119