[libxml2] clean redefinition of {v}snprintf in C-source



commit c3b1d09ba226a138722a21cc8e8cc8ee29d80f8d
Author: Roumen Petrov <bugtrack roumenpetrov info>
Date:   Mon Aug 13 16:50:48 2012 +0800

    clean redefinition of {v}snprintf in C-source
    
    as those from *config.h are preferable (e.g. win32config.h)

 python/libxml.c |    4 +---
 runsuite.c      |    4 ----
 runtest.c       |    4 ----
 runxmlconf.c    |    4 ----
 testapi.c       |    3 ---
 testrecurse.c   |    4 ----
 6 files changed, 1 insertions(+), 22 deletions(-)
---
diff --git a/python/libxml.c b/python/libxml.c
index 9dabf89..ea4998b 100644
--- a/python/libxml.c
+++ b/python/libxml.c
@@ -28,9 +28,7 @@
 #include "libxml_wrap.h"
 #include "libxml2-py.h"
 
-#if defined(_MSC_VER) && !defined(vsnprintf)
-#define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
-#elif defined(WITH_TRIO) && !defined(vsnprintf)
+#if defined(WITH_TRIO)
 #include "trio.h"
 #define vsnprintf trio_vsnprintf
 #endif
diff --git a/runsuite.c b/runsuite.c
index 8ba5f6f..c13189f 100644
--- a/runsuite.c
+++ b/runsuite.c
@@ -35,10 +35,6 @@
 static FILE *logfile = NULL;
 static int verbose = 0;
 
-#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
-#define vsnprintf _vsnprintf
-#define snprintf _snprintf
-#endif
 
 /************************************************************************
  *									*
diff --git a/runtest.c b/runtest.c
index 7cde25b..4953889 100644
--- a/runtest.c
+++ b/runtest.c
@@ -192,10 +192,6 @@ static void globfree(glob_t *pglob) {
     }
 }
 
-#if !defined(__MINGW32__)
-#define vsnprintf _vsnprintf
-#define snprintf _snprintf
-#endif
 #else
 #include <glob.h>
 #endif
diff --git a/runxmlconf.c b/runxmlconf.c
index a271343..389c5d7 100644
--- a/runxmlconf.c
+++ b/runxmlconf.c
@@ -34,10 +34,6 @@ static int verbose = 0;
 
 #define NB_EXPECTED_ERRORS 15
 
-#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
-#define vsnprintf _vsnprintf
-#define snprintf _snprintf
-#endif
 
 const char *skipped_tests[] = {
 /* http://lists.w3.org/Archives/Public/public-xml-testsuite/2008Jul/0000.html */
diff --git a/testapi.c b/testapi.c
index 99c536f..457a81a 100644
--- a/testapi.c
+++ b/testapi.c
@@ -16,9 +16,6 @@
 #include <libxml/xmlerror.h>
 #include <libxml/relaxng.h>
 
-#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
-#define snprintf _snprintf
-#endif
 
 static int testlibxml2(void);
 static int test_module(const char *module);
diff --git a/testrecurse.c b/testrecurse.c
index efdccc0..e5d5d1b 100644
--- a/testrecurse.c
+++ b/testrecurse.c
@@ -146,10 +146,6 @@ static void globfree(glob_t *pglob) {
     }
 }
 
-#if !defined(__MINGW32__)
-#define vsnprintf _vsnprintf
-#define snprintf _snprintf
-#endif
 #else
 #include <glob.h>
 #endif



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