Compatibility for MSVC and MinGW

This commit is contained in:
2025-06-22 17:06:50 -04:00
parent 31e3c26b66
commit bd7f0829f4
5 changed files with 85 additions and 37 deletions

View File

@@ -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;