diff options
author | Björn-Egil Dahlberg <[email protected]> | 2013-01-23 16:28:07 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2013-01-23 16:28:07 +0100 |
commit | d0809964a228c6314a5bb8b5872114a0ab9ec65e (patch) | |
tree | a2eae1bff3f1fb677f7c26e30c3d9a244c871fb9 /erts | |
parent | a5c2217360654969a118862cc95157db90755272 (diff) | |
parent | ab462a0e475f8b3696289e7b7b11e56b8e0b07c2 (diff) | |
download | otp-d0809964a228c6314a5bb8b5872114a0ab9ec65e.tar.gz otp-d0809964a228c6314a5bb8b5872114a0ab9ec65e.tar.bz2 otp-d0809964a228c6314a5bb8b5872114a0ab9ec65e.zip |
Merge branch 'egil/fix-win-float-exponent/OTP-10751'
* egil/fix-win-float-exponent/OTP-10751:
erts: Force windows to use two-digit exponent
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/beam/erl_init.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_init.c b/erts/emulator/beam/erl_init.c index 516f7b3cb3..b518683730 100644 --- a/erts/emulator/beam/erl_init.c +++ b/erts/emulator/beam/erl_init.c @@ -1532,6 +1532,14 @@ erl_start(int argc, char **argv) i++; } +/* Output format on windows for sprintf defaults to three exponents. + * We use two-exponent to mimic normal sprintf behaviour. + */ + +#if defined(__WIN32__) && defined(_TWO_DIGIT_EXPONENT) + _set_output_format(_TWO_DIGIT_EXPONENT); +#endif + /* Restart will not reinstall the break handler */ #ifdef __WIN32__ if (ignore_break) |