Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Feb 2013 00:43:02 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r247293 - in vendor/expat/dist: . doc examples lib tests tests/benchmark xmlwf
Message-ID:  <201302260043.r1Q0h2GO088626@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Tue Feb 26 00:43:01 2013
New Revision: 247293
URL: http://svnweb.freebsd.org/changeset/base/247293

Log:
  Vendor import of expat 2.1.0 (trimmed).

Added:
  vendor/expat/dist/FREEBSD-Xlist   (contents, props changed)
Deleted:
  vendor/expat/dist/FREEBSD-upgrade
  vendor/expat/dist/configure
  vendor/expat/dist/doc/valid-xhtml10.png
  vendor/expat/dist/lib/winconfig.h
  vendor/expat/dist/tests/benchmark/benchmark.dsp
  vendor/expat/dist/tests/benchmark/benchmark.dsw
Modified:
  vendor/expat/dist/Changes   (contents, props changed)
  vendor/expat/dist/MANIFEST   (contents, props changed)
  vendor/expat/dist/Makefile.in   (contents, props changed)
  vendor/expat/dist/README   (contents, props changed)
  vendor/expat/dist/configure.in   (contents, props changed)
  vendor/expat/dist/doc/reference.html   (contents, props changed)
  vendor/expat/dist/doc/xmlwf.sgml   (contents, props changed)
  vendor/expat/dist/expat_config.h.in   (contents, props changed)
  vendor/expat/dist/lib/expat.h   (contents, props changed)
  vendor/expat/dist/lib/xmlparse.c   (contents, props changed)
  vendor/expat/dist/lib/xmlrole.c   (contents, props changed)
  vendor/expat/dist/lib/xmltok.c   (contents, props changed)
  vendor/expat/dist/lib/xmltok_impl.c   (contents, props changed)
  vendor/expat/dist/tests/README.txt   (contents, props changed)
  vendor/expat/dist/tests/minicheck.h
  vendor/expat/dist/tests/runtests.c   (contents, props changed)
  vendor/expat/dist/tests/xmltest.sh   (contents, props changed)
  vendor/expat/dist/xmlwf/readfilemap.c   (contents, props changed)
  vendor/expat/dist/xmlwf/xmlwf.c   (contents, props changed)
Directory Properties:
  vendor/expat/dist/COPYING   (props changed)
  vendor/expat/dist/doc/style.css   (props changed)
  vendor/expat/dist/doc/xmlwf.1   (props changed)
  vendor/expat/dist/examples/elements.c   (props changed)
  vendor/expat/dist/examples/outline.c   (props changed)
  vendor/expat/dist/lib/ascii.h   (props changed)
  vendor/expat/dist/lib/asciitab.h   (props changed)
  vendor/expat/dist/lib/iasciitab.h   (props changed)
  vendor/expat/dist/lib/internal.h   (props changed)
  vendor/expat/dist/lib/latin1tab.h   (props changed)
  vendor/expat/dist/lib/nametab.h   (props changed)
  vendor/expat/dist/lib/utf8tab.h   (props changed)
  vendor/expat/dist/lib/xmlrole.h   (props changed)
  vendor/expat/dist/lib/xmltok.h   (props changed)
  vendor/expat/dist/lib/xmltok_impl.h   (props changed)
  vendor/expat/dist/lib/xmltok_ns.c   (props changed)
  vendor/expat/dist/tests/chardata.c   (props changed)
  vendor/expat/dist/tests/chardata.h   (props changed)
  vendor/expat/dist/xmlwf/codepage.c   (props changed)
  vendor/expat/dist/xmlwf/codepage.h   (props changed)
  vendor/expat/dist/xmlwf/ct.c   (props changed)
  vendor/expat/dist/xmlwf/filemap.h   (props changed)
  vendor/expat/dist/xmlwf/unixfilemap.c   (props changed)
  vendor/expat/dist/xmlwf/win32filemap.c   (props changed)
  vendor/expat/dist/xmlwf/xmlfile.c   (props changed)
  vendor/expat/dist/xmlwf/xmlfile.h   (props changed)
  vendor/expat/dist/xmlwf/xmlmime.c   (props changed)
  vendor/expat/dist/xmlwf/xmlmime.h   (props changed)
  vendor/expat/dist/xmlwf/xmltchar.h   (props changed)
  vendor/expat/dist/xmlwf/xmlurl.h   (props changed)
  vendor/expat/dist/xmlwf/xmlwin32url.cxx   (props changed)

Modified: vendor/expat/dist/Changes
==============================================================================
--- vendor/expat/dist/Changes	Tue Feb 26 00:34:52 2013	(r247292)
+++ vendor/expat/dist/Changes	Tue Feb 26 00:43:01 2013	(r247293)
@@ -1,5 +1,41 @@
+Release 2.1.0 Sat March 24 2012
+        - Bug Fixes:
+          #1742315: Harmful XML_ParserCreateNS suggestion.
+          #2895533: CVE-2012-1147 - Resource leak in readfilemap.c.
+          #1785430: Expat build fails on linux-amd64 with gcc version>=4.1 -O3.
+          #1983953, 2517952, 2517962, 2649838: 
+                Build modifications using autoreconf instead of buildconf.sh.
+          #2815947, #2884086: OBJEXT and EXEEXT support while building.
+          #1990430: CVE-2009-3720 - Parser crash with special UTF-8 sequences.
+          #2517938: xmlwf should return non-zero exit status if not well-formed.
+          #2517946: Wrong statement about XMLDecl in xmlwf.1 and xmlwf.sgml.
+          #2855609: Dangling positionPtr after error.
+          #2894085: CVE-2009-3560 - Buffer over-read and crash in big2_toUtf8().
+          #2958794: CVE-2012-1148 - Memory leak in poolGrow.
+          #2990652: CMake support.
+          #3010819: UNEXPECTED_STATE with a trailing "%" in entity value.
+          #3206497: Unitialized memory returned from XML_Parse.
+          #3287849: make check fails on mingw-w64.
+          #3496608: CVE-2012-0876 - Hash DOS attack.
+        - Patches:
+          #1749198: pkg-config support.
+          #3010222: Fix for bug #3010819.
+          #3312568: CMake support.
+          #3446384: Report byte offsets for attr names and values.
+        - New Features / API changes:
+          Added new API member XML_SetHashSalt() that allows setting an intial
+                value (salt) for hash calculations. This is part of the fix for
+                bug #3496608 to randomize hash parameters.
+          When compiled with XML_ATTR_INFO defined, adds new API member
+                XML_GetAttributeInfo() that allows retrieving the byte
+                offsets for attribute names and values (patch #3446384).
+          Added CMake build system.
+                See bug #2990652 and patch #3312568.
+          Added run-benchmark target to Makefile.in - relies on testdata module
+                present in the same relative location as in the repository.
+          
 Release 2.0.1 Tue June 5 2007
-        - Fixed bugs #1515266, 1515600: The character data handler's calling
+        - Fixed bugs #1515266, #1515600: The character data handler's calling
           of XML_StopParser() was not handled properly; if the parser was
           stopped and the handler set to NULL, the parser would segfault.
         - Fixed bug #1690883: Expat failed on EBCDIC systems as it assumed
@@ -8,7 +44,7 @@ Release 2.0.1 Tue June 5 2007
         - Fixed xmlwf bug #1513566: "out of memory" error on file size zero.
         - Fixed outline.c bug #1543233: missing a final XML_ParserFree() call.
         - Fixes and improvements for Windows platform:
-          bugs #1409451, #1476160, 1548182, 1602769, 1717322.
+          bugs #1409451, #1476160, #1548182, #1602769, #1717322.
         - Build fixes for various platforms:
           HP-UX, Tru64, Solaris 9: patch #1437840, bug #1196180.
           All Unix: #1554618 (refreshed config.sub/config.guess).
@@ -30,8 +66,8 @@ Release 2.0.0 Wed Jan 11 2006
           byte indexes and line/column numbers.
         - Updated to use libtool 1.5.22 (the most recent).
         - Added support for AmigaOS.
-        - Some mostly minor bug fixes. SF issues include: 1006708,
-          1021776, 1023646, 1114960, 1156398, 1221160, 1271642.
+        - Some mostly minor bug fixes. SF issues include: #1006708,
+          #1021776, #1023646, #1114960, #1156398, #1221160, #1271642.
 
 Release 1.95.8 Fri Jul 23 2004
         - Major new feature: suspend/resume.  Handlers can now request
@@ -40,8 +76,8 @@ Release 1.95.8 Fri Jul 23 2004
           documentation for more details.
         - Some mostly minor bug fixes, but compilation should no
           longer generate warnings on most platforms.  SF issues
-          include: 827319, 840173, 846309, 888329, 896188, 923913,
-          928113, 961698, 985192.
+          include: #827319, #840173, #846309, #888329, #896188, #923913,
+          #928113, #961698, #985192.
 
 Release 1.95.7 Mon Oct 20 2003
         - Fixed enum XML_Status issue (reported on SourceForge many
@@ -54,19 +90,19 @@ Release 1.95.7 Mon Oct 20 2003
         - Improved ability to build without the configure-generated
           expat_config.h header.  This is useful for applications
           which embed Expat rather than linking in the library.
-        - Fixed a variety of bugs: see SF issues 458907, 609603,
-          676844, 679754, 692878, 692964, 695401, 699323, 699487,
-          820946.
+        - Fixed a variety of bugs: see SF issues #458907, #609603,
+          #676844, #679754, #692878, #692964, #695401, #699323, #699487,
+          #820946.
         - Improved hash table lookups.
         - Added more regression tests and improved documentation.
 
 Release 1.95.6 Tue Jan 28 2003
         - Added XML_FreeContentModel().
         - Added XML_MemMalloc(), XML_MemRealloc(), XML_MemFree().
-        - Fixed a variety of bugs: see SF issues 615606, 616863,
-          618199, 653180, 673791.
+        - Fixed a variety of bugs: see SF issues #615606, #616863,
+          #618199, #653180, #673791.
         - Enhanced the regression test suite.
-        - Man page improvements: includes SF issue 632146.
+        - Man page improvements: includes SF issue #632146.
 
 Release 1.95.5 Fri Sep 6 2002
         - Added XML_UseForeignDTD() for improved SAX2 support.
@@ -84,9 +120,9 @@ Release 1.95.5 Fri Sep 6 2002
         - Reduced line-length for all source code and headers to be
           no longer than 80 characters, to help with AS/400 support.
         - Reduced memory copying during parsing (SF patch #600964).
-        - Fixed a variety of bugs: see SF issues 580793, 434664,
-          483514, 580503, 581069, 584041, 584183, 584832, 585537,
-          596555, 596678, 598352, 598944, 599715, 600479, 600971.
+        - Fixed a variety of bugs: see SF issues #580793, #434664,
+          #483514, #580503, #581069, #584041, #584183, #584832, #585537,
+          #596555, #596678, #598352, #598944, #599715, #600479, #600971.
 
 Release 1.95.4 Fri Jul 12 2002
         - Added support for VMS, contributed by Craig Berry.  See
@@ -95,14 +131,14 @@ Release 1.95.4 Fri Jul 12 2002
           contributed by Thomas Wegner and Daryle Walker.
         - Added Borland C++ Builder 5 / BCC 5.5 support, contributed
           by Patrick McConnell (SF patch #538032).
-        - Fixed a variety of bugs: see SF issues 441449, 563184,
-          564342, 566334, 566901, 569461, 570263, 575168, 579196.
+        - Fixed a variety of bugs: see SF issues #441449, #563184,
+          #564342, #566334, #566901, #569461, #570263, #575168, #579196.
         - Made skippedEntityHandler conform to SAX2 (see source comment)
         - Re-implemented WFC: Entity Declared from XML 1.0 spec and
           added a new error "entity declared in parameter entity":
-          see SF bug report 569461 and SF patch 578161
+          see SF bug report #569461 and SF patch #578161
         - Re-implemented section 5.1 from XML 1.0 spec:
-          see SF bug report 570263 and SF patch 578161
+          see SF bug report #570263 and SF patch #578161
 
 Release 1.95.3 Mon Jun 3 2002
         - Added a project to the MSVC workspace to create a wchar_t
@@ -114,9 +150,9 @@ Release 1.95.3 Mon Jun 3 2002
         - Made the XML_UNICODE builds usable (thanks, Karl!).
         - Allow xmlwf to read from standard input.
         - Install a man page for xmlwf on Unix systems.
-        - Fixed many bugs; see SF bug reports 231864, 461380, 464837,
-          466885, 469226, 477667, 484419, 487840, 494749, 496505,
-          547350.  Other bugs which we can't test as easily may also
+        - Fixed many bugs; see SF bug reports #231864, #461380, #464837,
+          #466885, #469226, #477667, #484419, #487840, #494749, #496505,
+          #547350.  Other bugs which we can't test as easily may also
           have been fixed, especially in the area of build support.
 
 Release 1.95.2 Fri Jul 27 2001

Added: vendor/expat/dist/FREEBSD-Xlist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/expat/dist/FREEBSD-Xlist	Tue Feb 26 00:43:01 2013	(r247293)
@@ -0,0 +1,19 @@
+# $FreeBSD$
+*.MPW
+*.cmake
+*.def
+*.dsp
+*.dsw
+*.m4
+*.pc.in
+*config.h
+CMake*
+Configure*
+amiga
+bcb5
+configure
+conftools
+doc/valid-xhtml10.png
+m4
+vms
+win32

Modified: vendor/expat/dist/MANIFEST
==============================================================================
--- vendor/expat/dist/MANIFEST	Tue Feb 26 00:34:52 2013	(r247292)
+++ vendor/expat/dist/MANIFEST	Tue Feb 26 00:43:01 2013	(r247293)
@@ -1,5 +1,8 @@
-amiga/stdlib.c
 amiga/launch.c
+amiga/expat_68k.c
+amiga/expat_68k.h
+amiga/expat_68k_handler_stubs.c
+amiga/expat_base.h
 amiga/expat_vectors.c
 amiga/expat_lib.c
 amiga/expat.xml
@@ -42,25 +45,35 @@ doc/style.css
 doc/valid-xhtml10.png
 doc/xmlwf.1
 doc/xmlwf.sgml
+CMakeLists.txt
+CMake.README
 COPYING
 Changes
+ConfigureChecks.cmake
 MANIFEST
 Makefile.in
 README
 configure
 configure.in
 expat_config.h.in
+expat_config.h.cmake
+expat.pc.in
 expat.dsw
+aclocal.m4
 conftools/PrintPath
 conftools/ac_c_bigendian_cross.m4
-conftools/config.guess
-conftools/config.sub
 conftools/expat.m4
 conftools/get-version.sh
+conftools/mkinstalldirs
+conftools/config.guess
+conftools/config.sub
 conftools/install-sh
-conftools/libtool.m4
 conftools/ltmain.sh
-conftools/mkinstalldirs
+m4/libtool.m4
+m4/ltversion.m4
+m4/ltoptions.m4
+m4/ltsugar.m4
+m4/lt~obsolete.m4
 examples/elements.c
 examples/elements.dsp
 examples/outline.c

Modified: vendor/expat/dist/Makefile.in
==============================================================================
--- vendor/expat/dist/Makefile.in	Tue Feb 26 00:34:52 2013	(r247292)
+++ vendor/expat/dist/Makefile.in	Tue Feb 26 00:43:01 2013	(r247293)
@@ -31,6 +31,7 @@ bindir = @bindir@
 libdir = @libdir@
 includedir = @includedir@
 man1dir = @mandir@/man1
+pkgconfigdir = $(libdir)/pkgconfig
 
 top_builddir = .
 
@@ -46,18 +47,18 @@ LIBRARY = libexpat.la
 
 DESTDIR = $(INSTALL_ROOT)
 
-default:  buildlib xmlwf/xmlwf
+default:  buildlib xmlwf/xmlwf@EXEEXT@
 
-buildlib: $(LIBRARY)
+buildlib: $(LIBRARY) expat.pc
 
-all: $(LIBRARY) xmlwf/xmlwf examples/elements examples/outline
+all: $(LIBRARY) expat.pc xmlwf/xmlwf@EXEEXT@ examples/elements examples/outline
 
 clean:
-	cd lib && rm -f $(LIBRARY) *.o *.lo && rm -rf .libs _libs
-	cd xmlwf && rm -f xmlwf *.o *.lo && rm -rf .libs _libs
-	cd examples && rm -f elements outline *.o *.lo && rm -rf .libs _libs
-	cd tests && rm -rf .libs runtests runtests.o runtestspp runtestspp.o
-	cd tests && rm -f chardata.o minicheck.o
+	cd lib && rm -f $(LIBRARY) *.@OBJEXT@ *.lo && rm -rf .libs _libs
+	cd xmlwf && rm -f xmlwf *.@OBJEXT@ *.lo && rm -rf .libs _libs
+	cd examples && rm -f elements outline *.@OBJEXT@ *.lo && rm -rf .libs _libs
+	cd tests && rm -rf .libs runtests runtests.@OBJEXT@ runtestspp runtestspp.@OBJEXT@
+	cd tests && rm -f chardata.@OBJEXT@ minicheck.@OBJEXT@
 	rm -rf .libs libexpat.la
 	rm -f examples/core tests/core xmlwf/core
 
@@ -65,34 +66,37 @@ clobber: clean
 
 distclean: clean
 	rm -f expat_config.h config.status config.log config.cache libtool
-	rm -f Makefile
+	rm -f Makefile expat.pc
 
 extraclean: distclean
 	rm -f expat_config.h.in configure
-	rm -f conftools/ltconfig conftools/ltmain.sh conftools/libtool.m4
+	rm -f aclocal.m4 m4/*
+	rm -f conftools/ltmain.sh conftools/install-sh conftools/config.guess conftools/config.sub
 
 check: tests/runtests tests/runtestspp
 	tests/runtests
 	tests/runtestspp
 
-install: xmlwf/xmlwf installlib
+install: xmlwf/xmlwf@EXEEXT@ installlib
 	$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
-	$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(DESTDIR)$(bindir)/xmlwf
+	$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf@EXEEXT@ $(DESTDIR)$(bindir)/xmlwf
 	$(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(man1dir)
 
-installlib: $(LIBRARY) $(APIHEADER)
-	$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
+installlib: $(LIBRARY) $(APIHEADER) expat.pc
+	$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) $(DESTDIR)$(pkgconfigdir)
 	$(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)/$(LIBRARY)
 	for FN in $(APIHEADER) ; do $(INSTALL_DATA) $$FN $(DESTDIR)$(includedir) ; done
+	$(INSTALL_DATA) expat.pc $(DESTDIR)$(pkgconfigdir)/expat.pc
 
 uninstall: uninstalllib
-	$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/xmlwf
+	$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/xmlwf@EXEEXT@
 	rm -f $(DESTDIR)$(man1dir)/xmlwf.1
 
 uninstalllib:
 	$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIBRARY)
 	rm -f $(DESTDIR)$(includedir)/expat.h
 	rm -f $(DESTDIR)$(includedir)/expat_external.h
+	rm -f $(DESTDIR)$(pkgconfigdir)/expat.pc
 
 # for VPATH builds (invoked by configure)
 mkdir-init:
@@ -125,6 +129,9 @@ LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo
 $(LIBRARY): $(LIB_OBJS)
 	$(LINK_LIB) $(LIB_OBJS)
 
+expat.pc: $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+
 lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/xmlrole.h lib/xmltok.h \
 	$(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
 
@@ -137,46 +144,53 @@ lib/xmltok.lo: lib/xmltok.c lib/xmltok_i
 	$(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
 
 
-XMLWF_OBJS = xmlwf/xmlwf.o xmlwf/xmlfile.o xmlwf/codepage.o xmlwf/@FILEMAP@.o
-xmlwf/xmlwf.o: xmlwf/xmlwf.c
-xmlwf/xmlfile.o: xmlwf/xmlfile.c
-xmlwf/codepage.o: xmlwf/codepage.c
-xmlwf/@FILEMAP@.o: xmlwf/@FILEMAP@.c
-xmlwf/xmlwf: $(XMLWF_OBJS) $(LIBRARY)
+XMLWF_OBJS = xmlwf/xmlwf.@OBJEXT@ xmlwf/xmlfile.@OBJEXT@ xmlwf/codepage.@OBJEXT@ xmlwf/@FILEMAP@.@OBJEXT@
+xmlwf/xmlwf.@OBJEXT@: xmlwf/xmlwf.c
+xmlwf/xmlfile.@OBJEXT@: xmlwf/xmlfile.c
+xmlwf/codepage.@OBJEXT@: xmlwf/codepage.c
+xmlwf/@FILEMAP@.@OBJEXT@: xmlwf/@FILEMAP@.c
+xmlwf/xmlwf@EXEEXT@: $(XMLWF_OBJS) $(LIBRARY)
 	$(LINK_EXE) $(XMLWF_OBJS) $(LIBRARY)
 
-examples/elements.o: examples/elements.c
-examples/elements: examples/elements.o $(LIBRARY)
+examples/elements.@OBJEXT@: examples/elements.c
+examples/elements: examples/elements.@OBJEXT@ $(LIBRARY)
 	$(LINK_EXE) $< $(LIBRARY)
 
-examples/outline.o: examples/outline.c
-examples/outline: examples/outline.o $(LIBRARY)
+examples/outline.@OBJEXT@: examples/outline.c
+examples/outline: examples/outline.@OBJEXT@ $(LIBRARY)
 	$(LINK_EXE) $< $(LIBRARY)
 
-tests/chardata.o: tests/chardata.c tests/chardata.h
-tests/minicheck.o: tests/minicheck.c tests/minicheck.h
-tests/runtests.o: tests/runtests.c tests/chardata.h
-tests/runtests: tests/runtests.o tests/chardata.o tests/minicheck.o $(LIBRARY)
-	$(LINK_EXE) tests/runtests.o tests/chardata.o tests/minicheck.o $(LIBRARY)
-tests/runtestspp.o: tests/runtestspp.cpp tests/runtests.c tests/chardata.h
-tests/runtestspp: tests/runtestspp.o tests/chardata.o tests/minicheck.o $(LIBRARY)
-	$(LINK_CXX_EXE) tests/runtestspp.o tests/chardata.o tests/minicheck.o $(LIBRARY)
+tests/chardata.@OBJEXT@: tests/chardata.c tests/chardata.h
+tests/minicheck.@OBJEXT@: tests/minicheck.c tests/minicheck.h
+tests/runtests.@OBJEXT@: tests/runtests.c tests/chardata.h
+tests/runtests: tests/runtests.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
+	$(LINK_EXE) tests/runtests.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
+tests/runtestspp.@OBJEXT@: tests/runtestspp.cpp tests/runtests.c tests/chardata.h
+tests/runtestspp: tests/runtestspp.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
+	$(LINK_CXX_EXE) tests/runtestspp.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
+
+tests/benchmark/benchmark.@OBJEXT@: tests/benchmark/benchmark.c
+tests/benchmark/benchmark: tests/benchmark/benchmark.@OBJEXT@ $(LIBRARY)
+	$(LINK_EXE) tests/benchmark/benchmark.@OBJEXT@ $(LIBRARY)
+
+run-benchmark: tests/benchmark/benchmark
+	tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/recset.xml 65535 3
 
 tests/xmlts.zip:
 	wget --output-document=tests/xmlts.zip \
-		http://www.w3.org/XML/Test/xmlts20020606.zip
+		http://www.w3.org/XML/Test/xmlts20080827.zip
 
 tests/XML-Test-Suite: tests/xmlts.zip
 	cd tests && unzip -q xmlts.zip
 
-run-xmltest: xmlwf/xmlwf tests/XML-Test-Suite
+run-xmltest: xmlwf/xmlwf@EXEEXT@ tests/XML-Test-Suite
 	tests/xmltest.sh
 
-.SUFFIXES: .c .cpp .lo .o
+.SUFFIXES: .c .cpp .lo .@OBJEXT@
 
-.cpp.o:
+.cpp.@OBJEXT@:
 	$(CXXCOMPILE) -o $@ -c $<
-.c.o:
+.c.@OBJEXT@:
 	$(COMPILE) -o $@ -c $<
 .c.lo:
 	$(LTCOMPILE) -o $@ -c $<

Modified: vendor/expat/dist/README
==============================================================================
--- vendor/expat/dist/README	Tue Feb 26 00:34:52 2013	(r247292)
+++ vendor/expat/dist/README	Tue Feb 26 00:43:01 2013	(r247293)
@@ -1,5 +1,5 @@
 
-                        Expat, Release 2.0.1
+                        Expat, Release 2.1.0
 
 This is Expat, a C library for parsing XML, written by James Clark.
 Expat is a stream-oriented XML parser.  This means that you register
@@ -25,8 +25,7 @@ intended to be production grade software
 If you are building Expat from a check-out from the CVS repository,
 you need to run a script that generates the configure script using the
 GNU autoconf and libtool tools.  To do this, you need to have
-autoconf 2.52 or newer and libtool 1.4 or newer (1.5 or newer preferred).
-Run the script like this:
+autoconf 2.58 or newer. Run the script like this:
 
         ./buildconf.sh
 
@@ -65,8 +64,8 @@ location.  Have a look at the "Makefile"
 the directories into which things will be installed.
 
 If you are interested in building Expat to provide document
-information in UTF-16 rather than the default UTF-8, follow these
-instructions (after having run "make distclean"):
+information in UTF-16 encoding rather than the default UTF-8, follow
+these instructions (after having run "make distclean"):
 
         1. For UTF-16 output as unsigned short (and version/error
            strings as char), run:
@@ -106,7 +105,10 @@ use DESTDIR=$(INSTALL_ROOT), even if DES
 environment, because variable-setting priority is
 1) commandline
 2) in-makefile
-3) environment           
+3) environment  
+
+Note: This only applies to the Expat library itself, building UTF-16 versions
+of xmlwf and the tests is currently not supported.         
 
 Note for Solaris users:  The "ar" command is usually located in
 "/usr/ccs/bin", which is not in the default PATH.  You will need to

Modified: vendor/expat/dist/configure.in
==============================================================================
--- vendor/expat/dist/configure.in	Tue Feb 26 00:34:52 2013	(r247292)
+++ vendor/expat/dist/configure.in	Tue Feb 26 00:43:01 2013	(r247293)
@@ -10,8 +10,8 @@ dnl   under the terms of the License (ba
 dnl   in the file COPYING that comes with this distribution.
 dnl
 
-dnl Ensure that Expat is configured with autoconf 2.52 or newer
-AC_PREREQ(2.52)
+dnl Ensure that Expat is configured with autoconf 2.58 or newer
+AC_PREREQ(2.58)
 
 dnl Get the version number of Expat, using m4's esyscmd() command to run
 dnl the command at m4-generation time. This allows us to create an m4
@@ -25,12 +25,13 @@ dnl test. I believe this test will work,
 dnl GNU M4 to test it right now.
 define([expat_version], ifdef([__gnu__],
                               [esyscmd(conftools/get-version.sh lib/expat.h)],
-                              [2.0.x]))
+                              [2.1.x]))
 AC_INIT(expat, expat_version, expat-bugs@libexpat.org)
 undefine([expat_version])
 
 AC_CONFIG_SRCDIR(Makefile.in)
 AC_CONFIG_AUX_DIR(conftools)
+AC_CONFIG_MACRO_DIR([m4])
 
 
 dnl
@@ -44,13 +45,12 @@ dnl 
 dnl If the API changes incompatibly set LIBAGE back to 0
 dnl
 
-LIBCURRENT=6
-LIBREVISION=2
-LIBAGE=5
+LIBCURRENT=7
+LIBREVISION=0
+LIBAGE=6
 
 AC_CONFIG_HEADER(expat_config.h)
 
-sinclude(conftools/libtool.m4)
 sinclude(conftools/ac_c_bigendian_cross.m4)
 
 AC_LIBTOOL_WIN32_DLL
@@ -62,6 +62,7 @@ AC_SUBST(LIBAGE)
 
 dnl Checks for programs.
 AC_PROG_CC
+AC_PROG_CXX
 AC_PROG_INSTALL
 
 if test "$GCC" = yes ; then
@@ -144,7 +145,7 @@ AC_DEFINE([XML_DTD], 1,
 AC_DEFINE([XML_CONTEXT_BYTES], 1024,
           [Define to specify how much context to retain around the current parse point.])
 
-AC_CONFIG_FILES(Makefile)
+AC_CONFIG_FILES([Makefile expat.pc])
 AC_OUTPUT
 
 abs_srcdir="`cd $srcdir && pwd`"

Modified: vendor/expat/dist/doc/reference.html
==============================================================================
--- vendor/expat/dist/doc/reference.html	Tue Feb 26 00:34:52 2013	(r247292)
+++ vendor/expat/dist/doc/reference.html	Tue Feb 26 00:43:01 2013	(r247293)
@@ -129,8 +129,10 @@ interface.</p>
       <li><a href="#XML_GetBase">XML_GetBase</a></li>
       <li><a href="#XML_GetSpecifiedAttributeCount">XML_GetSpecifiedAttributeCount</a></li>
       <li><a href="#XML_GetIdAttributeIndex">XML_GetIdAttributeIndex</a></li>
+      <li><a href="#XML_GetAttributeInfo">XML_GetAttributeInfo</a></li>
       <li><a href="#XML_SetEncoding">XML_SetEncoding</a></li>
       <li><a href="#XML_SetParamEntityParsing">XML_SetParamEntityParsing</a></li>
+      <li><a href="#XML_SetHashSalt">XML_SetHashSalt</a></li>
       <li><a href="#XML_UseForeignDTD">XML_UseForeignDTD</a></li>
       <li><a href="#XML_SetReturnNSTriplet">XML_SetReturnNSTriplet</a></li>
       <li><a href="#XML_DefaultCurrent">XML_DefaultCurrent</a></li>
@@ -369,6 +371,11 @@ footprint and can be faster.</dd>
 statically with the code that calls it; this is required to get all
 the right MSVC magic annotations correct.  This is ignored on other
 platforms.</dd>
+
+<dt>XML_ATTR_INFO</dt>
+<dd>If defined, makes the the additional function <code><a href=
+"#XML_GetAttributeInfo" >XML_GetAttributeInfo</a></code> available
+for reporting attribute byte offsets.</dd>
 </dl>
 
 <hr />
@@ -917,12 +924,15 @@ XML_ParserCreateNS(const XML_Char *encod
 Constructs a new parser that has namespace processing in effect. Namespace
 expanded element names and attribute names are returned as a concatenation
 of the namespace URI, <em>sep</em>, and the local part of the name. This
-means that you should pick a character for <em>sep</em> that can't be
-part of a legal URI. There is a special case when <em>sep</em> is the null
-character <code>'\0'</code>: the namespace URI and the local part will be
-concatenated without any separator - this is intended to support RDF processors.
-It is a programming error to use the null separator with 
-<a href= "#XML_SetReturnNSTriplet">namespace triplets</a>.</div>
+means that you should pick a character for <em>sep</em> that can't be part
+of an URI. Since Expat does not check namespace URIs for conformance, the
+only safe choice for a namespace separator is a character that is illegal
+in XML. For instance, <code>'\xFF'</code> is not legal in UTF-8, and
+<code>'\xFFFF'</code> is not legal in UTF-16. There is a special case when
+<em>sep</em> is the null character <code>'\0'</code>: the namespace URI and
+the local part will be concatenated without any separator - this is intended
+to support RDF processors. It is a programming error to use the null separator
+with <a href= "#XML_SetReturnNSTriplet">namespace triplets</a>.</div>
 
 <pre class="fcndec" id="XML_ParserCreate_MM">
 XML_Parser XMLCALL
@@ -2074,6 +2084,27 @@ attribute. If called inside a start hand
 current call.
 </div>
 
+<pre class="fcndec" id="XML_GetAttributeInfo">
+const XML_AttrInfo * XMLCALL
+XML_GetAttributeInfo(XML_Parser parser);
+</pre>
+<pre class="signature">
+typedef struct {
+  XML_Index  nameStart;  /* Offset to beginning of the attribute name. */
+  XML_Index  nameEnd;    /* Offset after the attribute name's last byte. */
+  XML_Index  valueStart; /* Offset to beginning of the attribute value. */
+  XML_Index  valueEnd;   /* Offset after the attribute value's last byte. */
+} XML_AttrInfo;
+</pre>
+<div class="fcndef">
+Returns an array of <code>XML_AttrInfo</code> structures for the
+attribute/value pairs passed in the last call to the
+<code>XML_StartElementHandler</code> that were specified
+in the start-tag rather than defaulted. Each attribute/value pair counts
+as 1; thus the number of entries in the array is
+<code>XML_GetSpecifiedAttributeCount(parser) / 2</code>.
+</div>
+
 <pre class="fcndec" id="XML_SetEncoding">
 enum XML_Status XMLCALL
 XML_SetEncoding(XML_Parser p,
@@ -2104,6 +2135,24 @@ The choices for <code>code</code> are:
 <li><code>XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE</code></li>
 <li><code>XML_PARAM_ENTITY_PARSING_ALWAYS</code></li>
 </ul>
+<b>Note:</b> If <code>XML_SetParamEntityParsing</code> is called after 
+<code>XML_Parse</code> or <code>XML_ParseBuffer</code>, then it has
+no effect and will always return 0.
+</div>
+
+<pre class="fcndec" id="XML_SetHashSalt">
+int XMLCALL
+XML_SetHashSalt(XML_Parser p,
+                unsigned long hash_salt);
+</pre>
+<div class="fcndef">
+Sets the hash salt to use for internal hash calculations.
+Helps in preventing DoS attacks based on predicting hash
+function behavior. In order to have an effect this must be called
+before parsing has started. Returns 1 if successful, 0 when called
+after <code>XML_Parse</code> or <code>XML_ParseBuffer</code>.
+<p><b>Note:</b> This call is optional, as the parser will auto-generate a new
+random salt value if no value has been set at the start of parsing.</p>
 </div>
 
 <pre class="fcndec" id="XML_UseForeignDTD">

Modified: vendor/expat/dist/doc/xmlwf.sgml
==============================================================================
--- vendor/expat/dist/doc/xmlwf.sgml	Tue Feb 26 00:34:52 2013	(r247292)
+++ vendor/expat/dist/doc/xmlwf.sgml	Tue Feb 26 00:43:01 2013	(r247293)
@@ -389,11 +389,6 @@ supports both.
   <refsect1>
     <title>BUGS</title>
 	<para>
-	According to the W3C standard, an XML file without a
-	declaration at the beginning is not considered well-formed.
-	However, <command>&dhpackage;</command> allows this to pass.
-	</para>
-	<para>
 	<command>&dhpackage;</command> returns a 0 - noerr result,
 	even if the file is not well-formed.  There is no good way for
 	a program to use <command>&dhpackage;</command> to quickly

Modified: vendor/expat/dist/expat_config.h.in
==============================================================================
--- vendor/expat/dist/expat_config.h.in	Tue Feb 26 00:34:52 2013	(r247292)
+++ vendor/expat/dist/expat_config.h.in	Tue Feb 26 00:43:01 2013	(r247293)
@@ -39,6 +39,9 @@
 /* Define to 1 if you have the <string.h> header file. */
 #undef HAVE_STRING_H
 
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
 /* Define to 1 if you have the <sys/stat.h> header file. */
 #undef HAVE_SYS_STAT_H
 
@@ -48,6 +51,10 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#undef LT_OBJDIR
+
 /* Define to the address where bug reports for this package should be sent. */
 #undef PACKAGE_BUGREPORT
 
@@ -60,6 +67,9 @@
 /* Define to the one symbol short name of this package. */
 #undef PACKAGE_TARNAME
 
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
@@ -85,8 +95,8 @@
 /* Define to empty if `const' does not conform to ANSI C. */
 #undef const
 
-/* Define to `long' if <sys/types.h> does not define. */
+/* Define to `long int' if <sys/types.h> does not define. */
 #undef off_t
 
-/* Define to `unsigned' if <sys/types.h> does not define. */
+/* Define to `unsigned int' if <sys/types.h> does not define. */
 #undef size_t

Modified: vendor/expat/dist/lib/expat.h
==============================================================================
--- vendor/expat/dist/lib/expat.h	Tue Feb 26 00:34:52 2013	(r247292)
+++ vendor/expat/dist/lib/expat.h	Tue Feb 26 00:43:01 2013	(r247293)
@@ -742,6 +742,29 @@ XML_GetSpecifiedAttributeCount(XML_Parse
 XMLPARSEAPI(int)
 XML_GetIdAttributeIndex(XML_Parser parser);
 
+#ifdef XML_ATTR_INFO
+/* Source file byte offsets for the start and end of attribute names and values.
+   The value indices are exclusive of surrounding quotes; thus in a UTF-8 source
+   file an attribute value of "blah" will yield:
+   info->valueEnd - info->valueStart = 4 bytes.
+*/
+typedef struct {
+  XML_Index  nameStart;  /* Offset to beginning of the attribute name. */
+  XML_Index  nameEnd;    /* Offset after the attribute name's last byte. */
+  XML_Index  valueStart; /* Offset to beginning of the attribute value. */
+  XML_Index  valueEnd;   /* Offset after the attribute value's last byte. */
+} XML_AttrInfo;
+
+/* Returns an array of XML_AttrInfo structures for the attribute/value pairs
+   passed in last call to the XML_StartElementHandler that were specified
+   in the start-tag rather than defaulted. Each attribute/value pair counts
+   as 1; thus the number of entries in the array is
+   XML_GetSpecifiedAttributeCount(parser) / 2.
+*/
+XMLPARSEAPI(const XML_AttrInfo *)
+XML_GetAttributeInfo(XML_Parser parser);
+#endif
+
 /* Parses some input. Returns XML_STATUS_ERROR if a fatal error is
    detected.  The last call to XML_Parse must have isFinal true; len
    may be zero for this call (or any other).
@@ -883,6 +906,15 @@ XMLPARSEAPI(int)
 XML_SetParamEntityParsing(XML_Parser parser,
                           enum XML_ParamEntityParsing parsing);
 
+/* Sets the hash salt to use for internal hash calculations.
+   Helps in preventing DoS attacks based on predicting hash
+   function behavior. This must be called before parsing is started.
+   Returns 1 if successful, 0 when called after parsing has started.
+*/
+XMLPARSEAPI(int)
+XML_SetHashSalt(XML_Parser parser,
+                unsigned long hash_salt);
+
 /* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then
    XML_GetErrorCode returns information about the error.
 */
@@ -984,7 +1016,8 @@ enum XML_FeatureEnum {
   XML_FEATURE_SIZEOF_XML_CHAR,
   XML_FEATURE_SIZEOF_XML_LCHAR,
   XML_FEATURE_NS,
-  XML_FEATURE_LARGE_SIZE
+  XML_FEATURE_LARGE_SIZE,
+  XML_FEATURE_ATTR_INFO
   /* Additional features must be added to the end of this enum. */
 };
 
@@ -1004,8 +1037,8 @@ XML_GetFeatureList(void);
    change to major or minor version.
 */
 #define XML_MAJOR_VERSION 2
-#define XML_MINOR_VERSION 0
-#define XML_MICRO_VERSION 1
+#define XML_MINOR_VERSION 1
+#define XML_MICRO_VERSION 0
 
 #ifdef __cplusplus
 }

Modified: vendor/expat/dist/lib/xmlparse.c
==============================================================================
--- vendor/expat/dist/lib/xmlparse.c	Tue Feb 26 00:34:52 2013	(r247292)
+++ vendor/expat/dist/lib/xmlparse.c	Tue Feb 26 00:43:01 2013	(r247293)
@@ -5,6 +5,8 @@
 #include <stddef.h>
 #include <string.h>                     /* memset(), memcpy() */
 #include <assert.h>
+#include <limits.h>                     /* UINT_MAX */
+#include <time.h>                       /* time() */
 
 #define XML_BUILDING_EXPAT 1
 
@@ -12,7 +14,7 @@
 #include "winconfig.h"
 #elif defined(MACOS_CLASSIC)
 #include "macconfig.h"
-#elif defined(__amigaos4__)
+#elif defined(__amigaos__)
 #include "amigaconfig.h"
 #elif defined(__WATCOMC__)
 #include "watcomconfig.h"
@@ -327,15 +329,15 @@ processXmlDecl(XML_Parser parser, int is
 static enum XML_Error
 initializeEncoding(XML_Parser parser);
 static enum XML_Error
-doProlog(XML_Parser parser, const ENCODING *enc, const char *s, 
-         const char *end, int tok, const char *next, const char **nextPtr, 
+doProlog(XML_Parser parser, const ENCODING *enc, const char *s,
+         const char *end, int tok, const char *next, const char **nextPtr,
          XML_Bool haveMore);
 static enum XML_Error
-processInternalEntity(XML_Parser parser, ENTITY *entity, 
+processInternalEntity(XML_Parser parser, ENTITY *entity,
                       XML_Bool betweenDecl);
 static enum XML_Error
 doContent(XML_Parser parser, int startTagLevel, const ENCODING *enc,
-          const char *start, const char *end, const char **endPtr, 
+          const char *start, const char *end, const char **endPtr,
           XML_Bool haveMore);
 static enum XML_Error
 doCdataSection(XML_Parser parser, const ENCODING *, const char **startPtr,
@@ -353,7 +355,7 @@ static enum XML_Error
 addBinding(XML_Parser parser, PREFIX *prefix, const ATTRIBUTE_ID *attId,
            const XML_Char *uri, BINDING **bindingsPtr);
 static int
-defineAttribute(ELEMENT_TYPE *type, ATTRIBUTE_ID *, XML_Bool isCdata, 
+defineAttribute(ELEMENT_TYPE *type, ATTRIBUTE_ID *, XML_Bool isCdata,
                 XML_Bool isId, const XML_Char *dfltValue, XML_Parser parser);
 static enum XML_Error
 storeAttributeValue(XML_Parser parser, const ENCODING *, XML_Bool isCdata,
@@ -391,12 +393,13 @@ static void dtdReset(DTD *p, const XML_M
 static void
 dtdDestroy(DTD *p, XML_Bool isDocEntity, const XML_Memory_Handling_Suite *ms);
 static int
-dtdCopy(DTD *newDtd, const DTD *oldDtd, const XML_Memory_Handling_Suite *ms);
+dtdCopy(XML_Parser oldParser,
+        DTD *newDtd, const DTD *oldDtd, const XML_Memory_Handling_Suite *ms);
 static int
-copyEntityTable(HASH_TABLE *, STRING_POOL *, const HASH_TABLE *);
-
+copyEntityTable(XML_Parser oldParser,
+                HASH_TABLE *, STRING_POOL *, const HASH_TABLE *);
 static NAMED *
-lookup(HASH_TABLE *table, KEY name, size_t createSize);
+lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize);
 static void FASTCALL
 hashTableInit(HASH_TABLE *, const XML_Memory_Handling_Suite *ms);
 static void FASTCALL hashTableClear(HASH_TABLE *);
@@ -429,11 +432,15 @@ static ELEMENT_TYPE *
 getElementType(XML_Parser parser, const ENCODING *enc,
                const char *ptr, const char *end);
 
+static unsigned long generate_hash_secret_salt(void);
+static XML_Bool startParsing(XML_Parser parser);
+
 static XML_Parser
 parserCreate(const XML_Char *encodingName,
              const XML_Memory_Handling_Suite *memsuite,
              const XML_Char *nameSep,
              DTD *dtd);
+
 static void
 parserInit(XML_Parser parser, const XML_Char *encodingName);
 
@@ -533,6 +540,9 @@ struct XML_ParserStruct {
   NS_ATT *m_nsAtts;
   unsigned long m_nsAttsVersion;
   unsigned char m_nsAttsPower;
+#ifdef XML_ATTR_INFO
+  XML_AttrInfo *m_attInfo;
+#endif
   POSITION m_position;
   STRING_POOL m_tempPool;
   STRING_POOL m_temp2Pool;
@@ -546,6 +556,7 @@ struct XML_ParserStruct {
   XML_Bool m_useForeignDTD;
   enum XML_ParamEntityParsing m_paramEntityParsing;
 #endif
+  unsigned long m_hash_secret_salt;
 };
 
 #define MALLOC(s) (parser->m_mem.malloc_fcn((s)))
@@ -640,6 +651,7 @@ struct XML_ParserStruct {
 #define nsAtts (parser->m_nsAtts)
 #define nsAttsVersion (parser->m_nsAttsVersion)
 #define nsAttsPower (parser->m_nsAttsPower)
+#define attInfo (parser->m_attInfo)
 #define tempPool (parser->m_tempPool)
 #define temp2Pool (parser->m_temp2Pool)
 #define groupConnector (parser->m_groupConnector)
@@ -653,6 +665,7 @@ struct XML_ParserStruct {
 #define useForeignDTD (parser->m_useForeignDTD)
 #define paramEntityParsing (parser->m_paramEntityParsing)
 #endif /* XML_DTD */
+#define hash_secret_salt (parser->m_hash_secret_salt)
 
 XML_Parser XMLCALL
 XML_ParserCreate(const XML_Char *encodingName)
@@ -670,29 +683,42 @@ XML_ParserCreateNS(const XML_Char *encod
 
 static const XML_Char implicitContext[] = {
   ASCII_x, ASCII_m, ASCII_l, ASCII_EQUALS, ASCII_h, ASCII_t, ASCII_t, ASCII_p,
-  ASCII_COLON, ASCII_SLASH, ASCII_SLASH, ASCII_w, ASCII_w, ASCII_w, 
+  ASCII_COLON, ASCII_SLASH, ASCII_SLASH, ASCII_w, ASCII_w, ASCII_w,
   ASCII_PERIOD, ASCII_w, ASCII_3, ASCII_PERIOD, ASCII_o, ASCII_r, ASCII_g,
   ASCII_SLASH, ASCII_X, ASCII_M, ASCII_L, ASCII_SLASH, ASCII_1, ASCII_9,
   ASCII_9, ASCII_8, ASCII_SLASH, ASCII_n, ASCII_a, ASCII_m, ASCII_e,
   ASCII_s, ASCII_p, ASCII_a, ASCII_c, ASCII_e, '\0'
 };
 
+static unsigned long
+generate_hash_secret_salt(void)
+{
+  unsigned int seed = time(NULL) % UINT_MAX;
+  srand(seed);
+  return rand();
+}
+
+static XML_Bool  /* only valid for root parser */
+startParsing(XML_Parser parser)
+{
+    /* hash functions must be initialized before setContext() is called */
+    if (hash_secret_salt == 0)
+      hash_secret_salt = generate_hash_secret_salt();
+    if (ns) {
+      /* implicit context only set for root parser, since child
+         parsers (i.e. external entity parsers) will inherit it
+      */
+      return setContext(parser, implicitContext);
+    }
+    return XML_TRUE;
+}
+
 XML_Parser XMLCALL
 XML_ParserCreate_MM(const XML_Char *encodingName,
                     const XML_Memory_Handling_Suite *memsuite,
                     const XML_Char *nameSep)
 {
-  XML_Parser parser = parserCreate(encodingName, memsuite, nameSep, NULL);
-  if (parser != NULL && ns) {
-    /* implicit context only set for root parser, since child
-       parsers (i.e. external entity parsers) will inherit it
-    */
-    if (!setContext(parser, implicitContext)) {
-      XML_ParserFree(parser);
-      return NULL;
-    }
-  }
-  return parser;
+  return parserCreate(encodingName, memsuite, nameSep, NULL);
 }
 
 static XML_Parser
@@ -737,9 +763,20 @@ parserCreate(const XML_Char *encodingNam
     FREE(parser);
     return NULL;
   }
+#ifdef XML_ATTR_INFO
+  attInfo = (XML_AttrInfo*)MALLOC(attsSize * sizeof(XML_AttrInfo));
+  if (attInfo == NULL) {
+    FREE(atts);
+    FREE(parser);
+    return NULL;
+  }
+#endif
   dataBuf = (XML_Char *)MALLOC(INIT_DATA_BUF_SIZE * sizeof(XML_Char));
   if (dataBuf == NULL) {
     FREE(atts);
+#ifdef XML_ATTR_INFO
+    FREE(attInfo);
+#endif
     FREE(parser);
     return NULL;
   }
@@ -752,6 +789,9 @@ parserCreate(const XML_Char *encodingNam
     if (_dtd == NULL) {
       FREE(dataBuf);
       FREE(atts);
+#ifdef XML_ATTR_INFO
+      FREE(attInfo);
+#endif
       FREE(parser);
       return NULL;
     }
@@ -866,6 +906,7 @@ parserInit(XML_Parser parser, const XML_
   useForeignDTD = XML_FALSE;
   paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
 #endif
+  hash_secret_salt = 0;
 }
 
 /* moves list of bindings to freeBindingList */
@@ -913,7 +954,7 @@ XML_ParserReset(XML_Parser parser, const
   poolClear(&temp2Pool);
   parserInit(parser, encodingName);
   dtdReset(_dtd, &parser->m_mem);
-  return setContext(parser, implicitContext);
+  return XML_TRUE;
 }
 
 enum XML_Status XMLCALL
@@ -982,6 +1023,12 @@ XML_ExternalEntityParserCreate(XML_Parse
   int oldInEntityValue = prologState.inEntityValue;
 #endif
   XML_Bool oldns_triplets = ns_triplets;
+  /* Note that the new parser shares the same hash secret as the old
+     parser, so that dtdCopy and copyEntityTable can lookup values
+     from hash tables associated with either parser without us having
+     to worry which hash secrets each table has.
+  */
+  unsigned long oldhash_secret_salt = hash_secret_salt;
 
 #ifdef XML_DTD
   if (!context)
@@ -1035,13 +1082,14 @@ XML_ExternalEntityParserCreate(XML_Parse
     externalEntityRefHandlerArg = oldExternalEntityRefHandlerArg;
   defaultExpandInternalEntities = oldDefaultExpandInternalEntities;
   ns_triplets = oldns_triplets;
+  hash_secret_salt = oldhash_secret_salt;
   parentParser = oldParser;
 #ifdef XML_DTD
   paramEntityParsing = oldParamEntityParsing;
   prologState.inEntityValue = oldInEntityValue;
   if (context) {
 #endif /* XML_DTD */
-    if (!dtdCopy(_dtd, oldDtd, &parser->m_mem)
+    if (!dtdCopy(oldParser, _dtd, oldDtd, &parser->m_mem)
       || !setContext(parser, context)) {
       XML_ParserFree(parser);
       return NULL;
@@ -1130,6 +1178,9 @@ XML_ParserFree(XML_Parser parser)
 #endif /* XML_DTD */
     dtdDestroy(_dtd, (XML_Bool)!parentParser, &parser->m_mem);
   FREE((void *)atts);
+#ifdef XML_ATTR_INFO
+  FREE((void *)attInfo);
+#endif
   FREE(groupConnector);
   FREE(buffer);
   FREE(dataBuf);
@@ -1210,6 +1261,14 @@ XML_GetIdAttributeIndex(XML_Parser parse
   return idAttIndex;
 }
 
+#ifdef XML_ATTR_INFO
+const XML_AttrInfo * XMLCALL
+XML_GetAttributeInfo(XML_Parser parser)
+{
+  return attInfo;
+}
+#endif
+
 void XMLCALL
 XML_SetElementHandler(XML_Parser parser,
                       XML_StartElementHandler start,
@@ -1426,6 +1485,17 @@ XML_SetParamEntityParsing(XML_Parser par
 #endif
 }
 
+int XMLCALL

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302260043.r1Q0h2GO088626>