Nick Wellnhofer
2b0c4abb1f
threads: Remove pthread weak symbol hack
...
On Linux, we tried to detect the presence of libpthread to disable
things like locks. This questionable hack doesn't work since glibc 2.34
which merged libpthread into libc.
2024-06-17 00:54:47 +02:00
Nick Wellnhofer
3848802723
xmllint: Support libreadline without history
2024-06-17 00:54:47 +02:00
Nick Wellnhofer
5fca9498fd
doc: Hide internal macro
2024-06-16 19:56:08 +02:00
Nick Wellnhofer
fb2b9cdabf
doc: Remove broken struct field description
2024-06-16 19:51:44 +02:00
Nick Wellnhofer
33a1f8978d
legacy: Merge SAX.c into legacy.c
2024-06-16 19:17:41 +02:00
Nick Wellnhofer
1341deac13
xmllint: Move shell to xmllint
...
Move source code for xmllint shell to shell.c and move it from the
libxml2 library to the xmllint executable.
Also allow shell to run without XPath and debug modules.
Add stubs for old shell API functions in legacy build mode.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
c9b065914f
xmllint: Fix resetting error in xmlHTMLPrintError
...
Make sure that we don't change the error handler when fuzzing.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
481fd6bbee
tests: Remove testThreads.c
...
This was merged into runtest.c some time ago.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
1b6403583b
schemas: Stop using xmlValidateNotationUse
...
Simplify symbol availability logic.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
fa01278dcd
regexp: Hide experimental legacy code
...
This was never made public.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
10d60d15d6
regexp: Stop using LIBXML_AUTOMATA_ENABLED
...
This macro always equals LIBXML_REGEXP_ENABLED.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
11c3f84b6c
SAX2: Always make xmlSAX2{Start,End}Element public
...
Simplify symbol availability logic.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
f307237e14
schemas: Use private copy of global NaN and Inf
...
Simplify symbol availability logic.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
b0fc67aa22
build: Remove --with-tree configuration option
...
This option would allow for a smaller, but mostly useless minimal build.
But it complicates the symbol availability logic in an insane way and
requires specialized tools like our custom C parser in doc/apibuild.py.
See #717 .
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
7cf7a54aea
build: Only enable linker version script in legacy mode
...
The version script is deprecated but required for backward
compatibility.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
7b65c90f2a
Regenerate libxml2-api.xml and testapi.c
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
4967277931
parser: Make XML_INPUT constants signed
...
Avoid conversion to unsigned which triggers (harmless) UBSan warnings.
2024-06-16 18:47:12 +02:00
Rosen Penev
52d9d768a7
runtest: move catalog.h out of threads define.
...
It's needed when threads are disabled.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-15 16:46:03 -07:00
Nick Wellnhofer
08a6a0848e
Fix previous commit
2024-06-15 22:00:00 +02:00
Nick Wellnhofer
84666581c2
catalog: Fix initialization
...
Initialize mutex via xmlInitParser.
Fix some other initialization calls.
2024-06-15 21:15:26 +02:00
Nick Wellnhofer
898e5a1442
build: Remove compiler TLS warning
2024-06-15 20:17:18 +02:00
Nick Wellnhofer
e714f506e4
build: Stop installing libxml.m4
...
This file is deprecated and unmaintained. It will be kept in the source
tree for a while.
2024-06-15 20:14:03 +02:00
Nick Wellnhofer
6ed39a82c6
runtest: Allow catalogs
...
It's enough to disable the system catalog to avoid unwanted allocations.
2024-06-15 19:41:47 +02:00
Nick Wellnhofer
208f27f964
include: Don't define ATTRIBUTE_UNUSED in public header
...
Stop polluting namespace with unprefixed names.
2024-06-15 19:13:08 +02:00
Nick Wellnhofer
387f0c784f
include: Readd circular dependency between tree.h and parser.h
...
There are dozens of downstream projects that only include tree.h but use
declarations from parser.h. This broke after the recent cleanup of
circular dependencies.
Make tree.h include parser.h again. This is a hack but doesn't change
the include directory struture.
This commit only made it into the 2.12 branch but wasn't applied to
master, so the issue turned up in 2.13.0 again.
Should fix #734 .
2024-06-15 16:27:54 +02:00
Nick Wellnhofer
bd208d5fe1
xinclude: Add another missing include
2024-06-15 01:40:06 +02:00
Nick Wellnhofer
f070acc564
autotools: Abort if external libraries couldn't be found
...
This makes the configuration process more robust and deterministic.
Before, we would silently disable options.
2024-06-15 01:23:39 +02:00
Jan Alexander Steffens (heftig)
599ceaffad
xinclude: Add missing include
...
Gambas fails to compile with
error: 'xmlStructuredErrorFunc' has not been declared
2024-06-15 00:59:54 +02:00
Ryan Carsten Schmidt
86c4cf58ec
Fix typo in NEWS (--with-html -> --with-http)
2024-06-14 16:35:11 -05:00
Miklos Vajna
7e83a08994
win32, msvc: fix missing linking against Bcrypt.lib
...
Fixes this link error:
dict.obj : error LNK2019: unresolved external symbol BCryptGenRandom referenced in function xmlInitRandom
Commit 2e9e758d1ecb52b73a43db79d326c18d7d94c8d7 (dict: Get random seed
from system PRNG, 2023-12-24) updated cmake, but not nmake, correct
this.
2024-06-14 22:31:52 +02:00
Nick Wellnhofer
1aa37db04c
xinclude: Don't raise error on empty nodeset
...
xmlXPtrEval returning NULL means an empty nodeset if no error code is
set.
See #733 .
2024-06-14 20:55:29 +02:00
Nick Wellnhofer
2608baaf92
parser: Make failure to load main document a warning
...
Revert the change that made failures to load the main document an error.
This fixes the --path option of xmllint and xsltproc.
Should fix #733 .
2024-06-14 20:06:07 +02:00
Nick Wellnhofer
2f12809612
tree: Fix freeing entities via xmlFreeNode
...
Call xmlFreeEntity to free all entity members.
Fixes #731 .
2024-06-14 16:44:09 +02:00
Nick Wellnhofer
039ce1e821
parser: Pass global object to sax->setDocumentLocator
...
Revert part of commit c011e760.
Fixes #732 .
2024-06-14 16:41:43 +02:00
Nick Wellnhofer
3b4a84e4b7
encoding: Deprecate xmlCharEncodingHandler members
2024-06-13 18:09:17 +02:00
Nick Wellnhofer
b34dc1e4a3
tree: Deprecate xmlBuffer members
2024-06-13 18:09:17 +02:00
Nick Wellnhofer
712a31abe4
parser: Deprecate most public struct members
...
This will probably cause many warnings in downstream code abusing
libxml2 internals, but we can always undeprecate some members later.
2024-06-13 18:04:34 +02:00
Nick Wellnhofer
df40f64edf
fuzz: Avoid accessing internal struct members
...
Switch to xmlNewIOInputStream.
2024-06-13 18:01:23 +02:00
Nick Wellnhofer
0c97eaa772
xmllint: Rewrite HTML error output
2024-06-13 16:57:52 +02:00
Nick Wellnhofer
1c1794964e
xlink: Deprecate xlinkGetDefault*
...
These functions read an otherwise unused global and seem useless.
2024-06-12 19:55:47 +02:00
Nick Wellnhofer
046663bc54
xlink: Deprecate xlinkSetDefault*
...
These functions set an otherwise unused global and seem useless.
2024-06-12 19:43:22 +02:00
Nick Wellnhofer
669bd34993
xpointer: Remove support for XPointer locations
...
The latest spec for what it essentially an XPath extension seems to be
this working draft from 2002:
https://www.w3.org/TR/xptr-xpointer/
The xpointer() scheme is listed as "being reviewed" in the XPointer
registry since at least 2006. libxml2 seems to be the only modern
software that tries to implement this spec, but the code has many bugs
and quality issues.
If you configure --with-legacy, old symbols are retained for ABI
compatibility.
2024-06-12 18:20:01 +02:00
Nick Wellnhofer
dba1ed85a3
ftp: Remove FTP support
...
Remove the built-in FTP client. If you configure --with-legacy, old
symbols are retained for ABI compatibility.
2024-06-12 18:19:55 +02:00
Nick Wellnhofer
5238404325
parser: Pass resource type to resource loader
2024-06-12 16:36:12 +02:00
Nick Wellnhofer
f96dca9c0e
xmllint: Switch to resource loader
2024-06-12 16:36:12 +02:00
Nick Wellnhofer
ab5e6debd1
parser: Introduce XML_INPUT_NETWORK input flag
...
This allows to disable network access when creating parser inputs with
xmlInputCreateUrl.
2024-06-12 16:36:12 +02:00
Nick Wellnhofer
780e432a5c
fuzz: Move to per-context error handler
2024-06-12 16:36:12 +02:00
Nick Wellnhofer
116d8c0166
fuzz: Move to per-context resource loader
2024-06-12 16:36:12 +02:00
Nick Wellnhofer
89fcae4dfd
parser: Don't report malloc failures when creating context
...
We don't want messages to stderr before an error handler could be set on
a parser context.
2024-06-12 16:36:12 +02:00
Nick Wellnhofer
ef8dc4f673
schemas: Add callbacks for resource loader
2024-06-12 16:36:12 +02:00