aboutsummaryrefslogtreecommitdiffstats
path: root/runtest.c
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 /runtest.c
parent91fe3edcaa7140947075f476a0f20b47a61cbb8b (diff)
downloadandroid_external_libxml2-87db1cf6d1f05b286cf47960324b8536db442f80.tar.gz
android_external_libxml2-87db1cf6d1f05b286cf47960324b8536db442f80.tar.bz2
android_external_libxml2-87db1cf6d1f05b286cf47960324b8536db442f80.zip
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.
Diffstat (limited to 'runtest.c')
-rw-r--r--runtest.c8
1 files changed, 5 insertions, 3 deletions
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;