[libxml2] Fix exponent digits when running tests under old MSVC



commit 1fda32480c45025da7277a88c910b62553cda130
Author: Daniel Richard G <skunk iSKUNK ORG>
Date:   Mon Oct 14 16:48:32 2019 +0200

    Fix exponent digits when running tests under old MSVC
    
    Switch printf output format to two-digit exponent under certain MSVC
    versions.
    
    Closes #111.

 runtest.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/runtest.c b/runtest.c
index 93d39761..ffa98d04 100644
--- a/runtest.c
+++ b/runtest.c
@@ -4549,6 +4549,10 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
     setvbuf(stderr, NULL, _IONBF, 0);
 #endif
 
+#if defined(_MSC_VER) && _MSC_VER >= 1400 && _MSC_VER < 1900
+    _set_output_format(_TWO_DIGIT_EXPONENT);
+#endif
+
     initializeLibxml2();
 
     for (a = 1; a < argc;a++) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]