Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
emscripten-core
GitHub Repository: emscripten-core/emscripten
Path: blob/main/system/lib/llvm-libc/hdr/fenv_macros.h
6175 views
1
//===-- Definition of macros from fenv.h ----------------------------------===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#ifndef LLVM_LIBC_HDR_FENV_MACROS_H
10
#define LLVM_LIBC_HDR_FENV_MACROS_H
11
12
#ifdef LIBC_FULL_BUILD
13
14
#include "include/llvm-libc-macros/fenv-macros.h"
15
16
#else // Overlay mode
17
18
#include <fenv.h>
19
20
// In some environment, FE_ALL_EXCEPT is set to 0 and the remaining exceptions
21
// FE_* are missing.
22
#ifndef FE_DIVBYZERO
23
#define FE_DIVBYZERO 0
24
#endif // FE_DIVBYZERO
25
26
#ifndef FE_INEXACT
27
#define FE_INEXACT 0
28
#endif // FE_INEXACT
29
30
#ifndef FE_INVALID
31
#define FE_INVALID 0
32
#endif // FE_INVALID
33
34
#ifndef FE_OVERFLOW
35
#define FE_OVERFLOW 0
36
#endif // FE_OVERFLOW
37
38
#ifndef FE_UNDERFLOW
39
#define FE_UNDERFLOW 0
40
#endif // FE_UNDERFLOW
41
42
// Rounding mode macros might be missing.
43
#ifndef FE_DOWNWARD
44
#define FE_DOWNWARD 0x400
45
#endif // FE_DOWNWARD
46
47
#ifndef FE_TONEAREST
48
#define FE_TONEAREST 0
49
#endif // FE_TONEAREST
50
51
#ifndef FE_TOWARDZERO
52
#define FE_TOWARDZERO 0xC00
53
#endif // FE_TOWARDZERO
54
55
#ifndef FE_UPWARD
56
#define FE_UPWARD 0x800
57
#endif // FE_UPWARD
58
59
#endif // LLVM_LIBC_FULL_BUILD
60
61
#endif // LLVM_LIBC_HDR_FENV_MACROS_H
62
63