IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
In my previous commit that silenced some test output I didn't realize
that doc/examples/Makefile.am was autogenerated.
Also make index.py output deterministic by sorting the glob results.
- Silence test output.
- Clean up after doc/examples tests.
- Adjust expected output for script tests.
- Add missing results for relaxng/pattern3
There are still two test failures I can't comment on:
- regexp/bug316338
- schemas/any4_0
commit c71f9305a99b6aa03cb08fab31106c9c56f1be4f added __XML_EXTERNC
cpp construct which not understood by apibuild, leading to make dist
failures, ask to ignore that construct.
configure.am:
* Explicitly disallow --enable-rebuild-docs when builddir != srcdir, per
what you said about needing to build docs with an in-source build
doc/Makefile.am:
* Ensure that xmlversion.h is in the source tree before running
apibuild.py, to avoid generating an incomplete libxml2-api.xml
* Update the .PHONY target (forgot to do this earlier)
doc/devhelp/Makefile.am:
* Wrap the doc-generating rule in an "if REBUILD_DOCS" conditional so it
doesn't cause trouble for regular users
* Added a handy-dandy "rebuild" target
doc/examples/index.py:
* NOTE: You need to run this script to regenerate the files it creates,
and then commit the newly-updated files! The generated files currently
in git master (e.g. doc/examples/Makefile.am) are out of date even
before this patch!
* index.html really needs to be in EXTRA_DIST
* Wrap the doc-generating rules in an "if REBUILD_DOCS" conditional,
because they shouldn't be active otherwise
I use libxml xpath engine on quite large (and mostly "flat") xml files.
It seems that Shellsort, that is used in xmlXPathNodeSetSort is a
performance bottleneck for my case. I have read some posts about sorting
in libxml in the libxml archive, but I agree that qsort was not the way
to go. I experimented with Timsort instead and my results were good for
me. For about 10000 nodes, my test was about 5x faster with Timsort,
for 1000 nodes about 10% faster, for small data files, the difference
was not measurable.
* timsort.h: the algorithm, kept in a separate header
* xpath.c: plug in the new algorithm in xmlXPathNodeSetSort
* Makefile.am: add the header to the EXTRA_DIST
* doc/apibuild.py: avoid indexing the new header
As suggested by Andrew W. Nosenko:
Proposal: expose the new xmlBufShrink() to the "public" API for
compatibility with xmlBufUse().
Reason: the following scenario:
1. Read something into xmlParserInputBuffer (e.g. using
xmlParserInputBufferRead())
2. Extract content through xmlBufContent()
3. Extract content length through xmlBufUse(). Result have type
'size_t'.
4. Use this content
5. Now, you need to shrink the buffer. How to do it? Doing that
through legacy xmlBufferShrink() is unsafe because it uses 'unsigned
int' and the whole point of introducing the new API was handling the
cases, when 'unsigned int' is not enough. Therefore, need to use the
new xmlBufShrink(). But it is "private".
Therefore, I propose to expose the new xmlBufShrink() in the same way,
as xmlBufContent() and xmlBufUse() are exposed.
doc/Makefile.am:
* Build what's in doc/ before doc/devhelp/, as the dependency graph flows
that way
* Add "--path $(srcdir)" so that xsltproc can find DTDs in srcdir
* Replaced $(top_srcdir)/doc with an equivalent $(srcdir)
* Qualified libxml2-api.xml with $(srcdir) as it's always generated there
* Rewrote the dependencies for libxml2-api.xml so that xmlversion.h
doesn't throw everything off
doc/devhelp/Makefile.am:
* Use Automake constructs to install the HTML files instead of an
install-data-local rule
* Reorganized the file a bit (hello whitespace!)
* EXTRA_DIST doesn't need to list so many files now that dist_devhelp_DATA
is being used
* Only print "Rebuilding devhelp files" if rebuilding is actually
occurring
doc/examples/index.py:
* Make the "this file is auto-generated" banner more prominent
* Autotools updates: Use AM_CPPFLAGS/AM_CFLAGS instead of INCLUDES
* Got rid of DEPS as it's not needed (Automake already sees the dependency
on libxml2.la by way of LDADD(S))
* Replaced LDADDS with LDADD, which is applied to all programs listed
in the file. Since all the test programs have the same link
dependencies, this way is more concise yet equivalent.
* Remove the *.tmp files via "make clean" instead of having the test
programs do it themselves (more on this later)
* Invoke index.py in srcdir, as it pretty much needs to run there
* Restructured the index.html rule so that only the xmllint invocation is
allowed to fail
* Use $(MKDIR_P) instead of $(mkinstalldirs), $(VAR) instead of @VAR@
* Remove symlinks for test?.xml in an out-of-source build
* Sort lists for neatness
* Better formatting for EXTRA_DIST and noinst_PROGRAMS variables
* Simplified the Automake bits printed for each program: *_LDFLAGS doesn't
need to be specified as it's empty anyway, *_DEPENDENCIES is redundant,
*_LDADD isn't needed due to the global LDADD
* Added a bit that symlinks in test?.xml from srcdir in out-of-source
builds. This allows the reader4 test to read these files in the current
directory, which ensures that the output always looks the same (i.e.
does not contain references to srcdir)
* Don't hide the test program invocation (or else it's hard to tell which
test failed), and don't use superfluous parentheses
* NOTE: If you check in these changes, be sure to run this script and also
check in the updated files that it generates!
doc/examples/*.c:
* Updated the test: lines so that
+ "&&" is used to separate commands instead of ";" so that errors are
not masked
+ reference files are qualified with $(srcdir)/
+ no "rm" takes place -- these are a problem because (1) if a test
fails, it's useful to have the output file ready for inspection; (2)
the "rm" invocation masks a potential non-zero exit status from diff
(This is why I added the CLEANFILES line above)
doc/examples/io1.res:
* Updated this ref file so that the test passes. (This is correct, right?)
doc/examples/reader4.res:
* Changed this back to its original form, as the symlinking of test?.xml
means this file no longer has to contain path prefixes on the filenames
doc/examples/testWriter.c:
* Changed the output filenames to *.tmp instead of *.res, partly for
consistency, partly to not have to add special cases to CLEANFILES
doc/examples/xpath1.c:
* Removed the "./" prefix on the test invocation, which is redundant as
index.py already adds one
Things now work correctly at the xmllint level:
thinkpad:~/XML -> xmllint --sax --noout --schema test_schema.xsd
test_xml.xml
test_xml.xml:72721: Schemas validity error : Element 'level1': Missing
child element(s). Expected is ( level2 ).
test_xml.xml fails to validate
thinkpad:~/XML -> xmllint --stream --schema test_schema.xsd test_xml.xml
test_xml.xml:72721: Schemas validity error : Element 'level1': Missing
child element(s). Expected is ( level2 ).
test_xml.xml fails to validate
thinkpad:~/XML ->
* error.c: fix a corner case of not reporting lines when we should
* include/libxml/xmlschemas.h doc/symbols.xml: had to add new entry
points to set the filename on a validation context and a locator
callback used to fetch the line and file from the context
* xmlschemas.c: add the new entry points xmlSchemaValidateSetFilename()
and xmlSchemaValidateSetLocator(), plus make sure the error reporting
routine gets the information if available. Add a locator for SAX.
* xmlreader.c: add and plug a locator for readers.
Various cleanups
* configure.in: force regeneration of APIs in my environment
* buf.c buf.h enc.h encoding.c include/libxml/tree.h
include/libxml/xmlerror.h save.h tree.c: various comment cleanups
pointed by apibuild
* doc/apibuild.py: added the 3 new internal headers in the excludes
* doc/libxml2-api.xml doc/libxml2-refs.xml: regenerated the API
* doc/symbols.xml: listing new entry points for 2.9.0
* doc/devhelp/*: regenerated
doc/examples/Makefile.am:
* Use $(VAR), not @VAR@
* Use $(MKDIR_P) instead of $(mkinstalldirs), as the latter is an
* obsolete
name
* Added $(srcdir) qualification to the various test program invocations
* in
the "tests" target. More work is needed here (notably, when the
reference output contains the path to the input file), but this gets
things a lot closer to working correctly in an out-of-source build.
doc/examples/reader4.res:
* Added "./" path qualifiers so that the reader4 test continues to pass
cleanly for in-source builds
python/tests/Makefile.am:
* Symlink in test input files for out-of-source builds
Makefile.am:
* Don't use @VAR@, use $(VAR). Autoconf's AC_SUBST provides us the Make
variable, it allows overriding the value at the command line, and
(notably) it avoids a Make parse error in the libxml2_la_LDFLAGS
assignment when @MODULE_PLATFORM_LIBS@ is empty
* Changed how the THREADS_W32 mechanism switches the build between
testThreads.c and testThreadsWin32.c as appropriate; using AM_CONDITIONAL
allows this to work cleanly and plays well with dependencies
* testapi.c should be specified as BUILT_SOURCES
* Create symlinks to the test/ and result/ subdirs so that the runtests
target is usable in out-of-source-tree builds
* Don't do MAKEFLAGS+=--silent as this is not portable to non-GNU Makes
* Fixed incorrect find(1) syntax in the "cleanup" rule, and doing "rm -f"
instead of just "rm" is good form
* (DIST)CLEANFILES needed a bit more coverage to allow "make distcheck" to
pass
configure.in:
* Need AC_PROG_LN_S to create test/ and result/ symlinks in Makefile.am
* AC_LIBTOOL_WIN32_DLL and AM_PROG_LIBTOOL are obsolete; these have been
superceded by LT_INIT
* Don't rebuild docs by default, as this requires GNU Make (as
implemented)
* Check for uint32_t as some platforms don't provide it
* Check for some more functions, and undefine HAVE_MMAP if we don't also
HAVE_MUNMAP (one system I tested on actually needed this)
* Changed THREADS_W32 from a filename insert into an Automake conditional
* The "Copyright" file will not be in the current directory if builddir !=
srcdir
doc/Makefile.am:
* EXTRA_DIST cannot use wildcards when they refer to generated files; this
breaks dependencies. What I did was define EXTRA_DIST_wc, which uses GNU
Make $(wildcard) directives to build up a list of files, and EXTRA_DIST,
as a literal expansion of EXTRA_DIST_wc. I also added a new rule,
"check-extra-dist", to simplify checking that the two variables are
equivalent. (Note that this works only when builddir == srcdir)
(I can implement this differently if desired; this is just one way of
doing it)
* Don't define an "all" target; this steps on Automake's toes
* Fixed up the "libxml2-api.xml ..." rule by using $(wildcard) for
dependencies (as Make doesn't process the wildcards otherwise) and
qualifying appropriate files with $(srcdir)
(Note that $(srcdir) is not needed in the dependencies, thanks to VPATH,
which we can count on as this is GNU-Make-only code anyway)
doc/devhelp/Makefile.am:
* Qualified appropriate files with $(srcdir)
* Added an "uninstall-local" rule so that "make distcheck" passes
doc/examples/Makefile.am:
* Rather than use a wildcard that doesn't work, use a substitution that
most Make programs can handle
doc/examples/index.py:
* Do the same here
include/libxml/nanoftp.h:
* Some platforms (e.g. MSVC 6) already #define INVALID_SOCKET:
user@host:/cygdrive/c/Program Files/Microsoft Visual Studio/VC98/\
Include$ grep -R INVALID_SOCKET .
./WINSOCK.H:#define INVALID_SOCKET (SOCKET)(~0)
./WINSOCK2.H:#define INVALID_SOCKET (SOCKET)(~0)
include/libxml/xmlversion.h.in:
* Support ancient GCCs (I was actually able to build the library with 2.5
but for this bit)
python/Makefile.am:
* Expanded CLEANFILES to allow "make distcheck" to pass
python/tests/Makefile.am:
* Define CLEANFILES instead of a "clean" rule, and added tmp.xml to allow
"make distcheck" to pass
testRelax.c:
* Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H (as some
systems have the header but not the function)
testSchemas.c:
* Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H
testapi.c:
* Don't use putenv() if it's not available
threads.c:
* This fixes the following build error on Solaris 8:
libtool: compile: cc -DHAVE_CONFIG_H -I. -I./include -I./include \
-D_REENTRANT -D__EXTENSIONS__ -D_REENTRANT -Dsparc -Xa -mt -v \
-xarch=v9 -xcrossfile -xO5 -c threads.c -KPIC -DPIC -o threads.o
"threads.c", line 442: controlling expressions must have scalar type
"threads.c", line 512: controlling expressions must have scalar type
cc: acomp failed for threads.c
*** Error code 1
trio.c:
* Define isascii() if the system doesn't provide it
trio.h:
* The trio library's HAVE_CONFIG_H header is not the same as LibXML2's
HAVE_CONFIG_H header; this change is needed to avoid a double-inclusion
win32/configure.js:
* Added support for the LZMA compression option
win32/Makefile.{bcb,mingw,msvc}:
* Added appropriate bits to support WITH_LZMA=1
* Install the header files under $(INCPREFIX)\libxml2\libxml instead of
$(INCPREFIX)\libxml, to mirror the install location on Unix+Autotools
xml2-config.in:
* @MODULE_PLATFORM_LIBS@ (usually "-ldl") needs to be in there in order for
`xml2-config --libs` to provide a complete set of dependencies
xmllint.c:
* Use HAVE_MMAP instead of the less-explicit HAVE_SYS_MMAN_H
In Windows 64 a socket is no more represented by an int,
this breaks the nanoftp API and nanoftp/nanohttp, the patch
changes this and fix the API for Win64
Regenerated the XML and documentation as a result too.