cfenv 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. #ifndef _LIBCPP_CFENV
  10. #define _LIBCPP_CFENV
  11. /*
  12. cfenv synopsis
  13. This entire header is C99 / C++0X
  14. Macros:
  15. FE_DIVBYZERO
  16. FE_INEXACT
  17. FE_INVALID
  18. FE_OVERFLOW
  19. FE_UNDERFLOW
  20. FE_ALL_EXCEPT
  21. FE_DOWNWARD
  22. FE_TONEAREST
  23. FE_TOWARDZERO
  24. FE_UPWARD
  25. FE_DFL_ENV
  26. namespace std
  27. {
  28. Types:
  29. fenv_t
  30. fexcept_t
  31. int feclearexcept(int excepts);
  32. int fegetexceptflag(fexcept_t* flagp, int excepts);
  33. int feraiseexcept(int excepts);
  34. int fesetexceptflag(const fexcept_t* flagp, int excepts);
  35. int fetestexcept(int excepts);
  36. int fegetround();
  37. int fesetround(int round);
  38. int fegetenv(fenv_t* envp);
  39. int feholdexcept(fenv_t* envp);
  40. int fesetenv(const fenv_t* envp);
  41. int feupdateenv(const fenv_t* envp);
  42. } // std
  43. */
  44. #include <__config>
  45. #include <fenv.h>
  46. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  47. # pragma GCC system_header
  48. #endif
  49. _LIBCPP_BEGIN_NAMESPACE_STD
  50. using ::fenv_t _LIBCPP_USING_IF_EXISTS;
  51. using ::fexcept_t _LIBCPP_USING_IF_EXISTS;
  52. using ::feclearexcept _LIBCPP_USING_IF_EXISTS;
  53. using ::fegetexceptflag _LIBCPP_USING_IF_EXISTS;
  54. using ::feraiseexcept _LIBCPP_USING_IF_EXISTS;
  55. using ::fesetexceptflag _LIBCPP_USING_IF_EXISTS;
  56. using ::fetestexcept _LIBCPP_USING_IF_EXISTS;
  57. using ::fegetround _LIBCPP_USING_IF_EXISTS;
  58. using ::fesetround _LIBCPP_USING_IF_EXISTS;
  59. using ::fegetenv _LIBCPP_USING_IF_EXISTS;
  60. using ::feholdexcept _LIBCPP_USING_IF_EXISTS;
  61. using ::fesetenv _LIBCPP_USING_IF_EXISTS;
  62. using ::feupdateenv _LIBCPP_USING_IF_EXISTS;
  63. _LIBCPP_END_NAMESPACE_STD
  64. #endif // _LIBCPP_CFENV