62 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLVM_LIBC_HDR_FENV_MACROS_H10#define LLVM_LIBC_HDR_FENV_MACROS_H11 12#ifdef LIBC_FULL_BUILD13 14#include "include/llvm-libc-macros/fenv-macros.h"15 16#else // Overlay mode17 18#include <fenv.h>19 20// In some environment, FE_ALL_EXCEPT is set to 0 and the remaining exceptions21// FE_* are missing.22#ifndef FE_DIVBYZERO23#define FE_DIVBYZERO 024#endif // FE_DIVBYZERO25 26#ifndef FE_INEXACT27#define FE_INEXACT 028#endif // FE_INEXACT29 30#ifndef FE_INVALID31#define FE_INVALID 032#endif // FE_INVALID33 34#ifndef FE_OVERFLOW35#define FE_OVERFLOW 036#endif // FE_OVERFLOW37 38#ifndef FE_UNDERFLOW39#define FE_UNDERFLOW 040#endif // FE_UNDERFLOW41 42// Rounding mode macros might be missing.43#ifndef FE_DOWNWARD44#define FE_DOWNWARD 0x40045#endif // FE_DOWNWARD46 47#ifndef FE_TONEAREST48#define FE_TONEAREST 049#endif // FE_TONEAREST50 51#ifndef FE_TOWARDZERO52#define FE_TOWARDZERO 0xC0053#endif // FE_TOWARDZERO54 55#ifndef FE_UPWARD56#define FE_UPWARD 0x80057#endif // FE_UPWARD58 59#endif // LLVM_LIBC_FULL_BUILD60 61#endif // LLVM_LIBC_HDR_FENV_MACROS_H62