Commit caabee58 authored by Aron Xu's avatar Aron Xu

Imported Upstream version 2.9.4+dfsg1

parent a0bebe68
......@@ -593,7 +593,7 @@ Thu Apr 24 13:56:53 CEST 2008 Daniel Veillard <daniel@veillard.com>
Tue Apr 22 10:27:17 CEST 2008 Daniel Veillard <daniel@veillard.com>
* dict.c: improvement on the hashing of the dictionnary, with visible
* dict.c: improvement on the hashing of the dictionary, with visible
speed up as the number of strings in the hash increases, work from
Stefan Behnel
......@@ -5017,7 +5017,7 @@ Mon Jan 24 00:47:41 CET 2005 Daniel Veillard <daniel@veillard.com>
Sun Jan 23 23:54:39 CET 2005 Daniel Veillard <daniel@veillard.com>
* hash.c include/libxml/hash.h: added xmlHashCreateDict where
the hash reuses the dictionnary for internal strings
the hash reuses the dictionary for internal strings
* entities.c valid.c parser.c: reuse that new API, leads to a decent
speedup when parsing for example DocBook documents.
......@@ -5371,7 +5371,7 @@ Fri Nov 26 11:44:36 CET 2004 Daniel Veillard <daniel@veillard.com>
Wed Nov 24 13:41:52 CET 2004 Daniel Veillard <daniel@veillard.com>
* dict.c include/libxml/dict.h: added xmlDictExists() to the
dictionnary interface.
dictionary interface.
* xmlreader.c: applying xmlTextReaderHasAttributes fix for namespaces
from Rob Richards
......@@ -5697,7 +5697,7 @@ Tue Oct 26 23:57:02 CEST 2004 Daniel Veillard <daniel@veillard.com>
Tue Oct 26 18:09:59 CEST 2004 Daniel Veillard <daniel@veillard.com>
* debugXML.c include/libxml/xmlerror.h: added checking for names
values and dictionnaries generates a tons of errors
values and dictionaries generates a tons of errors
* SAX2.ccatalog.c parser.c relaxng.c tree.c xinclude.c xmlwriter.c
include/libxml/tree.h: fixing the errors in the regression tests
......@@ -7746,14 +7746,14 @@ Fri Jan 23 14:03:21 CET 2004 Daniel Veillard <daniel@veillard.com>
make tests
* xpath.c include/libxml/xpath.h: added xmlXPathCtxtCompile() to
compile an XPath expression within a context, currently the goal
is to be able to reuse the XSLT stylesheet dictionnary, but this
is to be able to reuse the XSLT stylesheet dictionary, but this
opens the door to others possible optimizations.
* dict.c include/libxml/dict.h: added xmlDictCreateSub() which allows
to build a new dictionnary based on another read-only dictionnary.
This is needed for XSLT to keep the stylesheet dictionnary read-only
to build a new dictionary based on another read-only dictionary.
This is needed for XSLT to keep the stylesheet dictionary read-only
while being able to reuse the strings for the transformation
dictionnary.
* xinclude.c: fixed a dictionnar reference counting problem occuring
dictionary.
* xinclude.c: fixed a dictionary reference counting problem occuring
when document parsing failed.
* testSAX.c: adding option --repeat for timing 100times the parsing
* doc/* : rebuilt all the docs
......@@ -7806,7 +7806,7 @@ Mon Jan 12 17:22:57 CET 2004 Daniel Veillard <daniel@veillard.com>
Thu Jan 8 17:57:50 CET 2004 Daniel Veillard <daniel@veillard.com>
* xmlschemas.c: removed a memory leak remaining from the switch
to a dictionnary for string allocations c.f. #130891
to a dictionary for string allocations c.f. #130891
Thu Jan 8 17:48:46 CET 2004 Daniel Veillard <daniel@veillard.com>
......@@ -7928,7 +7928,7 @@ Fri Jan 2 22:58:29 HKT 2004 William Brack <wbrack@mmm.com.hk>
Fri Jan 2 11:40:06 CET 2004 Daniel Veillard <daniel@veillard.com>
* SAX2.c: found and fixed a bug misallocating some non
blank text node strings from the dictionnary.
blank text node strings from the dictionary.
* xmlmemory.c: fixed a problem with the memory debug mutex
release.
......@@ -9386,7 +9386,7 @@ Sat Sep 27 01:25:39 CEST 2003 Daniel Veillard <daniel@veillard.com>
* parser.c: William's change allowed to spot a nasty bug in xmlDoRead
if the result is not well formed that ctxt->myDoc is not NULL
and uses the context dictionnary.
and uses the context dictionary.
Fri Sep 26 21:09:34 CEST 2003 Daniel Veillard <daniel@veillard.com>
......
......@@ -105,7 +105,7 @@ htmlErrMemory(xmlParserCtxtPtr ctxt, const char *extra)
*
* Handle a fatal parser error, i.e. violating Well-Formedness constraints
*/
static void
static void LIBXML_ATTR_FORMAT(3,0)
htmlParseErr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
const char *msg, const xmlChar *str1, const xmlChar *str2)
{
......@@ -132,7 +132,7 @@ htmlParseErr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
*
* Handle a fatal parser error, i.e. violating Well-Formedness constraints
*/
static void
static void LIBXML_ATTR_FORMAT(3,0)
htmlParseErrInt(xmlParserCtxtPtr ctxt, xmlParserErrors error,
const char *msg, int val)
{
......@@ -303,6 +303,7 @@ htmlNodeInfoPop(htmlParserCtxtPtr ctxt)
#define UPP(val) (toupper(ctxt->input->cur[(val)]))
#define CUR_PTR ctxt->input->cur
#define BASE_PTR ctxt->input->base
#define SHRINK if ((ctxt->input->cur - ctxt->input->base > 2 * INPUT_CHUNK) && \
(ctxt->input->end - ctxt->input->cur < 2 * INPUT_CHUNK)) \
......@@ -2471,6 +2472,10 @@ htmlParseName(htmlParserCtxtPtr ctxt) {
(*in == '_') || (*in == '-') ||
(*in == ':') || (*in == '.'))
in++;
if (in == ctxt->input->end)
return(NULL);
if ((*in > 0) && (*in < 0x80)) {
count = in - ctxt->input->cur;
ret = xmlDictLookup(ctxt->dict, ctxt->input->cur, count);
......@@ -2488,6 +2493,7 @@ htmlParseNameComplex(xmlParserCtxtPtr ctxt) {
int len = 0, l;
int c;
int count = 0;
const xmlChar *base = ctxt->input->base;
/*
* Handler for more complex cases
......@@ -2513,7 +2519,18 @@ htmlParseNameComplex(xmlParserCtxtPtr ctxt) {
len += l;
NEXTL(l);
c = CUR_CHAR(l);
if (ctxt->input->base != base) {
/*
* We changed encoding from an unknown encoding
* Input buffer changed location, so we better start again
*/
return(htmlParseNameComplex(ctxt));
}
}
if (ctxt->input->base > ctxt->input->cur - len)
return(NULL);
return(xmlDictLookup(ctxt->dict, ctxt->input->cur - len, len));
}
......@@ -2765,31 +2782,43 @@ htmlParseAttValue(htmlParserCtxtPtr ctxt) {
static xmlChar *
htmlParseSystemLiteral(htmlParserCtxtPtr ctxt) {
const xmlChar *q;
size_t len = 0, startPosition = 0;
xmlChar *ret = NULL;
if (CUR == '"') {
NEXT;
q = CUR_PTR;
while ((IS_CHAR_CH(CUR)) && (CUR != '"'))
if (CUR_PTR < BASE_PTR)
return(ret);
startPosition = CUR_PTR - BASE_PTR;
while ((IS_CHAR_CH(CUR)) && (CUR != '"')) {
NEXT;
len++;
}
if (!IS_CHAR_CH(CUR)) {
htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED,
"Unfinished SystemLiteral\n", NULL, NULL);
} else {
ret = xmlStrndup(q, CUR_PTR - q);
ret = xmlStrndup((BASE_PTR+startPosition), len);
NEXT;
}
} else if (CUR == '\'') {
NEXT;
q = CUR_PTR;
while ((IS_CHAR_CH(CUR)) && (CUR != '\''))
if (CUR_PTR < BASE_PTR)
return(ret);
startPosition = CUR_PTR - BASE_PTR;
while ((IS_CHAR_CH(CUR)) && (CUR != '\'')) {
NEXT;
len++;
}
if (!IS_CHAR_CH(CUR)) {
htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED,
"Unfinished SystemLiteral\n", NULL, NULL);
} else {
ret = xmlStrndup(q, CUR_PTR - q);
ret = xmlStrndup((BASE_PTR+startPosition), len);
NEXT;
}
} else {
......@@ -2813,32 +2842,47 @@ htmlParseSystemLiteral(htmlParserCtxtPtr ctxt) {
static xmlChar *
htmlParsePubidLiteral(htmlParserCtxtPtr ctxt) {
const xmlChar *q;
size_t len = 0, startPosition = 0;
xmlChar *ret = NULL;
/*
* Name ::= (Letter | '_') (NameChar)*
*/
if (CUR == '"') {
NEXT;
q = CUR_PTR;
while (IS_PUBIDCHAR_CH(CUR)) NEXT;
if (CUR_PTR < BASE_PTR)
return(ret);
startPosition = CUR_PTR - BASE_PTR;
while (IS_PUBIDCHAR_CH(CUR)) {
len++;
NEXT;
}
if (CUR != '"') {
htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED,
"Unfinished PubidLiteral\n", NULL, NULL);
} else {
ret = xmlStrndup(q, CUR_PTR - q);
ret = xmlStrndup((BASE_PTR + startPosition), len);
NEXT;
}
} else if (CUR == '\'') {
NEXT;
q = CUR_PTR;
while ((IS_PUBIDCHAR_CH(CUR)) && (CUR != '\''))
NEXT;
if (CUR_PTR < BASE_PTR)
return(ret);
startPosition = CUR_PTR - BASE_PTR;
while ((IS_PUBIDCHAR_CH(CUR)) && (CUR != '\'')){
len++;
NEXT;
}
if (CUR != '\'') {
htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED,
"Unfinished PubidLiteral\n", NULL, NULL);
} else {
ret = xmlStrndup(q, CUR_PTR - q);
ret = xmlStrndup((BASE_PTR + startPosition), len);
NEXT;
}
} else {
......@@ -6537,7 +6581,7 @@ htmlNodeStatus(const htmlNodePtr node, int legacy) {
* DICT_FREE:
* @str: a string
*
* Free a string if it is not owned by the "dict" dictionnary in the
* Free a string if it is not owned by the "dict" dictionary in the
* current scope
*/
#define DICT_FREE(str) \
......
......@@ -216,6 +216,10 @@ check-valgrind valgrind: all
@echo '## Go get a cup of coffee it is gonna take a while ...'
$(MAKE) CHECKER='valgrind -q' runtests
asan:
@echo '## rebuilding for ASAN'
./configure CFLAGS="-fsanitize=address,undefined -Wformat -Werror=format-security -Werror=array-bounds -g" CXXFLAGS="-fsanitize=address,undefined -Wformat -Werror=format-security -Werror=array-bounds -g" LDFLAGS="-fsanitize=address,undefined" CC="clang" CXX="clang++" --disable-shared ; OptimOff ; $(MAKE) clean ; $(MAKE)
testall : tests SVGtests SAXtests
tests: XMLtests XMLenttests NStests IDtests Errtests APItests $(READER_TEST) $(TEST_SAX) $(TEST_PUSH) $(TEST_HTML) $(TEST_PHTML) $(TEST_VALID) URItests $(TEST_PATTERN) $(TEST_XPATH) $(TEST_XPTR) $(TEST_XINCLUDE) $(TEST_C14N) $(TEST_DEBUG) $(TEST_CATALOG) $(TEST_REGEXPS) $(TEST_SCHEMAS) $(TEST_SCHEMATRON) $(TEST_THREADS) Timingtests $(TEST_VTIME) $(PYTHON_TESTS) $(TEST_MODULES)
......@@ -1207,7 +1211,7 @@ EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \
check-xsddata-test-suite.py check-xinclude-test-suite.py \
example/Makefile.am example/gjobread.c example/gjobs.xml \
$(man_MANS) libxml-2.0.pc.in libxml-2.0-uninstalled.pc.in \
libxml2-config.cmake.in \
libxml2-config.cmake.in autogen.sh \
trionan.c trionan.h triostr.c triostr.h trio.c trio.h \
triop.h triodef.h libxml.h elfgcchack.h xzlib.h buf.h \
enc.h save.h testThreadsWin32.c genUnicode.py TODO_SCHEMAS \
......
......@@ -497,6 +497,7 @@ HTML_DIR = @HTML_DIR@
HTML_OBJ = @HTML_OBJ@
HTTP_OBJ = @HTTP_OBJ@
ICONV_LIBS = @ICONV_LIBS@
ICU_CFLAGS = @ICU_CFLAGS@
ICU_LIBS = @ICU_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
......@@ -521,6 +522,7 @@ LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
LZMA_CFLAGS = @LZMA_CFLAGS@
LZMA_LIBS = @LZMA_LIBS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
......@@ -827,7 +829,7 @@ EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \
check-xsddata-test-suite.py check-xinclude-test-suite.py \
example/Makefile.am example/gjobread.c example/gjobs.xml \
$(man_MANS) libxml-2.0.pc.in libxml-2.0-uninstalled.pc.in \
libxml2-config.cmake.in \
libxml2-config.cmake.in autogen.sh \
trionan.c trionan.h triostr.c triostr.h trio.c trio.h \
triop.h triodef.h libxml.h elfgcchack.h xzlib.h buf.h \
enc.h save.h testThreadsWin32.c genUnicode.py TODO_SCHEMAS \
......@@ -860,7 +862,7 @@ all: $(BUILT_SOURCES) config.h
.SUFFIXES: .c .lo .o .obj
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
......@@ -886,9 +888,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
......@@ -899,7 +901,7 @@ config.h: stamp-h1
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: $(am__configure_deps)
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f stamp-h1
touch $@
......@@ -1916,6 +1918,10 @@ check-valgrind valgrind: all
@echo '## Go get a cup of coffee it is gonna take a while ...'
$(MAKE) CHECKER='valgrind -q' runtests
asan:
@echo '## rebuilding for ASAN'
./configure CFLAGS="-fsanitize=address,undefined -Wformat -Werror=format-security -Werror=array-bounds -g" CXXFLAGS="-fsanitize=address,undefined -Wformat -Werror=format-security -Werror=array-bounds -g" LDFLAGS="-fsanitize=address,undefined" CC="clang" CXX="clang++" --disable-shared ; OptimOff ; $(MAKE) clean ; $(MAKE)
testall : tests SVGtests SAXtests
tests: XMLtests XMLenttests NStests IDtests Errtests APItests $(READER_TEST) $(TEST_SAX) $(TEST_PUSH) $(TEST_HTML) $(TEST_PHTML) $(TEST_VALID) URItests $(TEST_PATTERN) $(TEST_XPATH) $(TEST_XPTR) $(TEST_XINCLUDE) $(TEST_C14N) $(TEST_DEBUG) $(TEST_CATALOG) $(TEST_REGEXPS) $(TEST_SCHEMAS) $(TEST_SCHEMATRON) $(TEST_THREADS) Timingtests $(TEST_VTIME) $(PYTHON_TESTS) $(TEST_MODULES)
......
......@@ -845,7 +845,7 @@ Gansterer),
- Improvement: switch parser to XML-1.0 5th edition, add parsing flags
for old versions, switch URI parsing to RFC 3986,
add xmlSchemaValidCtxtGetParserCtxt (Holger Kaelberer),
new hashing functions for dictionnaries (based on Stefan Behnel work),
new hashing functions for dictionaries (based on Stefan Behnel work),
improve handling of misplaced html/head/body in HTML parser, better
regression test tools and code coverage display, better algorithms
to detect various versions of the billion laughts attacks, make
......@@ -1231,7 +1231,7 @@ Do not use or package 2.6.25
Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed),
some gcc4 fixes, HP-UX portability fixes (Rick Jones).
- bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and
xmlreader stopping on non-fatal errors, thread support for dictionnaries
xmlreader stopping on non-fatal errors, thread support for dictionaries
reference counting (Gary Coady), internal subset and push problem, URL
saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python paths
fixup (Stephane Bidoul), xmlGetNodePath and namespaces, xmlSetNsProp fix
......@@ -1244,7 +1244,7 @@ Do not use or package 2.6.25
Hendricks), aliasing bug exposed by gcc4 on s390, xmlTextReaderNext bug
(Rob Richards), Schemas decimal type fixes (William Brack),
xmlByteConsumed static buffer (Ben Maurer).
- improvement: speedup parsing comments and DTDs, dictionnary support for
- improvement: speedup parsing comments and DTDs, dictionary support for
hash tables, Schemas Identity constraints (Kasimier), streaming XPath
subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical
values handling (Kasimier), add xmlTextReaderByteConsumed (Aron
......@@ -1454,7 +1454,7 @@ Do not use or package 2.6.25
URI on SYSTEM lookup failure, XInclude parse flags inheritance (William),
XInclude and XPointer fixes for entities (William), XML parser bug
reported by Holger Rauch, nanohttp fd leak (William), regexps char
groups '-' handling (William), dictionnary reference counting problems,
groups '-' handling (William), dictionary reference counting problems,
do not close stderr.
- performance patches from Petr Pajas
- Documentation fixes: XML_CATALOG_FILES in man pages (Mike Hommey)
......@@ -1482,7 +1482,7 @@ Do not use or package 2.6.25
William) reported by Yuuichi Teranishi
- bugfixes: make test and path issues, xmlWriter attribute serialization
(William Brack), xmlWriter indentation (William), schemas validation
(Eric Haszlakiewicz), XInclude dictionnaries issues (William and Oleg
(Eric Haszlakiewicz), XInclude dictionaries issues (William and Oleg
Paraschenko), XInclude empty fallback (William), HTML warnings (William),
XPointer in XInclude (William), Python namespace serialization,
isolat1ToUTF8 bound error (Alfred Mickautsch), output of parameter
......@@ -1503,7 +1503,7 @@ Do not use or package 2.6.25
2.6.5: Jan 25 2004:
- Bugfixes: dictionnaries for schemas (William Brack), regexp segfault
- Bugfixes: dictionaries for schemas (William Brack), regexp segfault
(William), xs:all problem (William), a number of XPointer bugfixes
(William), xmllint error go to stderr, DTD validation problem with
namespace, memory leak (William), SAX1 cleanup and minimal options fixes
......@@ -1515,14 +1515,14 @@ Do not use or package 2.6.25
Fleck), doc (Sven Zimmerman), I/O example.
- Python bindings: fixes (William), enum support (Stéphane Bidoul),
structured error reporting (Stéphane Bidoul)
- XInclude: various fixes for conformance, problem related to dictionnary
- XInclude: various fixes for conformance, problem related to dictionary
references (William & me), recursion (William)
- xmlWriter: indentation (Lucas Brasilino), memory leaks (Alfred
Mickautsch),
- xmlSchemas: normalizedString datatype (John Belmonte)
- code cleanup for strings functions (William)
- Windows: compiler patches (Mark Vakoc)
- Parser optimizations, a few new XPath and dictionnary APIs for future
- Parser optimizations, a few new XPath and dictionary APIs for future
XSLT optimizations.
......@@ -1617,8 +1617,8 @@ Do not use or package 2.6.25
of change
- Increased the library modularity, far more options can be stripped out,
a --with-minimum configuration will weight around 160KBytes
- Use per parser and per document dictionnary, allocate names and small
text nodes from the dictionnary
- Use per parser and per document dictionary, allocate names and small
text nodes from the dictionary
- Switch to a SAX2 like parser rewrote most of the XML parser core,
provides namespace resolution and defaulted attributes, minimize memory
allocations and copies, namespace checking and specific error handling,
......@@ -1665,7 +1665,7 @@ Do not use or package 2.6.25
(William), xmlCleanupParser (Marc Liyanage), CDATA output (William), HTTP
error handling.
- xmllint options: --dtdvalidfpi for Tobias Reif, --sax1 for compat
testing, --nodict for building without tree dictionnary, --nocdata to
testing, --nodict for building without tree dictionary, --nocdata to
replace CDATA by text, --nsclean to remove surperfluous namespace
declarations
- added xml2-config --libtool-libs option from Kevin P. Fleming
......
......@@ -55,7 +55,7 @@
* @ctxt: an XML validation parser context
* @msg: a string to accompany the error message
*/
static void
static void LIBXML_ATTR_FORMAT(2,0)
xmlSAX2ErrMemory(xmlParserCtxtPtr ctxt, const char *msg) {
xmlStructuredErrorFunc schannel = NULL;
const char *str1 = "out of memory\n";
......@@ -93,7 +93,7 @@ xmlSAX2ErrMemory(xmlParserCtxtPtr ctxt, const char *msg) {
*
* Handle a validation error
*/
static void
static void LIBXML_ATTR_FORMAT(3,0)
xmlErrValid(xmlParserCtxtPtr ctxt, xmlParserErrors error,
const char *msg, const char *str1, const char *str2)
{
......@@ -133,7 +133,7 @@ xmlErrValid(xmlParserCtxtPtr ctxt, xmlParserErrors error,
*
* Handle a fatal parser error, i.e. violating Well-Formedness constraints
*/
static void
static void LIBXML_ATTR_FORMAT(3,0)
xmlFatalErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
const char *msg, const xmlChar *str1, const xmlChar *str2)
{
......@@ -164,7 +164,7 @@ xmlFatalErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
*
* Handle a parser warning
*/
static void
static void LIBXML_ATTR_FORMAT(3,0)
xmlWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
const char *msg, const xmlChar *str1)
{
......@@ -189,7 +189,7 @@ xmlWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
*
* Handle a namespace error
*/
static void
static void LIBXML_ATTR_FORMAT(3,0)
xmlNsErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
const char *msg, const xmlChar *str1, const xmlChar *str2)
{
......@@ -213,7 +213,7 @@ xmlNsErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
*
* Handle a namespace warning
*/
static void
static void LIBXML_ATTR_FORMAT(3,0)
xmlNsWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
const char *msg, const xmlChar *str1, const xmlChar *str2)
{
......
......@@ -860,6 +860,42 @@ fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_MAINTAINER_MODE([DEFAULT-MODE])
# ----------------------------------
# Control maintainer-specific portions of Makefiles.
# Default is to disable them, unless 'enable' is passed literally.
# For symmetry, 'disable' may be passed as well. Anyway, the user
# can override the default with the --enable/--disable switch.
AC_DEFUN([AM_MAINTAINER_MODE],
[m4_case(m4_default([$1], [disable]),
[enable], [m4_define([am_maintainer_other], [disable])],
[disable], [m4_define([am_maintainer_other], [enable])],
[m4_define([am_maintainer_other], [enable])
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
AC_ARG_ENABLE([maintainer-mode],
[AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
am_maintainer_other[ make rules and dependencies not useful
(and sometimes confusing) to the casual installer])],
[USE_MAINTAINER_MODE=$enableval],
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
MAINT=$MAINTAINER_MODE_TRUE
AC_SUBST([MAINT])dnl
]
)
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001-2014 Free Software Foundation, Inc.
......
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
THEDIR=`pwd`
cd $srcdir
DIE=0
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile libxml."
echo "Download the appropriate package for your distribution,"
echo "or see http://www.gnu.org/software/autoconf"
DIE=1
}
(libtoolize --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have libtool installed to compile libxml."
echo "Download the appropriate package for your distribution,"
echo "or see http://www.gnu.org/software/libtool"
DIE=1
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
DIE=1
echo "You must have automake installed to compile libxml."
echo "Download the appropriate package for your distribution,"
echo "or see http://www.gnu.org/software/automake"
}
if test "$DIE" -eq 1; then
exit 1
fi
test -f entities.c || {
echo "You must run this script in the top-level libxml directory"
exit 1
}
EXTRA_ARGS=
if test "x$1" = "x--system"; then
shift
prefix=/usr
libdir=$prefix/lib
sysconfdir=/etc
localstatedir=/var
if [ -d /usr/lib64 ]; then
libdir=$prefix/lib64
fi
EXTRA_ARGS="--prefix=$prefix --sysconfdir=$sysconfdir --localstatedir=$localstatedir --libdir=$libdir"
echo "Running ./configure with $EXTRA_ARGS $@"
else
if test -z "$NOCONFIGURE" && test -z "$*"; then
echo "I am going to run ./configure with no arguments - if you wish "
echo "to pass any to it, please specify them on the $0 command line."
fi
fi
if [ ! -d $srcdir/m4 ]; then
mkdir $srcdir/m4
fi
# Replaced by autoreconf below
autoreconf -if -Wall
cd $THEDIR
if test x$OBJ_DIR != x; then
mkdir -p "$OBJ_DIR"
cd "$OBJ_DIR"
fi
if test -z "$NOCONFIGURE"; then
$srcdir/configure $EXTRA_ARGS "$@"
echo
echo "Now type 'make' to compile libxml2."
fi
......@@ -47,9 +47,9 @@
#define MAX_CATAL_DEPTH 50
#ifdef _WIN32
# define PATH_SEAPARATOR ';'
# define PATH_SEPARATOR ';'
#else
# define PATH_SEAPARATOR ':'
# define PATH_SEPARATOR ':'
#endif
/**
......@@ -238,7 +238,7 @@ xmlCatalogErrMemory(const char *extra)
*
* Handle a catalog error
*/
static void
static void LIBXML_ATTR_FORMAT(4,0)
xmlCatalogErr(xmlCatalogEntryPtr catal, xmlNodePtr node, int error,
const char *msg, const xmlChar *str1, const xmlChar *str2,
const xmlChar *str3)
......@@ -3247,7 +3247,7 @@ xmlLoadCatalogs(const char *pathss) {
while (xmlIsBlank_ch(*cur)) cur++;
if (*cur != 0) {
paths = cur;
while ((*cur != 0) && (*cur != PATH_SEAPARATOR) && (!xmlIsBlank_ch(*cur)))
while ((*cur != 0) && (*cur != PATH_SEPARATOR) && (!xmlIsBlank_ch(*cur)))
cur++;
path = xmlStrndup((const xmlChar *)paths, cur - paths);
#ifdef _WIN32
......@@ -3263,7 +3263,7 @@ xmlLoadCatalogs(const char *pathss) {
xmlFree(path);
}
}
while (*cur == PATH_SEAPARATOR)
while (*cur == PATH_SEPARATOR)
cur++;
}
}
......
This diff is collapsed.
......@@ -3,12 +3,13 @@ AC_PREREQ([2.63])
AC_INIT
AC_CONFIG_SRCDIR([entities.c])
AC_CONFIG_HEADERS([config.h])
AM_MAINTAINER_MODE([enable])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_HOST
LIBXML_MAJOR_VERSION=2
LIBXML_MINOR_VERSION=9
LIBXML_MICRO_VERSION=3
LIBXML_MICRO_VERSION=4
LIBXML_MICRO_VERSION_SUFFIX=
LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX
LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
......@@ -158,7 +159,7 @@ AC_ARG_WITH(readline,
if test "$withval" != "no" -a "$withval" != "yes"; then
RDL_DIR=$withval
CPPFLAGS="${CPPFLAGS} -I$withval/include"
LIBS="${LIBS} -L$withval/lib"
LDFLAGS="${LDFLAGS} -L$withval/lib"
fi
])
AC_ARG_WITH(regexps,
......@@ -194,7 +195,7 @@ AC_ARG_WITH(zlib,
if test "$withval" != "no" -a "$withval" != "yes"; then
Z_DIR=$withval
CPPFLAGS="${CPPFLAGS} -I$withval/include"
LIBS="${LIBS} -L$withval/lib"
LDFLAGS="${LDFLAGS} -L$withval/lib"
fi
])
AC_ARG_WITH(lzma,
......@@ -202,7 +203,7 @@ AC_ARG_WITH(lzma,
if test "$withval" != "no" -a "$withval" != "yes"; then
LZMA_DIR=$withval
CPPFLAGS="${CPPFLAGS} -I$withval/include"
LIBS="${LIBS} -L$withval/lib"
LDFLAGS="${LDFLAGS} -L$withval/lib"
fi
])
AC_ARG_WITH(coverage,
......@@ -390,24 +391,39 @@ WITH_ZLIB=0
if test "$with_zlib" = "no"; then
echo "Disabling compression support"
else
AC_CHECK_HEADERS(zlib.h,
[SAVE_LDFLAGS="${LDFLAGS}"
LDFLAGS="-L${Z_DIR}/lib"
AC_CHECK_LIB(z, gzread,[
AC_DEFINE([HAVE_LIBZ], [1], [Have compression library])
WITH_ZLIB=1
if test "x${Z_DIR}" != "x"; then
Z_CFLAGS="-I${Z_DIR}/include"
Z_LIBS="-L${Z_DIR}/lib -lz"
[case ${host} in
*-*-solaris*)
Z_LIBS="-L${Z_DIR}/lib -R${Z_DIR}/lib -lz"
;;
esac]
else
Z_LIBS="-lz"
fi])
LDFLAGS="${SAVE_LDFLAGS}"])
# Try pkg-config first so that static linking works.