xref: /freebsd/contrib/llvm-project/libcxx/include/__cxx03/cfenv (revision 700637cbb5e582861067a11aaca4d053546871d2)
1*700637cbSDimitry Andric// -*- C++ -*-
2*700637cbSDimitry Andric//===----------------------------------------------------------------------===//
3*700637cbSDimitry Andric//
4*700637cbSDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5*700637cbSDimitry Andric// See https://llvm.org/LICENSE.txt for license information.
6*700637cbSDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7*700637cbSDimitry Andric//
8*700637cbSDimitry Andric//===----------------------------------------------------------------------===//
9*700637cbSDimitry Andric
10*700637cbSDimitry Andric#ifndef _LIBCPP___CXX03_CFENV
11*700637cbSDimitry Andric#define _LIBCPP___CXX03_CFENV
12*700637cbSDimitry Andric
13*700637cbSDimitry Andric/*
14*700637cbSDimitry Andric    cfenv synopsis
15*700637cbSDimitry Andric
16*700637cbSDimitry AndricThis entire header is C99 / C++0X
17*700637cbSDimitry Andric
18*700637cbSDimitry AndricMacros:
19*700637cbSDimitry Andric
20*700637cbSDimitry Andric    FE_DIVBYZERO
21*700637cbSDimitry Andric    FE_INEXACT
22*700637cbSDimitry Andric    FE_INVALID
23*700637cbSDimitry Andric    FE_OVERFLOW
24*700637cbSDimitry Andric    FE_UNDERFLOW
25*700637cbSDimitry Andric    FE_ALL_EXCEPT
26*700637cbSDimitry Andric    FE_DOWNWARD
27*700637cbSDimitry Andric    FE_TONEAREST
28*700637cbSDimitry Andric    FE_TOWARDZERO
29*700637cbSDimitry Andric    FE_UPWARD
30*700637cbSDimitry Andric    FE_DFL_ENV
31*700637cbSDimitry Andric
32*700637cbSDimitry Andricnamespace std
33*700637cbSDimitry Andric{
34*700637cbSDimitry Andric
35*700637cbSDimitry AndricTypes:
36*700637cbSDimitry Andric
37*700637cbSDimitry Andric    fenv_t
38*700637cbSDimitry Andric    fexcept_t
39*700637cbSDimitry Andric
40*700637cbSDimitry Andricint feclearexcept(int excepts);
41*700637cbSDimitry Andricint fegetexceptflag(fexcept_t* flagp, int excepts);
42*700637cbSDimitry Andricint feraiseexcept(int excepts);
43*700637cbSDimitry Andricint fesetexceptflag(const fexcept_t* flagp, int excepts);
44*700637cbSDimitry Andricint fetestexcept(int excepts);
45*700637cbSDimitry Andricint fegetround();
46*700637cbSDimitry Andricint fesetround(int round);
47*700637cbSDimitry Andricint fegetenv(fenv_t* envp);
48*700637cbSDimitry Andricint feholdexcept(fenv_t* envp);
49*700637cbSDimitry Andricint fesetenv(const fenv_t* envp);
50*700637cbSDimitry Andricint feupdateenv(const fenv_t* envp);
51*700637cbSDimitry Andric
52*700637cbSDimitry Andric}  // std
53*700637cbSDimitry Andric*/
54*700637cbSDimitry Andric
55*700637cbSDimitry Andric#include <__cxx03/__config>
56*700637cbSDimitry Andric
57*700637cbSDimitry Andric#include <__cxx03/fenv.h>
58*700637cbSDimitry Andric
59*700637cbSDimitry Andric#ifndef _LIBCPP___CXX03_FENV_H
60*700637cbSDimitry Andric#   error <cfenv> tried including <fenv.h> but didn't find libc++'s <fenv.h> header. \
61*700637cbSDimitry Andric          This usually means that your header search paths are not configured properly. \
62*700637cbSDimitry Andric          The header search paths should contain the C++ Standard Library headers before \
63*700637cbSDimitry Andric          any C Standard Library, and you are probably using compiler flags that make that \
64*700637cbSDimitry Andric          not be the case.
65*700637cbSDimitry Andric#endif
66*700637cbSDimitry Andric
67*700637cbSDimitry Andric#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
68*700637cbSDimitry Andric#  pragma GCC system_header
69*700637cbSDimitry Andric#endif
70*700637cbSDimitry Andric
71*700637cbSDimitry Andric_LIBCPP_BEGIN_NAMESPACE_STD
72*700637cbSDimitry Andric
73*700637cbSDimitry Andricusing ::fenv_t _LIBCPP_USING_IF_EXISTS;
74*700637cbSDimitry Andricusing ::fexcept_t _LIBCPP_USING_IF_EXISTS;
75*700637cbSDimitry Andric
76*700637cbSDimitry Andricusing ::feclearexcept _LIBCPP_USING_IF_EXISTS;
77*700637cbSDimitry Andricusing ::fegetexceptflag _LIBCPP_USING_IF_EXISTS;
78*700637cbSDimitry Andricusing ::feraiseexcept _LIBCPP_USING_IF_EXISTS;
79*700637cbSDimitry Andricusing ::fesetexceptflag _LIBCPP_USING_IF_EXISTS;
80*700637cbSDimitry Andricusing ::fetestexcept _LIBCPP_USING_IF_EXISTS;
81*700637cbSDimitry Andricusing ::fegetround _LIBCPP_USING_IF_EXISTS;
82*700637cbSDimitry Andricusing ::fesetround _LIBCPP_USING_IF_EXISTS;
83*700637cbSDimitry Andricusing ::fegetenv _LIBCPP_USING_IF_EXISTS;
84*700637cbSDimitry Andricusing ::feholdexcept _LIBCPP_USING_IF_EXISTS;
85*700637cbSDimitry Andricusing ::fesetenv _LIBCPP_USING_IF_EXISTS;
86*700637cbSDimitry Andricusing ::feupdateenv _LIBCPP_USING_IF_EXISTS;
87*700637cbSDimitry Andric
88*700637cbSDimitry Andric_LIBCPP_END_NAMESPACE_STD
89*700637cbSDimitry Andric
90*700637cbSDimitry Andric#endif // _LIBCPP___CXX03_CFENV
91