fenv.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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_FENV_H
  10. #define _LIBCPP_FENV_H
  11. /*
  12. fenv.h 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. Types:
  27. fenv_t
  28. fexcept_t
  29. int feclearexcept(int excepts);
  30. int fegetexceptflag(fexcept_t* flagp, int excepts);
  31. int feraiseexcept(int excepts);
  32. int fesetexceptflag(const fexcept_t* flagp, int excepts);
  33. int fetestexcept(int excepts);
  34. int fegetround();
  35. int fesetround(int round);
  36. int fegetenv(fenv_t* envp);
  37. int feholdexcept(fenv_t* envp);
  38. int fesetenv(const fenv_t* envp);
  39. int feupdateenv(const fenv_t* envp);
  40. */
  41. #include <__config>
  42. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  43. # pragma GCC system_header
  44. #endif
  45. #ifdef _LIBCPP_COMPILER_MSVC
  46. #include Y_UCRT_INCLUDE_NEXT(fenv.h)
  47. #else
  48. #include_next <fenv.h>
  49. #endif
  50. #ifdef __cplusplus
  51. extern "C++" {
  52. #ifdef feclearexcept
  53. #undef feclearexcept
  54. #endif
  55. #ifdef fegetexceptflag
  56. #undef fegetexceptflag
  57. #endif
  58. #ifdef feraiseexcept
  59. #undef feraiseexcept
  60. #endif
  61. #ifdef fesetexceptflag
  62. #undef fesetexceptflag
  63. #endif
  64. #ifdef fetestexcept
  65. #undef fetestexcept
  66. #endif
  67. #ifdef fegetround
  68. #undef fegetround
  69. #endif
  70. #ifdef fesetround
  71. #undef fesetround
  72. #endif
  73. #ifdef fegetenv
  74. #undef fegetenv
  75. #endif
  76. #ifdef feholdexcept
  77. #undef feholdexcept
  78. #endif
  79. #ifdef fesetenv
  80. #undef fesetenv
  81. #endif
  82. #ifdef feupdateenv
  83. #undef feupdateenv
  84. #endif
  85. } // extern "C++"
  86. #endif // defined(__cplusplus)
  87. #endif // _LIBCPP_FENV_H