diff options
author | Björn-Egil Dahlberg <[email protected]> | 2013-01-22 18:26:29 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2013-01-22 18:26:29 +0100 |
commit | ab462a0e475f8b3696289e7b7b11e56b8e0b07c2 (patch) | |
tree | 384921dc2df93a0163471eb82a551a72b9ba1639 /erts/emulator/beam/erl_init.c | |
parent | 9b01d9553434256b93b4899caf042d857f6ef068 (diff) | |
download | otp-ab462a0e475f8b3696289e7b7b11e56b8e0b07c2.tar.gz otp-ab462a0e475f8b3696289e7b7b11e56b8e0b07c2.tar.bz2 otp-ab462a0e475f8b3696289e7b7b11e56b8e0b07c2.zip |
erts: Force windows to use two-digit exponent
sprintf on windows uses a three-digit exponent default
Diffstat (limited to 'erts/emulator/beam/erl_init.c')
-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 8cdf954dd2..44735ba425 100644 --- a/erts/emulator/beam/erl_init.c +++ b/erts/emulator/beam/erl_init.c @@ -1520,6 +1520,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) |