Compilation fixes for MinGW

This commit is contained in:
Atsushi SAKAI
2008-06-26 09:37:51 +00:00
parent 9c593643ff
commit fbb5d771a0
11 changed files with 53 additions and 6 deletions

View File

@@ -36,7 +36,6 @@ EXTRA_DIST = \
oomtrace.pl \
test-lib.sh \
xmlrpcserver.py \
test_conf.sh \
qemuxml2argvdata \
nodeinfodata
@@ -44,16 +43,20 @@ noinst_PROGRAMS = xmlrpctest xml2sexprtest sexpr2xmltest virshtest conftest \
reconnect xmconfigtest xencapstest qemuxml2argvtest qemuxml2xmltest \
nodeinfotest statstest qparamtest
test_scripts = \
test_scripts =
if WITH_LIBVIRTD
test_scripts += \
test_conf.sh \
daemon-conf \
int-overflow \
read-bufsiz \
read-non-seekable \
vcpupin
endif
EXTRA_DIST += $(test_scripts)
TESTS = xml2sexprtest sexpr2xmltest virshtest test_conf.sh xmconfigtest \
TESTS = xml2sexprtest sexpr2xmltest virshtest xmconfigtest \
xencapstest qemuxml2argvtest qemuxml2xmltest nodeinfotest \
statstest qparamtest $(test_scripts)
if ENABLE_XEN_TESTS

View File

@@ -17,7 +17,9 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#ifndef WIN32
#include <sys/wait.h>
#endif
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
@@ -139,6 +141,7 @@ int virtTestLoadFile(const char *name,
return st.st_size;
}
#ifndef WIN32
static
void virtTestCaptureProgramExecChild(const char *const argv[],
int pipefd) {
@@ -181,7 +184,6 @@ void virtTestCaptureProgramExecChild(const char *const argv[],
close(stderrfd);
}
int virtTestCaptureProgramOutput(const char *const argv[],
char **buf,
int buflen) {
@@ -227,6 +229,7 @@ int virtTestCaptureProgramOutput(const char *const argv[],
}
}
}
#endif /* !WIN32 */
/**

View File

@@ -1,5 +1,5 @@
#include <config.h>
#ifdef WITH_QEMU
#include <sys/utsname.h>
#include <stdlib.h>
@@ -70,3 +70,4 @@ cleanup:
virCapabilitiesFree(caps);
return NULL;
}
#endif

View File

@@ -270,7 +270,7 @@ static int testCompareDomstateByName(const void *data ATTRIBUTE_UNUSED) {
}
#ifndef WIN32
static int
mymain(int argc, char **argv)
{
@@ -358,5 +358,10 @@ mymain(int argc, char **argv)
return(ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
#else /* ! WIN32 */
static int mymain (void) { exit (77); /* means 'test skipped' for automake */ }
#endif /* WIN32 */
VIRT_TEST_MAIN(mymain)