From 87db1cf6d1f05b286cf47960324b8536db442f80 Mon Sep 17 00:00:00 2001 From: "Kasimier T. Buchcik" Date: Tue, 5 Jul 2005 10:40:52 +0000 Subject: 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. --- runtest.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'runtest.c') 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; -- cgit v1.2.3