[libxml2] Fix runtest on Windows



commit 82e0394d46095dd32d3de8c244ef7b7d5b019b51
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Mon Oct 9 02:05:41 2017 +0200

    Fix runtest on Windows
    
    Unbuffer the output and fix some compiler warnings.

 runtest.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/runtest.c b/runtest.c
index 0d23701..981fd8d 100644
--- a/runtest.c
+++ b/runtest.c
@@ -119,8 +119,8 @@ typedef struct
 } glob_t;
 
 #define GLOB_DOOFFS 0
-static int glob(const char *pattern, int flags,
-                int errfunc(const char *epath, int eerrno),
+static int glob(const char *pattern, ATTRIBUTE_UNUSED int flags,
+                ATTRIBUTE_UNUSED int errfunc(const char *epath, int eerrno),
                 glob_t *pglob) {
     glob_t *ret;
     WIN32_FIND_DATA FindFileData;
@@ -4523,6 +4523,11 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
     int i, a, ret = 0;
     int subset = 0;
 
+#if defined(_WIN32) && !defined(__CYGWIN__)
+    setvbuf(stdout, NULL, _IONBF, 0);
+    setvbuf(stderr, NULL, _IONBF, 0);
+#endif
+
     initializeLibxml2();
 
     for (a = 1; a < argc;a++) {


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