mastodonpp  0.0.0
limits_msvc_win32.h
1 // -*- C++ -*-
2 //===------------------ support/win32/limits_msvc_win32.h -----------------===//
3 //
4 // The LLVM Compiler Infrastructure
5 //
6 // This file is dual licensed under the MIT and the University of Illinois Open
7 // Source Licenses. See LICENSE.TXT for details.
8 //
9 //===----------------------------------------------------------------------===//
10 
11 #ifndef _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H
12 #define _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H
13 
14 #if !defined(_LIBCPP_MSVCRT)
15 #error "This header complements the Microsoft C Runtime library, and should not be included otherwise."
16 #endif
17 #if defined(__clang__)
18 #error "This header should only be included when using Microsofts C1XX frontend"
19 #endif
20 
21 #include <limits.h> // CHAR_BIT
22 #include <float.h> // limit constants
23 #include <math.h> // HUGE_VAL
24 #include <ymath.h> // internal MSVC header providing the needed functionality
25 
26 #define __CHAR_BIT__ CHAR_BIT
27 
28 #define __FLT_MANT_DIG__ FLT_MANT_DIG
29 #define __FLT_DIG__ FLT_DIG
30 #define __FLT_RADIX__ FLT_RADIX
31 #define __FLT_MIN_EXP__ FLT_MIN_EXP
32 #define __FLT_MIN_10_EXP__ FLT_MIN_10_EXP
33 #define __FLT_MAX_EXP__ FLT_MAX_EXP
34 #define __FLT_MAX_10_EXP__ FLT_MAX_10_EXP
35 #define __FLT_MIN__ FLT_MIN
36 #define __FLT_MAX__ FLT_MAX
37 #define __FLT_EPSILON__ FLT_EPSILON
38 // predefined by MinGW GCC
39 #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F
40 
41 #define __DBL_MANT_DIG__ DBL_MANT_DIG
42 #define __DBL_DIG__ DBL_DIG
43 #define __DBL_RADIX__ DBL_RADIX
44 #define __DBL_MIN_EXP__ DBL_MIN_EXP
45 #define __DBL_MIN_10_EXP__ DBL_MIN_10_EXP
46 #define __DBL_MAX_EXP__ DBL_MAX_EXP
47 #define __DBL_MAX_10_EXP__ DBL_MAX_10_EXP
48 #define __DBL_MIN__ DBL_MIN
49 #define __DBL_MAX__ DBL_MAX
50 #define __DBL_EPSILON__ DBL_EPSILON
51 // predefined by MinGW GCC
52 #define __DBL_DENORM_MIN__ double(4.94065645841246544177e-324L)
53 
54 #define __LDBL_MANT_DIG__ LDBL_MANT_DIG
55 #define __LDBL_DIG__ LDBL_DIG
56 #define __LDBL_RADIX__ LDBL_RADIX
57 #define __LDBL_MIN_EXP__ LDBL_MIN_EXP
58 #define __LDBL_MIN_10_EXP__ LDBL_MIN_10_EXP
59 #define __LDBL_MAX_EXP__ LDBL_MAX_EXP
60 #define __LDBL_MAX_10_EXP__ LDBL_MAX_10_EXP
61 #define __LDBL_MIN__ LDBL_MIN
62 #define __LDBL_MAX__ LDBL_MAX
63 #define __LDBL_EPSILON__ LDBL_EPSILON
64 // predefined by MinGW GCC
65 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
66 
67 // __builtin replacements/workarounds
68 #define __builtin_huge_vall() _LInf._Long_double
69 #define __builtin_nanl(__dummmy) _LNan._Long_double
70 #define __builtin_nansl(__dummy) _LSnan._Long_double
71 
72 #endif // _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H