aboutsummaryrefslogtreecommitdiffstats
path: root/runtest.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2005-07-04 16:02:38 +0000
committerDaniel Veillard <veillard@src.gnome.org>2005-07-04 16:02:38 +0000
commit25450d0629fa6d2d7d7aad9fa0b899aef86a1897 (patch)
tree1c779c8ea69bb77e4189f61dabe3e95d30f2c86c /runtest.c
parent9083778967e514c6c786c7feabd80f3d339d8b3d (diff)
downloadandroid_external_libxml2-25450d0629fa6d2d7d7aad9fa0b899aef86a1897.tar.gz
android_external_libxml2-25450d0629fa6d2d7d7aad9fa0b899aef86a1897.tar.bz2
android_external_libxml2-25450d0629fa6d2d7d7aad9fa0b899aef86a1897.zip
One more fixup, daniel
Diffstat (limited to 'runtest.c')
-rw-r--r--runtest.c13
1 files 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 <windows.h>
+#include <io.h>
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");