Commit ab7488ef authored by Daniel Veillard's avatar Daniel Veillard
Browse files

fixed some bugs in CFLAGS passing. added a specific threaded test case

* configure.in: fixed some bugs in CFLAGS passing.
* test/threads Makefile.am testThreads.c: added a specific
  threaded test case (really nasty, guaranteed).
Daniel
parent 85c11fa2
Wed Oct 17 13:29:02 CEST 2001 Daniel Veillard <daniel@veillard.com>
* configure.in: fixed some bugs in CFLAGS passing.
* test/threads Makefile.am testThreads.c: added a specific
threaded test case (really nasty, guaranteed).
Tue Oct 16 23:01:49 CEST 2001 Daniel Veillard <daniel@veillard.com>
* catalog.c: serious cleanup on the management of the
......
......@@ -7,7 +7,7 @@ SUBDIRS = include . doc example
INCLUDES = -I@srcdir@/include -I$(top_builddir)/include @THREAD_CFLAGS@ @Z_CFLAGS@
noinst_PROGRAMS=testSAX testHTML testXPath testURI testDocbook
noinst_PROGRAMS=testSAX testHTML testXPath testURI testDocbook testThreads
bin_PROGRAMS = xmllint xmlcatalog
......@@ -72,6 +72,11 @@ testXPath_LDFLAGS =
testXPath_DEPENDENCIES = $(DEPS)
testXPath_LDADD= $(LDADDS)
testThreads_SOURCES=testThreads.c
testThreads_LDFLAGS =
testThreads_DEPENDENCIES = $(DEPS)
testThreads_LDADD= $(LDADDS)
testURI_SOURCES=testURI.c
testURI_LDFLAGS =
testURI_DEPENDENCIES = $(DEPS)
......@@ -81,7 +86,7 @@ check-local: tests
testall : tests SVGtests SAXtests
tests: XMLtests XMLenttests HTMLtests Validtests URItests XPathtests XPtrtests XIncludetests Scripttests Catatests
tests: XMLtests XMLenttests HTMLtests Validtests URItests XPathtests XPtrtests XIncludetests Scripttests Catatests @TEST_THREADS@
HTMLtests : testHTML
@(echo > .memdump)
......@@ -417,6 +422,12 @@ SVGtests : xmllint
rm result.$$name result2.$$name ; \
fi ; fi ; done)
Threadtests : testThreads
@echo "##"
@echo "## Threaded regression tests"
@echo "##"
testThreads
SAXtests : testSAX
@(echo > .memdump)
@echo "##"
......
......@@ -249,6 +249,7 @@ dnl
THREAD_LIBS=""
WITH_THREADS=0
THREAD_CFLAGS=""
TEST_THREADS=""
AC_ARG_WITH(threads, [ --with-threads Add multithread support(off)])
if test "$with_threads" = "yes" ; then
......@@ -259,20 +260,22 @@ if test "$with_threads" = "yes" ; then
THREAD_LIBS="-lpthread"
AC_DEFINE(HAVE_LIBPTHREAD)
AC_DEFINE(HAVE_PTHREAD_H)
WITH_THREADS=1]))
WITH_THREADS="1"]))
if test "$WITH_THREADS" = "1" ; then
THREAD_CFLAGS="$XML_CFLAGS -D_REENTRANT"
THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT"
TEST_THREADS="Threadtests"
fi
fi
AC_ARG_WITH(thread-alloc, [ --with-thread-alloc Add per-thread memory(off)])
if test "$with_threads" = "yes" -a "$WITH_THREADS" = "1" ; then
THREAD_CFLAGS="$XML_CFLAGS -DLIBXML_THREAD_ALLOC_ENABLED"
if test "$with_threads_alloc" = "yes" -a "$WITH_THREADS" = "1" ; then
THREAD_CFLAGS="$THREAD_CFLAGS -DLIBXML_THREAD_ALLOC_ENABLED"
fi
AC_SUBST(THREAD_LIBS)
AC_SUBST(WITH_THREADS)
AC_SUBST(THREAD_CFLAGS)
AC_SUBST(TEST_THREADS)
AC_ARG_WITH(history, [ --with-history Add history support to xmllint shell(off)])
if test "$with_history" = "yes" ; then
......
<?xml version="1.0"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<rewriteSystem systemIdStartString="http://example.org/a" rewritePrefix="a"/>
<nextCatalog catalog="c.example.org.xml"/>
</catalog>
<!ELEMENT a EMPTY>
<!ENTITY % a SYSTEM "http://example.org/a/a.dtd">
%a;
<!ENTITY % b SYSTEM "http://example.org/b/b.dtd">
%b;
<!ENTITY % c SYSTEM "http://example.org/c/c.dtd">
%c;
<!ELEMENT abc (a, b, c)>
<!DOCTYPE abc SYSTEM "http://example.org/abc.dtd">
<abc>
<a/>
<b/>
<c/>
</abc>
<!ENTITY % a SYSTEM "http://example.org/a/a.dtd">
%a;
<!ENTITY % c SYSTEM "http://example.org/c/c.dtd">
%c;
<!ENTITY % b SYSTEM "http://example.org/b/b.dtd">
%b;
<!ELEMENT acb (a, c, b)>
<!DOCTYPE acb SYSTEM "http://example.org/acb.dtd">
<acb>
<a/>
<c/>
<b/>
</acb>
<?xml version="1.0"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<rewriteSystem systemIdStartString="http://example.org/b" rewritePrefix="b"/>
<nextCatalog catalog="c.example.org.xml"/>
</catalog>
<!ELEMENT b EMPTY>
<!ENTITY % b SYSTEM "http://example.org/b/b.dtd">
%b;
<!ENTITY % a SYSTEM "http://example.org/a/a.dtd">
%a;
<!ENTITY % c SYSTEM "http://example.org/c/c.dtd">
%c;
<!ELEMENT bac (b, a, c)>
<!DOCTYPE bac SYSTEM "http://example.org/bac.dtd">
<bac>
<b/>
<a/>
<c/>
</bac>
<!ENTITY % b SYSTEM "http://example.org/b/b.dtd">
%b;
<!ENTITY % c SYSTEM "http://example.org/c/c.dtd">
%c;
<!ENTITY % a SYSTEM "http://example.org/a/a.dtd">
%a;
<!ELEMENT bca (b, c, a)>
<!DOCTYPE bca SYSTEM "http://example.org/bca.dtd">
<bca>
<b/>
<c/>
<a/>
</bca>
<?xml version="1.0"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<rewriteSystem systemIdStartString="http://example.org/c" rewritePrefix="c"/>
<rewriteSystem systemIdStartString="http://example.org/" rewritePrefix="./"/>
</catalog>
<!ELEMENT c EMPTY>
<!ENTITY % c SYSTEM "http://example.org/c/c.dtd">
%c;
<!ENTITY % a SYSTEM "http://example.org/a/a.dtd">
%a;
<!ENTITY % b SYSTEM "http://example.org/b/b.dtd">
%b;
<!ELEMENT cab (c, a, b)>
<!DOCTYPE cab SYSTEM "http://example.org/cab.dtd">
<cab>
<c/>
<a/>
<b/>
</cab>
<!ENTITY % c SYSTEM "http://example.org/c/c.dtd">
%c;
<!ENTITY % b SYSTEM "http://example.org/b/b.dtd">
%b;
<!ENTITY % a SYSTEM "http://example.org/a/a.dtd">
%a;
<!ELEMENT cba (c, b, a)>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment