From 25450d0629fa6d2d7d7aad9fa0b899aef86a1897 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Mon, 4 Jul 2005 16:02:38 +0000 Subject: One more fixup, daniel --- runtest.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/runtest.c b/runtest.c index faf500ac..fc1e8ff2 100644 --- a/runtest.c +++ b/runtest.c @@ -90,6 +90,7 @@ static int checkTestFile(const char *filename); #if defined(_WIN32) && !defined(__CYGWIN__) #include +#include typedef struct { @@ -105,11 +106,11 @@ static int glob(const char *pattern, int flags, glob_t *ret; WIN32_FIND_DATA FindFileData; HANDLE hFind; - int nb_paths = 0; + unsigned int nb_paths = 0; if ((pattern == NULL) || (pglob == NULL)) return(-1); - ret = &pglob; + ret = pglob; memset(ret, 0, sizeof(glob_t)); hFind = FindFirstFileA(pattern, &FindFileData); @@ -555,8 +556,13 @@ static int checkTestFile(const char *filename) { if (stat(filename, &buf) == -1) return(0); +#if defined(_WIN32) && !defined(__CYGWIN__) + if (!(buf.st_mode & _S_IFREG)) + return(0); +#else if (!S_ISREG(buf.st_mode)) return(0); +#endif return(1); } @@ -3769,7 +3775,8 @@ testThread(void) DWORD useless; tid[i] = CreateThread(NULL, 0, - win32_thread_specific_data, testfiles[i], 0, + win32_thread_specific_data, + (void) testfiles[i], 0, &useless); if (tid[i] == NULL) { fprintf(stderr, "CreateThread failed\n"); -- cgit v1.2.3