mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
Merge testThreadsWin32.c into testThreads.c
Apply the same cross-platform modifications as previously in runtest.c.
This commit is contained in:
@@ -126,11 +126,7 @@ testC14N_LDFLAGS =
|
|||||||
testC14N_DEPENDENCIES = $(DEPS)
|
testC14N_DEPENDENCIES = $(DEPS)
|
||||||
testC14N_LDADD= $(LDADDS)
|
testC14N_LDADD= $(LDADDS)
|
||||||
|
|
||||||
if THREADS_W32
|
|
||||||
testThreads_SOURCES = testThreadsWin32.c
|
|
||||||
else
|
|
||||||
testThreads_SOURCES = testThreads.c
|
testThreads_SOURCES = testThreads.c
|
||||||
endif
|
|
||||||
testThreads_LDFLAGS =
|
testThreads_LDFLAGS =
|
||||||
testThreads_DEPENDENCIES = $(DEPS)
|
testThreads_DEPENDENCIES = $(DEPS)
|
||||||
testThreads_LDADD= $(BASE_THREAD_LIBS) $(LDADDS)
|
testThreads_LDADD= $(BASE_THREAD_LIBS) $(LDADDS)
|
||||||
@@ -1253,7 +1249,7 @@ EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \
|
|||||||
libxml2-config.cmake.in autogen.sh \
|
libxml2-config.cmake.in autogen.sh \
|
||||||
trionan.c trionan.h triostr.c triostr.h trio.c trio.h \
|
trionan.c trionan.h triostr.c triostr.h trio.c trio.h \
|
||||||
triop.h triodef.h libxml.h elfgcchack.h xzlib.h buf.h \
|
triop.h triodef.h libxml.h elfgcchack.h xzlib.h buf.h \
|
||||||
enc.h save.h testThreadsWin32.c genUnicode.py TODO_SCHEMAS \
|
enc.h save.h genUnicode.py TODO_SCHEMAS \
|
||||||
dbgen.pl dbgenattr.pl regressions.py regressions.xml \
|
dbgen.pl dbgenattr.pl regressions.py regressions.xml \
|
||||||
README.tests Makefile.tests libxml2.syms timsort.h \
|
README.tests Makefile.tests libxml2.syms timsort.h \
|
||||||
README.zOS \
|
README.zOS \
|
||||||
|
|||||||
@@ -736,12 +736,9 @@ $(TAB)copy "$(DOLLAR)(InputPath)" ..\$(CONFIG_DSTNAME)
|
|||||||
<!-- FIXME:
|
<!-- FIXME:
|
||||||
<exe id="testModule" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testModule.c</sources></exe>
|
<exe id="testModule" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testModule.c</sources></exe>
|
||||||
|
|
||||||
<if cond="WITH_THREADS=='posix'">
|
<if cond="WITH_THREADS!='no'">
|
||||||
<exe id="testThreads" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testThreads.c</sources></exe>
|
<exe id="testThreads" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testThreads.c</sources></exe>
|
||||||
</if>
|
</if>
|
||||||
<if cond="WITH_THREADS=='ctls' or WITH_THREADS=='native'">
|
|
||||||
<exe id="testThreadsWin32" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testThreadsWin32.c</sources></exe>
|
|
||||||
</if>
|
|
||||||
-->
|
-->
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ ignored_files = {
|
|||||||
"testThreads.c": "test tool",
|
"testThreads.c": "test tool",
|
||||||
"testC14N.c": "test tool",
|
"testC14N.c": "test tool",
|
||||||
"testRelax.c": "test tool",
|
"testRelax.c": "test tool",
|
||||||
"testThreadsWin32.c": "test tool",
|
|
||||||
"testSAX.c": "test tool",
|
"testSAX.c": "test tool",
|
||||||
"testURI.c": "test tool",
|
"testURI.c": "test tool",
|
||||||
"testapi.c": "generated regression tests",
|
"testapi.c": "generated regression tests",
|
||||||
|
|||||||
135
testThreads.c
135
testThreads.c
@@ -10,6 +10,8 @@
|
|||||||
#include <libxml/catalog.h>
|
#include <libxml/catalog.h>
|
||||||
#ifdef HAVE_PTHREAD_H
|
#ifdef HAVE_PTHREAD_H
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
#elif defined HAVE_WIN32_THREADS
|
||||||
|
#include <windows.h>
|
||||||
#elif defined HAVE_BEOS_THREADS
|
#elif defined HAVE_BEOS_THREADS
|
||||||
#include <OS.h>
|
#include <OS.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -20,25 +22,32 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#define MAX_ARGC 20
|
#define MAX_ARGC 20
|
||||||
|
#define TEST_REPEAT_COUNT 500
|
||||||
#ifdef HAVE_PTHREAD_H
|
#ifdef HAVE_PTHREAD_H
|
||||||
static pthread_t tid[MAX_ARGC];
|
static pthread_t tid[MAX_ARGC];
|
||||||
|
#elif defined HAVE_WIN32_THREADS
|
||||||
|
static HANDLE tid[MAX_ARGC];
|
||||||
#elif defined HAVE_BEOS_THREADS
|
#elif defined HAVE_BEOS_THREADS
|
||||||
static thread_id tid[MAX_ARGC];
|
static thread_id tid[MAX_ARGC];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char *catalog = "test/threads/complex.xml";
|
typedef struct {
|
||||||
static const char *testfiles[] = {
|
const char *filename;
|
||||||
"test/threads/abc.xml",
|
int okay;
|
||||||
"test/threads/acb.xml",
|
} xmlThreadParams;
|
||||||
"test/threads/bac.xml",
|
|
||||||
"test/threads/bca.xml",
|
|
||||||
"test/threads/cab.xml",
|
|
||||||
"test/threads/cba.xml",
|
|
||||||
"test/threads/invalid.xml",
|
|
||||||
};
|
|
||||||
|
|
||||||
static const char *Okay = "OK";
|
static const char *catalog = "test/threads/complex.xml";
|
||||||
static const char *Failed = "Failed";
|
static xmlThreadParams threadParams[] = {
|
||||||
|
{ "test/threads/abc.xml", 0 },
|
||||||
|
{ "test/threads/acb.xml", 0 },
|
||||||
|
{ "test/threads/bac.xml", 0 },
|
||||||
|
{ "test/threads/bca.xml", 0 },
|
||||||
|
{ "test/threads/cab.xml", 0 },
|
||||||
|
{ "test/threads/cba.xml", 0 },
|
||||||
|
{ "test/threads/invalid.xml", 0 }
|
||||||
|
};
|
||||||
|
static const unsigned int num_threads = sizeof(threadParams) /
|
||||||
|
sizeof(threadParams[0]);
|
||||||
|
|
||||||
#ifndef xmlDoValidityCheckingDefaultValue
|
#ifndef xmlDoValidityCheckingDefaultValue
|
||||||
#error xmlDoValidityCheckingDefaultValue is not a macro
|
#error xmlDoValidityCheckingDefaultValue is not a macro
|
||||||
@@ -51,7 +60,8 @@ static void *
|
|||||||
thread_specific_data(void *private_data)
|
thread_specific_data(void *private_data)
|
||||||
{
|
{
|
||||||
xmlDocPtr myDoc;
|
xmlDocPtr myDoc;
|
||||||
const char *filename = (const char *) private_data;
|
xmlThreadParams *params = (xmlThreadParams *) private_data;
|
||||||
|
const char *filename = params->filename;
|
||||||
int okay = 1;
|
int okay = 1;
|
||||||
|
|
||||||
if (!strcmp(filename, "test/threads/invalid.xml")) {
|
if (!strcmp(filename, "test/threads/invalid.xml")) {
|
||||||
@@ -91,9 +101,8 @@ thread_specific_data(void *private_data)
|
|||||||
okay = 0;
|
okay = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (okay == 0)
|
params->okay = okay;
|
||||||
return((void *) Failed);
|
return(NULL);
|
||||||
return ((void *) Okay);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_PTHREAD_H
|
#ifdef HAVE_PTHREAD_H
|
||||||
@@ -101,27 +110,25 @@ int
|
|||||||
main(void)
|
main(void)
|
||||||
{
|
{
|
||||||
unsigned int i, repeat;
|
unsigned int i, repeat;
|
||||||
unsigned int num_threads = sizeof(testfiles) / sizeof(testfiles[0]);
|
|
||||||
void *results[MAX_ARGC];
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
xmlInitParser();
|
xmlInitParser();
|
||||||
for (repeat = 0;repeat < 500;repeat++) {
|
for (repeat = 0;repeat < TEST_REPEAT_COUNT;repeat++) {
|
||||||
xmlLoadCatalog(catalog);
|
xmlLoadCatalog(catalog);
|
||||||
|
|
||||||
memset(results, 0, sizeof(*results)*num_threads);
|
|
||||||
memset(tid, 0xff, sizeof(*tid)*num_threads);
|
memset(tid, 0xff, sizeof(*tid)*num_threads);
|
||||||
|
|
||||||
for (i = 0; i < num_threads; i++) {
|
for (i = 0; i < num_threads; i++) {
|
||||||
ret = pthread_create(&tid[i], NULL, thread_specific_data,
|
ret = pthread_create(&tid[i], NULL, thread_specific_data,
|
||||||
(void *) testfiles[i]);
|
(void *) &threadParams[i]);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
perror("pthread_create");
|
perror("pthread_create");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (i = 0; i < num_threads; i++) {
|
for (i = 0; i < num_threads; i++) {
|
||||||
ret = pthread_join(tid[i], &results[i]);
|
void *result;
|
||||||
|
ret = pthread_join(tid[i], &result);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
perror("pthread_join");
|
perror("pthread_join");
|
||||||
exit(1);
|
exit(1);
|
||||||
@@ -130,35 +137,97 @@ main(void)
|
|||||||
|
|
||||||
xmlCatalogCleanup();
|
xmlCatalogCleanup();
|
||||||
for (i = 0; i < num_threads; i++)
|
for (i = 0; i < num_threads; i++)
|
||||||
if (results[i] != (void *) Okay)
|
if (threadParams[i].okay == 0)
|
||||||
printf("Thread %d handling %s failed\n", i, testfiles[i]);
|
printf("Thread %d handling %s failed\n", i,
|
||||||
|
threadParams[i].filename);
|
||||||
}
|
}
|
||||||
xmlCleanupParser();
|
xmlCleanupParser();
|
||||||
xmlMemoryDump();
|
xmlMemoryDump();
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
#elif defined HAVE_WIN32_THREADS
|
||||||
|
static DWORD WINAPI
|
||||||
|
win32_thread_specific_data(void *private_data)
|
||||||
|
{
|
||||||
|
thread_specific_data(private_data);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main(void)
|
||||||
|
{
|
||||||
|
unsigned int i, repeat;
|
||||||
|
BOOL ret;
|
||||||
|
|
||||||
|
xmlInitParser();
|
||||||
|
for (repeat = 0;repeat < TEST_REPEAT_COUNT;repeat++)
|
||||||
|
{
|
||||||
|
xmlLoadCatalog(catalog);
|
||||||
|
|
||||||
|
for (i = 0; i < num_threads; i++)
|
||||||
|
{
|
||||||
|
tid[i] = (HANDLE) -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < num_threads; i++)
|
||||||
|
{
|
||||||
|
DWORD useless;
|
||||||
|
tid[i] = CreateThread(NULL, 0,
|
||||||
|
win32_thread_specific_data, &threadParams[i], 0, &useless);
|
||||||
|
if (tid[i] == NULL)
|
||||||
|
{
|
||||||
|
perror("CreateThread");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (WaitForMultipleObjects (num_threads, tid, TRUE, INFINITE) == WAIT_FAILED)
|
||||||
|
perror ("WaitForMultipleObjects failed");
|
||||||
|
|
||||||
|
for (i = 0; i < num_threads; i++)
|
||||||
|
{
|
||||||
|
DWORD exitCode;
|
||||||
|
ret = GetExitCodeThread (tid[i], &exitCode);
|
||||||
|
if (ret == 0)
|
||||||
|
{
|
||||||
|
perror("GetExitCodeThread");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
CloseHandle (tid[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
xmlCatalogCleanup();
|
||||||
|
for (i = 0; i < num_threads; i++) {
|
||||||
|
if (threadParams[i].okay == 0)
|
||||||
|
printf("Thread %d handling %s failed\n", i,
|
||||||
|
threadParams[i].filename);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
xmlCleanupParser();
|
||||||
|
xmlMemoryDump();
|
||||||
|
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
#elif defined HAVE_BEOS_THREADS
|
#elif defined HAVE_BEOS_THREADS
|
||||||
int
|
int
|
||||||
main(void)
|
main(void)
|
||||||
{
|
{
|
||||||
unsigned int i, repeat;
|
unsigned int i, repeat;
|
||||||
unsigned int num_threads = sizeof(testfiles) / sizeof(testfiles[0]);
|
|
||||||
void *results[MAX_ARGC];
|
|
||||||
status_t ret;
|
status_t ret;
|
||||||
|
|
||||||
xmlInitParser();
|
xmlInitParser();
|
||||||
printf("Parser initialized\n");
|
printf("Parser initialized\n");
|
||||||
for (repeat = 0;repeat < 500;repeat++) {
|
for (repeat = 0;repeat < TEST_REPEAT_COUNT;repeat++) {
|
||||||
printf("repeat: %d\n",repeat);
|
printf("repeat: %d\n",repeat);
|
||||||
xmlLoadCatalog(catalog);
|
xmlLoadCatalog(catalog);
|
||||||
printf("loaded catalog: %s\n", catalog);
|
printf("loaded catalog: %s\n", catalog);
|
||||||
for (i = 0; i < num_threads; i++) {
|
for (i = 0; i < num_threads; i++) {
|
||||||
results[i] = NULL;
|
|
||||||
tid[i] = (thread_id) -1;
|
tid[i] = (thread_id) -1;
|
||||||
}
|
}
|
||||||
printf("cleaned threads\n");
|
printf("cleaned threads\n");
|
||||||
for (i = 0; i < num_threads; i++) {
|
for (i = 0; i < num_threads; i++) {
|
||||||
tid[i] = spawn_thread(thread_specific_data, "xmlTestThread", B_NORMAL_PRIORITY, (void *) testfiles[i]);
|
tid[i] = spawn_thread(thread_specific_data, "xmlTestThread", B_NORMAL_PRIORITY, (void *) &threadParams[i]);
|
||||||
if (tid[i] < B_OK) {
|
if (tid[i] < B_OK) {
|
||||||
perror("beos_thread_create");
|
perror("beos_thread_create");
|
||||||
exit(1);
|
exit(1);
|
||||||
@@ -166,7 +235,8 @@ main(void)
|
|||||||
printf("beos_thread_create %d -> %d\n", i, tid[i]);
|
printf("beos_thread_create %d -> %d\n", i, tid[i]);
|
||||||
}
|
}
|
||||||
for (i = 0; i < num_threads; i++) {
|
for (i = 0; i < num_threads; i++) {
|
||||||
ret = wait_for_thread(tid[i], &results[i]);
|
void *result;
|
||||||
|
ret = wait_for_thread(tid[i], &result);
|
||||||
printf("beos_thread_wait %d -> %d\n", i, ret);
|
printf("beos_thread_wait %d -> %d\n", i, ret);
|
||||||
if (ret != B_OK) {
|
if (ret != B_OK) {
|
||||||
perror("beos_thread_wait");
|
perror("beos_thread_wait");
|
||||||
@@ -177,8 +247,9 @@ main(void)
|
|||||||
xmlCatalogCleanup();
|
xmlCatalogCleanup();
|
||||||
ret = B_OK;
|
ret = B_OK;
|
||||||
for (i = 0; i < num_threads; i++)
|
for (i = 0; i < num_threads; i++)
|
||||||
if (results[i] != (void *) Okay) {
|
if (threadParams[i].okay == 0) {
|
||||||
printf("Thread %d handling %s failed\n", i, testfiles[i]);
|
printf("Thread %d handling %s failed\n", i,
|
||||||
|
threadParams[i].filename);
|
||||||
ret = B_ERROR;
|
ret = B_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,150 +0,0 @@
|
|||||||
#include "libxml.h"
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#if defined(LIBXML_THREAD_ENABLED) && defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#include <libxml/globals.h>
|
|
||||||
#include <libxml/threads.h>
|
|
||||||
#include <libxml/parser.h>
|
|
||||||
#include <libxml/catalog.h>
|
|
||||||
#include <windows.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
#define MAX_ARGC 20
|
|
||||||
#define TEST_REPEAT_COUNT 500
|
|
||||||
|
|
||||||
static HANDLE tid[MAX_ARGC];
|
|
||||||
|
|
||||||
static const char *catalog = "test/threads/complex.xml";
|
|
||||||
static char *testfiles[] = {
|
|
||||||
"test/threads/abc.xml",
|
|
||||||
"test/threads/acb.xml",
|
|
||||||
"test/threads/bac.xml",
|
|
||||||
"test/threads/bca.xml",
|
|
||||||
"test/threads/cab.xml",
|
|
||||||
"test/threads/cba.xml",
|
|
||||||
"test/threads/invalid.xml",
|
|
||||||
};
|
|
||||||
|
|
||||||
const char *Okay = "OK";
|
|
||||||
const char *Failed = "Failed";
|
|
||||||
|
|
||||||
#ifndef xmlDoValidityCheckingDefaultValue
|
|
||||||
#error xmlDoValidityCheckingDefaultValue is not a macro
|
|
||||||
#endif
|
|
||||||
#ifndef xmlGenericErrorContext
|
|
||||||
#error xmlGenericErrorContext is not a macro
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static DWORD WINAPI
|
|
||||||
thread_specific_data(void *private_data)
|
|
||||||
{
|
|
||||||
xmlDocPtr myDoc;
|
|
||||||
const char *filename = (const char *) private_data;
|
|
||||||
int okay = 1;
|
|
||||||
|
|
||||||
if (!strcmp(filename, "test/threads/invalid.xml")) {
|
|
||||||
xmlDoValidityCheckingDefaultValue = 0;
|
|
||||||
xmlGenericErrorContext = stdout;
|
|
||||||
} else {
|
|
||||||
xmlDoValidityCheckingDefaultValue = 1;
|
|
||||||
xmlGenericErrorContext = stderr;
|
|
||||||
}
|
|
||||||
myDoc = xmlParseFile(filename);
|
|
||||||
if (myDoc) {
|
|
||||||
xmlFreeDoc(myDoc);
|
|
||||||
} else {
|
|
||||||
printf("parse failed\n");
|
|
||||||
okay = 0;
|
|
||||||
}
|
|
||||||
if (!strcmp(filename, "test/threads/invalid.xml")) {
|
|
||||||
if (xmlDoValidityCheckingDefaultValue != 0) {
|
|
||||||
printf("ValidityCheckingDefaultValue override failed\n");
|
|
||||||
okay = 0;
|
|
||||||
}
|
|
||||||
if (xmlGenericErrorContext != stdout) {
|
|
||||||
printf("xmlGenericErrorContext override failed\n");
|
|
||||||
okay = 0;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (xmlDoValidityCheckingDefaultValue != 1) {
|
|
||||||
printf("ValidityCheckingDefaultValue override failed\n");
|
|
||||||
okay = 0;
|
|
||||||
}
|
|
||||||
if (xmlGenericErrorContext != stderr) {
|
|
||||||
printf("xmlGenericErrorContext override failed\n");
|
|
||||||
okay = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (okay == 0)
|
|
||||||
return ((DWORD) Failed);
|
|
||||||
return ((DWORD) Okay);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
main()
|
|
||||||
{
|
|
||||||
unsigned int i, repeat;
|
|
||||||
unsigned int num_threads = sizeof(testfiles) / sizeof(testfiles[0]);
|
|
||||||
DWORD results[MAX_ARGC];
|
|
||||||
BOOL ret;
|
|
||||||
|
|
||||||
xmlInitParser();
|
|
||||||
for (repeat = 0;repeat < TEST_REPEAT_COUNT;repeat++)
|
|
||||||
{
|
|
||||||
xmlLoadCatalog(catalog);
|
|
||||||
|
|
||||||
for (i = 0; i < num_threads; i++)
|
|
||||||
{
|
|
||||||
results[i] = 0;
|
|
||||||
tid[i] = (HANDLE) -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < num_threads; i++)
|
|
||||||
{
|
|
||||||
DWORD useless;
|
|
||||||
tid[i] = CreateThread(NULL, 0,
|
|
||||||
thread_specific_data, testfiles[i], 0, &useless);
|
|
||||||
if (tid[i] == NULL)
|
|
||||||
{
|
|
||||||
perror("CreateThread");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (WaitForMultipleObjects (num_threads, tid, TRUE, INFINITE) == WAIT_FAILED)
|
|
||||||
perror ("WaitForMultipleObjects failed");
|
|
||||||
|
|
||||||
for (i = 0; i < num_threads; i++)
|
|
||||||
{
|
|
||||||
ret = GetExitCodeThread (tid[i], &results[i]);
|
|
||||||
if (ret == 0)
|
|
||||||
{
|
|
||||||
perror("GetExitCodeThread");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
CloseHandle (tid[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
xmlCatalogCleanup();
|
|
||||||
for (i = 0; i < num_threads; i++) {
|
|
||||||
if (results[i] != (DWORD) Okay)
|
|
||||||
printf("Thread %d handling %s failed\n", i, testfiles[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
xmlCleanupParser();
|
|
||||||
xmlMemoryDump();
|
|
||||||
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
#else /* !LIBXML_THREADS_ENABLED */
|
|
||||||
int
|
|
||||||
main()
|
|
||||||
{
|
|
||||||
fprintf(stderr, "libxml was not compiled with thread or catalog support\n");
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
@@ -225,9 +225,7 @@ UTILS = $(BINDIR)\xmllint.exe\
|
|||||||
$(BINDIR)\testlimits.exe
|
$(BINDIR)\testlimits.exe
|
||||||
|
|
||||||
|
|
||||||
!if "$(WITH_THREADS)" == "yes" || "$(WITH_THREADS)" == "ctls" || "$(WITH_THREADS)" == "native"
|
!if "$(WITH_THREADS)" != "no"
|
||||||
UTILS = $(UTILS) $(BINDIR)\testThreadsWin32.exe
|
|
||||||
!else if "$(WITH_THREADS)" == "posix"
|
|
||||||
UTILS = $(UTILS) $(BINDIR)\testThreads.exe
|
UTILS = $(UTILS) $(BINDIR)\testThreads.exe
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
|
|||||||
@@ -220,16 +220,7 @@ UTILS = $(BINDIR)/xmllint.exe\
|
|||||||
$(BINDIR)/testapi.exe\
|
$(BINDIR)/testapi.exe\
|
||||||
$(BINDIR)/testlimits.exe
|
$(BINDIR)/testlimits.exe
|
||||||
|
|
||||||
ifeq ($(WITH_THREADS),yes)
|
ifneq ($(WITH_THREADS),no)
|
||||||
UTILS += $(BINDIR)/testThreadsWin32.exe
|
|
||||||
endif
|
|
||||||
ifeq ($(WITH_THREADS),ctls)
|
|
||||||
UTILS += $(BINDIR)/testThreadsWin32.exe
|
|
||||||
endif
|
|
||||||
ifeq ($(WITH_THREADS),native)
|
|
||||||
UTILS += $(BINDIR)/testThreadsWin32.exe
|
|
||||||
endif
|
|
||||||
ifeq ($(WITH_THREADS),posix)
|
|
||||||
UTILS += $(BINDIR)/testThreads.exe
|
UTILS += $(BINDIR)/testThreads.exe
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -274,9 +274,7 @@ UTILS = $(BINDIR)\xmllint.exe\
|
|||||||
$(BINDIR)\testlimits.exe\
|
$(BINDIR)\testlimits.exe\
|
||||||
$(BINDIR)\testrecurse.exe
|
$(BINDIR)\testrecurse.exe
|
||||||
|
|
||||||
!if "$(WITH_THREADS)" == "yes" || "$(WITH_THREADS)" == "ctls" || "$(WITH_THREADS)" == "native"
|
!if "$(WITH_THREADS)" != "no"
|
||||||
UTILS = $(UTILS) $(BINDIR)\testThreadsWin32.exe
|
|
||||||
!else if "$(WITH_THREADS)" == "posix"
|
|
||||||
UTILS = $(UTILS) $(BINDIR)\testThreads.exe
|
UTILS = $(UTILS) $(BINDIR)\testThreads.exe
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user