Merge pull request #33446 from bruvzg/mingw_ucrt_fix
Fix MinGW/clang/LLD/UCRT build.
This commit is contained in:
commit
6049c32cd4
1 changed files with 2 additions and 2 deletions
|
@ -1338,13 +1338,13 @@ String String::num_scientific(double p_num) {
|
|||
|
||||
#if defined(__GNUC__) || defined(_MSC_VER)
|
||||
|
||||
#if (defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER < 1900)) && defined(_TWO_DIGIT_EXPONENT)
|
||||
#if (defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER < 1900)) && defined(_TWO_DIGIT_EXPONENT) && !defined(_UCRT)
|
||||
// MinGW and old MSC require _set_output_format() to conform to C99 output for printf
|
||||
unsigned int old_exponent_format = _set_output_format(_TWO_DIGIT_EXPONENT);
|
||||
#endif
|
||||
snprintf(buf, 256, "%lg", p_num);
|
||||
|
||||
#if (defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER < 1900)) && defined(_TWO_DIGIT_EXPONENT)
|
||||
#if (defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER < 1900)) && defined(_TWO_DIGIT_EXPONENT) && !defined(_UCRT)
|
||||
_set_output_format(old_exponent_format);
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue