summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKasimier T. Buchcik <kbuchcik@src.gnome.org>2005-07-05 10:40:52 +0000
committerKasimier T. Buchcik <kbuchcik@src.gnome.org>2005-07-05 10:40:52 +0000
commit87db1cf6d1f05b286cf47960324b8536db442f80 (patch)
treece66acef090df5be66f594c6bdf253c7ede27ef3
parent91fe3edcaa7140947075f476a0f20b47a61cbb8b (diff)
downloadlibxml2-87db1cf6d1f05b286cf47960324b8536db442f80.tar.gz
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.
-rw-r--r--ChangeLog6
-rw-r--r--runsuite.c7
-rw-r--r--runtest.c8
-rw-r--r--win32/Makefile.bcb4
-rw-r--r--win32/Makefile.mingw4
-rw-r--r--win32/Makefile.msvc4
6 files changed, 26 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 13f71387..4ef6197c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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>
* runsuite.c: first stb at unimplemnted detection
diff --git a/runsuite.c b/runsuite.c
index 3d9d6b72..b7883134 100644
--- a/runsuite.c
+++ b/runsuite.c
@@ -31,7 +31,12 @@
#define LOGFILE "runsuite.log"
FILE *logfile = NULL;
-int verbose = 0;
+int verbose = 0;
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+#define vsnprintf _vsnprintf
+#define snprintf _snprintf
+#endif
/************************************************************************
* *
diff --git a/runtest.c b/runtest.c
index d3dc4aaa..63cf0d52 100644
--- a/runtest.c
+++ b/runtest.c
@@ -110,7 +110,7 @@ static int glob(const char *pattern, int flags,
WIN32_FIND_DATA FindFileData;
HANDLE hFind;
unsigned int nb_paths = 0;
- char directory[500], *tmp;
+ char directory[500];
int len;
if ((pattern == NULL) || (pglob == NULL)) return(-1);
@@ -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) {
siz += res;
}
- close(fd);
+ close(fd);
+#if !defined(_WIN32)
if (siz != info.st_size) {
free(base);
return(-1);
- }
+ }
+#endif
base[siz] = 0;
*mem = base;
*size = siz;
diff --git a/win32/Makefile.bcb b/win32/Makefile.bcb
index 182e41f7..6603d2a4 100644
--- a/win32/Makefile.bcb
+++ b/win32/Makefile.bcb
@@ -214,7 +214,9 @@ UTILS = $(BINDIR)\xmllint.exe\
$(BINDIR)\testSAX.exe\
$(BINDIR)\testSchemas.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"
diff --git a/win32/Makefile.mingw b/win32/Makefile.mingw
index 0a4f3148..61d15ab3 100644
--- a/win32/Makefile.mingw
+++ b/win32/Makefile.mingw
@@ -208,7 +208,9 @@ UTILS = $(BINDIR)/xmllint.exe\
$(BINDIR)/testSAX.exe\
$(BINDIR)/testSchemas.exe\
$(BINDIR)/testURI.exe\
- $(BINDIR)/testXPath.exe
+ $(BINDIR)/testXPath.exe\
+ $(BINDIR)/runtest.exe\
+ $(BINDIR)/runsuite.exe
ifeq ($(WITH_THREADS),yes)
UTILS += $(BINDIR)/testThreadsWin32.exe
endif
diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc
index f57b53c8..f5914dbe 100644
--- a/win32/Makefile.msvc
+++ b/win32/Makefile.msvc
@@ -193,7 +193,9 @@ UTILS = $(BINDIR)\xmllint.exe\
$(BINDIR)\testSAX.exe\
$(BINDIR)\testSchemas.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"
UTILS = $(UTILS) $(BINDIR)\testThreadsWin32.exe
!else if "$(WITH_THREADS)" == "posix"