2011-10-20 20:49:21 +08:00
|
|
|
// -*- C++ -*-
|
2017-05-11 04:57:45 +08:00
|
|
|
//===------------------ support/win32/limits_msvc_win32.h -----------------===//
|
2011-10-20 20:49:21 +08:00
|
|
|
//
|
2019-01-19 18:56:40 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2011-10-20 20:49:21 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2017-05-11 04:57:45 +08:00
|
|
|
#ifndef _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H
|
|
|
|
#define _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H
|
2011-10-20 20:49:21 +08:00
|
|
|
|
2013-08-02 02:17:34 +08:00
|
|
|
#if !defined(_LIBCPP_MSVCRT)
|
2013-09-17 09:34:47 +08:00
|
|
|
#error "This header complements the Microsoft C Runtime library, and should not be included otherwise."
|
2017-05-11 04:57:45 +08:00
|
|
|
#endif
|
|
|
|
#if defined(__clang__)
|
|
|
|
#error "This header should only be included when using Microsofts C1XX frontend"
|
|
|
|
#endif
|
2011-10-20 20:49:21 +08:00
|
|
|
|
2013-09-17 09:34:47 +08:00
|
|
|
#include <limits.h> // CHAR_BIT
|
2011-10-20 20:49:21 +08:00
|
|
|
#include <float.h> // limit constants
|
2017-05-11 04:57:45 +08:00
|
|
|
#include <math.h> // HUGE_VAL
|
|
|
|
#include <ymath.h> // internal MSVC header providing the needed functionality
|
2011-10-20 20:49:21 +08:00
|
|
|
|
2013-09-17 09:34:47 +08:00
|
|
|
#define __CHAR_BIT__ CHAR_BIT
|
|
|
|
|
2011-10-20 20:49:21 +08:00
|
|
|
#define __FLT_MANT_DIG__ FLT_MANT_DIG
|
|
|
|
#define __FLT_DIG__ FLT_DIG
|
|
|
|
#define __FLT_RADIX__ FLT_RADIX
|
|
|
|
#define __FLT_MIN_EXP__ FLT_MIN_EXP
|
|
|
|
#define __FLT_MIN_10_EXP__ FLT_MIN_10_EXP
|
|
|
|
#define __FLT_MAX_EXP__ FLT_MAX_EXP
|
|
|
|
#define __FLT_MAX_10_EXP__ FLT_MAX_10_EXP
|
|
|
|
#define __FLT_MIN__ FLT_MIN
|
|
|
|
#define __FLT_MAX__ FLT_MAX
|
|
|
|
#define __FLT_EPSILON__ FLT_EPSILON
|
|
|
|
// predefined by MinGW GCC
|
|
|
|
#define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F
|
|
|
|
|
|
|
|
#define __DBL_MANT_DIG__ DBL_MANT_DIG
|
|
|
|
#define __DBL_DIG__ DBL_DIG
|
|
|
|
#define __DBL_RADIX__ DBL_RADIX
|
|
|
|
#define __DBL_MIN_EXP__ DBL_MIN_EXP
|
|
|
|
#define __DBL_MIN_10_EXP__ DBL_MIN_10_EXP
|
|
|
|
#define __DBL_MAX_EXP__ DBL_MAX_EXP
|
|
|
|
#define __DBL_MAX_10_EXP__ DBL_MAX_10_EXP
|
|
|
|
#define __DBL_MIN__ DBL_MIN
|
|
|
|
#define __DBL_MAX__ DBL_MAX
|
|
|
|
#define __DBL_EPSILON__ DBL_EPSILON
|
|
|
|
// predefined by MinGW GCC
|
|
|
|
#define __DBL_DENORM_MIN__ double(4.94065645841246544177e-324L)
|
|
|
|
|
|
|
|
#define __LDBL_MANT_DIG__ LDBL_MANT_DIG
|
|
|
|
#define __LDBL_DIG__ LDBL_DIG
|
|
|
|
#define __LDBL_RADIX__ LDBL_RADIX
|
|
|
|
#define __LDBL_MIN_EXP__ LDBL_MIN_EXP
|
|
|
|
#define __LDBL_MIN_10_EXP__ LDBL_MIN_10_EXP
|
|
|
|
#define __LDBL_MAX_EXP__ LDBL_MAX_EXP
|
|
|
|
#define __LDBL_MAX_10_EXP__ LDBL_MAX_10_EXP
|
|
|
|
#define __LDBL_MIN__ LDBL_MIN
|
|
|
|
#define __LDBL_MAX__ LDBL_MAX
|
|
|
|
#define __LDBL_EPSILON__ LDBL_EPSILON
|
|
|
|
// predefined by MinGW GCC
|
|
|
|
#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
|
|
|
|
|
|
|
|
// __builtin replacements/workarounds
|
2011-10-23 04:59:45 +08:00
|
|
|
#define __builtin_huge_vall() _LInf._Long_double
|
|
|
|
#define __builtin_nanl(__dummmy) _LNan._Long_double
|
|
|
|
#define __builtin_nansl(__dummy) _LSnan._Long_double
|
2011-10-20 20:49:21 +08:00
|
|
|
|
2017-05-11 04:57:45 +08:00
|
|
|
#endif // _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H
|