Compatibility for MSVC and MinGW
This commit is contained in:
@@ -102,14 +102,14 @@ inline void float_h()
|
||||
out << "#define DBL_TRAPS " << std::dec << std::numeric_limits<double>::traps << std::endl;
|
||||
out << "#define DBL_TINYNESS_BEFORE " << std::dec << std::numeric_limits<double>::tinyness_before << std::endl;
|
||||
|
||||
out << "#define DBL_MIN " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::min() ) << "l)" << std::endl;
|
||||
out << "#define DBL_MAX " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::max() ) << "l)" << std::endl;
|
||||
out << "#define DBL_EPSILON " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::epsilon() ) << "l)" << std::endl;
|
||||
out << "#define DBL_INF " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::infinity() ) << "l)" << std::endl;
|
||||
out << "#define DBL_QUIET_NAN " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::quiet_NaN() ) << "l)" << std::endl;
|
||||
out << "#define DBL_SIGNALING_NAN " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::signaling_NaN()) << "l)" << std::endl;
|
||||
out << "#define DBL_DENORM_MIN " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::denorm_min() ) << "l)" << std::endl;
|
||||
out << "#define DBL_ROUND_ERR " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::round_error() ) << "l)" << std::endl;
|
||||
out << "#define DBL_MIN " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::min() ) << "ll)" << std::endl;
|
||||
out << "#define DBL_MAX " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::max() ) << "ll)" << std::endl;
|
||||
out << "#define DBL_EPSILON " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::epsilon() ) << "ll)" << std::endl;
|
||||
out << "#define DBL_INF " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::infinity() ) << "ll)" << std::endl;
|
||||
out << "#define DBL_QUIET_NAN " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::quiet_NaN() ) << "ll)" << std::endl;
|
||||
out << "#define DBL_SIGNALING_NAN " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::signaling_NaN()) << "ll)" << std::endl;
|
||||
out << "#define DBL_DENORM_MIN " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::denorm_min() ) << "ll)" << std::endl;
|
||||
out << "#define DBL_ROUND_ERR " << "fennec::bit_cast<double>(0x" << std::hex << std::bit_cast<long long>(std::numeric_limits<double>::round_error() ) << "ll)" << std::endl;
|
||||
|
||||
out << "" << std::endl;
|
||||
|
||||
|
||||
@@ -64,8 +64,26 @@ inline void integer_h()
|
||||
|
||||
out << "" << std::endl;
|
||||
|
||||
out << "#undef CHAR_MIN" << std::endl;
|
||||
out << "#undef CHAR_MAX" << std::endl;
|
||||
out << "#undef WCHAR_MIN" << std::endl;
|
||||
out << "#undef WCHAR_MAX" << std::endl;
|
||||
out << "#undef SCHAR_MIN" << std::endl;
|
||||
out << "#undef SCHAR_MAX" << std::endl;
|
||||
out << "#undef UCHAR_MIN" << std::endl;
|
||||
out << "#undef UCHAR_MAX" << std::endl;
|
||||
out << "#undef INT_MIN" << std::endl;
|
||||
out << "#undef INT_MAX" << std::endl;
|
||||
out << "#undef UINT_MIN" << std::endl;
|
||||
out << "#undef UINT_MAX" << std::endl;
|
||||
out << "#undef LONG_MIN" << std::endl;
|
||||
out << "#undef LONG_MAX" << std::endl;
|
||||
out << "#undef ULONG_MIN" << std::endl;
|
||||
out << "#undef ULONG_MAX" << std::endl;
|
||||
out << "#undef LLONG_MIN" << std::endl;
|
||||
out << "#undef LLONG_MAX" << std::endl;
|
||||
out << "#undef ULLONG_MIN" << std::endl;
|
||||
out << "#undef ULLONG_MAX" << std::endl;
|
||||
|
||||
out << "" << std::endl;
|
||||
|
||||
@@ -212,7 +230,7 @@ inline void integer_h()
|
||||
out << "#define ULONG_DIG " << "0x" << std::hex << std::numeric_limits<unsigned long int>::digits10 << std::endl;
|
||||
out << "#define ULONG_DECIMAL_DIG " << "0x" << std::hex << std::numeric_limits<unsigned long int>::max_digits10 << std::endl;
|
||||
out << "#define ULONG_RADIX " << "0x" << std::hex << std::numeric_limits<unsigned long int>::radix << std::endl;
|
||||
out << "#define ULONG_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<unsigned long int>::traps << std::endl;
|
||||
out << "#define ULONG_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<unsigned long int>::traps << std::endl;
|
||||
|
||||
out << "#define ULONG_MIN " << "0x" << std::hex << std::numeric_limits<unsigned long int>::min() << std::endl;
|
||||
out << "#define ULONG_MAX " << "0x" << std::hex << std::numeric_limits<unsigned long int>::max() << std::endl;
|
||||
@@ -224,7 +242,7 @@ inline void integer_h()
|
||||
out << "#define LLONG_DIG " << "0x" << std::hex << std::numeric_limits<long long>::digits10 << std::endl;
|
||||
out << "#define LLONG_DECIMAL_DIG " << "0x" << std::hex << std::numeric_limits<long long>::max_digits10 << std::endl;
|
||||
out << "#define LLONG_RADIX " << "0x" << std::hex << std::numeric_limits<long long>::radix << std::endl;
|
||||
out << "#define LLONG_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<long long>::traps << std::endl;
|
||||
out << "#define LLONG_TRAPS " << "0x" << std::boolalpha << std::numeric_limits<long long>::traps << std::endl;
|
||||
|
||||
out << "#define LLONG_MIN " << "0x" << std::hex << std::numeric_limits<long long>::min() << std::endl;
|
||||
out << "#define LLONG_MAX " << "0x" << std::hex << std::numeric_limits<long long>::max() << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user