Commit 87db1cf6 authored by Kasimier T. Buchcik's avatar Kasimier T. Buchcik

Tiny portability adjustment for win. Added runtest.exe and runsuite.exe to

* runsuite.c runtest.c: Tiny portability adjustment for win.
* win32/Makefile.*: Added runtest.exe and runsuite.exe to
  be created.
parent 91fe3edc
Tue Jul 5 12:38:36 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
* runsuite.c runtest.c: Tiny portability adjustment for win.
* win32/Makefile.*: Added runtest.exe and runsuite.exe to
be created.
Mon Jul 4 17:44:26 CEST 2005 Daniel Veillard <daniel@veillard.com> Mon Jul 4 17:44:26 CEST 2005 Daniel Veillard <daniel@veillard.com>
* runsuite.c: first stb at unimplemnted detection * runsuite.c: first stb at unimplemnted detection
......
...@@ -31,7 +31,12 @@ ...@@ -31,7 +31,12 @@
#define LOGFILE "runsuite.log" #define LOGFILE "runsuite.log"
FILE *logfile = NULL; FILE *logfile = NULL;
int verbose = 0; int verbose = 0;
#if defined(_WIN32) && !defined(__CYGWIN__)
#define vsnprintf _vsnprintf
#define snprintf _snprintf
#endif
/************************************************************************ /************************************************************************
* * * *
......
...@@ -110,7 +110,7 @@ static int glob(const char *pattern, int flags, ...@@ -110,7 +110,7 @@ static int glob(const char *pattern, int flags,
WIN32_FIND_DATA FindFileData; WIN32_FIND_DATA FindFileData;
HANDLE hFind; HANDLE hFind;
unsigned int nb_paths = 0; unsigned int nb_paths = 0;
char directory[500], *tmp; char directory[500];
int len; int len;
if ((pattern == NULL) || (pglob == NULL)) return(-1); if ((pattern == NULL) || (pglob == NULL)) return(-1);
...@@ -669,11 +669,13 @@ static int loadMem(const char *filename, const char **mem, int *size) { ...@@ -669,11 +669,13 @@ static int loadMem(const char *filename, const char **mem, int *size) {
while ((res = read(fd, &base[siz], info.st_size - siz)) > 0) { while ((res = read(fd, &base[siz], info.st_size - siz)) > 0) {
siz += res; siz += res;
} }
close(fd); close(fd);
#if !defined(_WIN32)
if (siz != info.st_size) { if (siz != info.st_size) {
free(base); free(base);
return(-1); return(-1);
} }
#endif
base[siz] = 0; base[siz] = 0;
*mem = base; *mem = base;
*size = siz; *size = siz;
......
...@@ -214,7 +214,9 @@ UTILS = $(BINDIR)\xmllint.exe\ ...@@ -214,7 +214,9 @@ UTILS = $(BINDIR)\xmllint.exe\
$(BINDIR)\testSAX.exe\ $(BINDIR)\testSAX.exe\
$(BINDIR)\testSchemas.exe\ $(BINDIR)\testSchemas.exe\
$(BINDIR)\testURI.exe\ $(BINDIR)\testURI.exe\
$(BINDIR)\testXPath.exe $(BINDIR)\testXPath.exe\
$(BINDIR)\runtest.exe\
$(BINDIR)\runsuite.exe
!if "$(WITH_THREADS)" == "yes" || "$(WITH_THREADS)" == "ctls" || "$(WITH_THREADS)" == "native" !if "$(WITH_THREADS)" == "yes" || "$(WITH_THREADS)" == "ctls" || "$(WITH_THREADS)" == "native"
......
...@@ -208,7 +208,9 @@ UTILS = $(BINDIR)/xmllint.exe\ ...@@ -208,7 +208,9 @@ UTILS = $(BINDIR)/xmllint.exe\
$(BINDIR)/testSAX.exe\ $(BINDIR)/testSAX.exe\
$(BINDIR)/testSchemas.exe\ $(BINDIR)/testSchemas.exe\
$(BINDIR)/testURI.exe\ $(BINDIR)/testURI.exe\
$(BINDIR)/testXPath.exe $(BINDIR)/testXPath.exe\
$(BINDIR)/runtest.exe\
$(BINDIR)/runsuite.exe
ifeq ($(WITH_THREADS),yes) ifeq ($(WITH_THREADS),yes)
UTILS += $(BINDIR)/testThreadsWin32.exe UTILS += $(BINDIR)/testThreadsWin32.exe
endif endif
......
...@@ -193,7 +193,9 @@ UTILS = $(BINDIR)\xmllint.exe\ ...@@ -193,7 +193,9 @@ UTILS = $(BINDIR)\xmllint.exe\
$(BINDIR)\testSAX.exe\ $(BINDIR)\testSAX.exe\
$(BINDIR)\testSchemas.exe\ $(BINDIR)\testSchemas.exe\
$(BINDIR)\testURI.exe\ $(BINDIR)\testURI.exe\
$(BINDIR)\testXPath.exe $(BINDIR)\testXPath.exe\
$(BINDIR)\runtest.exe\
$(BINDIR)\runsuite.exe
!if "$(WITH_THREADS)" == "yes" || "$(WITH_THREADS)" == "ctls" || "$(WITH_THREADS)" == "native" !if "$(WITH_THREADS)" == "yes" || "$(WITH_THREADS)" == "ctls" || "$(WITH_THREADS)" == "native"
UTILS = $(UTILS) $(BINDIR)\testThreadsWin32.exe UTILS = $(UTILS) $(BINDIR)\testThreadsWin32.exe
!else if "$(WITH_THREADS)" == "posix" !else if "$(WITH_THREADS)" == "posix"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment