1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

Restore code for Windows compilation

Try to keep as close to rc1 but still allow the change from Roumen for
mingw
This commit is contained in:
Daniel Veillard
2012-05-23 15:52:45 +08:00
parent ee8f1d4cda
commit 22030ef888
6 changed files with 22 additions and 2 deletions

View File

@ -28,7 +28,9 @@
#include "libxml_wrap.h" #include "libxml_wrap.h"
#include "libxml2-py.h" #include "libxml2-py.h"
#if defined(WITH_TRIO) #if defined(_MSC_VER) && !defined(vsnprintf)
#define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
#elif defined(WITH_TRIO) && !defined(vsnprintf)
#include "trio.h" #include "trio.h"
#define vsnprintf trio_vsnprintf #define vsnprintf trio_vsnprintf
#endif #endif

View File

@ -38,6 +38,10 @@
static FILE *logfile = NULL; static FILE *logfile = NULL;
static int verbose = 0; static int verbose = 0;
#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
#define vsnprintf _vsnprintf
#define snprintf _snprintf
#endif
/************************************************************************ /************************************************************************
* * * *

View File

@ -194,6 +194,11 @@ static void globfree(glob_t *pglob) {
free(pglob->gl_pathv[i]); free(pglob->gl_pathv[i]);
} }
} }
#if !defined(__MINGW32__)
#define vsnprintf _vsnprintf
#define snprintf _snprintf
#endif
#else #else
#include <glob.h> #include <glob.h>
#endif #endif

View File

@ -37,6 +37,10 @@ static int verbose = 0;
#define NB_EXPECTED_ERRORS 15 #define NB_EXPECTED_ERRORS 15
#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
#define vsnprintf _vsnprintf
#define snprintf _snprintf
#endif
const char *skipped_tests[] = { const char *skipped_tests[] = {
/* http://lists.w3.org/Archives/Public/public-xml-testsuite/2008Jul/0000.html */ /* http://lists.w3.org/Archives/Public/public-xml-testsuite/2008Jul/0000.html */

View File

@ -19,7 +19,7 @@
#include <libxml/xmlerror.h> #include <libxml/xmlerror.h>
#include <libxml/relaxng.h> #include <libxml/relaxng.h>
#if defined(_WIN32) && !defined(__CYGWIN__) #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
#define snprintf _snprintf #define snprintf _snprintf
#endif #endif

View File

@ -148,6 +148,11 @@ static void globfree(glob_t *pglob) {
free(pglob->gl_pathv[i]); free(pglob->gl_pathv[i]);
} }
} }
#if !defined(__MINGW32__)
#define vsnprintf _vsnprintf
#define snprintf _snprintf
#endif
#else #else
#include <glob.h> #include <glob.h>
#endif #endif