10000 windows: Call _set_output_format() only on Visual Studio versions 201… · micropython/micropython@3510499 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3510499

Browse files
omtinezPaul Sokolovsky
authored and
Paul Sokolovsky
committed
windows: Call _set_output_format() only on Visual Studio versions 2013 or lower.
Since VS2015, float formatting is C standard compliant by default: https://msdn.microsoft.com/en-us/library/bb531344(v=vs.140).aspx
1 parent 17c649d commit 3510499

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

windows/init.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ void init() {
3232
init_sleep();
3333
#ifdef __MINGW32__
3434
putenv("PRINTF_EXPONENT_DIGITS=2");
35-
#else
35+
#elif _MSC_VER < 1900
36+
// This is only necessary for Visual Studio versions 2013 and below:
37+
// https://msdn.microsoft.com/en-us/library/bb531344(v=vs.140).aspx
3638
_set_output_format(_TWO_DIGIT_EXPONENT);
3739
#endif
3840
}

0 commit comments

Comments
 (0)
0