1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 12:25:09 +03:00
Commit Graph

6873 Commits

Author SHA1 Message Date
Nick Wellnhofer
0a279e2f68 tests: Remove old timing tests 2024-06-22 21:59:03 +02:00
Nick Wellnhofer
f06fc933cd tests: Move tests for executables to separate script
Move tests for xmllint shell and xmlcatalog to separate scripts and
enabled them in Autotools.
2024-06-22 21:59:03 +02:00
Nick Wellnhofer
2d96adb27b windows: fopen files with "wb" 2024-06-22 21:29:27 +02:00
Nick Wellnhofer
5589c9ea6f xmllint: Set stdin/stdout to binary on Windows 2024-06-22 21:23:15 +02:00
Nick Wellnhofer
4b6e68282b cmake: Stop using win32config.h
Move this file to the win32 subdirectory.
2024-06-22 18:41:00 +02:00
Nick Wellnhofer
84a4f84c1c build: Don't check for required headers and functions
Unless we are on Windows, the following POSIX headers are required.
They're part of the earliest POSIX specs and it doesn't make sense to
check for them.

- fcntl.h
- unistd.h
- sys/stat.h
- sys/time.h

On Windows, io.h, fcntl.h and sys/stat.h are always available.
2024-06-22 18:41:00 +02:00
Nick Wellnhofer
f23fc4faed xmllint: Simplify time handling
Assume that gettimeofday is always available.
2024-06-22 18:41:00 +02:00
Nick Wellnhofer
dc6f55cf6e build: Remove check for IPv6
Only check for availability of netdb.h.
2024-06-22 18:41:00 +02:00
Nick Wellnhofer
02326d72d3 build: Remove socklen_t checks
socklen_t has been mandated by POSIX for ages. Always use "socklen_t" or
"int" on Win32.
2024-06-22 00:40:40 +02:00
Nick Wellnhofer
b01b55d50e README: Fix Meson examples 2024-06-22 00:12:57 +02:00
Rosen Penev
88cc61e3e6 meson: simplify thread_local check
Use a simple loop.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-21 14:48:31 -07:00
Rosen Penev
34fe4b8863 meson: simplify IPv6 check
We only need to find AF_INET6. Also make it a feature.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-21 14:48:30 -07:00
Rosen Penev
609c51c587 meson: simplify socklen_t check
Use a simple loop.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-21 14:39:08 -07:00
Nick Wellnhofer
9d46da1726 ci: Test meson build with legacy enabled 2024-06-21 23:13:34 +02:00
Nick Wellnhofer
c2ccbc0fed meson: Implement option dependencies
This also removes the FreeBSD hack.
2024-06-21 23:13:17 +02:00
Nick Wellnhofer
f9c33a5519 parser: Undeprecate some xmlParserInput members 2024-06-21 18:25:11 +02:00
Nick Wellnhofer
1228b4e0e7 parser: Deprecate xmlParserCtxt->lastError
We alredy have xmlCtxtGetLastError().
2024-06-21 18:22:04 +02:00
Nick Wellnhofer
f82ca02bf5 parser: Undeprecate some xmlParserCtxt members
These are essential for SAX parsers.
2024-06-21 18:17:11 +02:00
Nick Wellnhofer
7ba6c8feea autotools: Remove libxml-2.0-uninstalled.pc 2024-06-21 13:51:09 +02:00
Nick Wellnhofer
c106455c25 build: Set Cflags.private on Windows 2024-06-21 13:51:09 +02:00
Nick Wellnhofer
1a5ed74717 build: Fix XML_LIBDIR usage 2024-06-21 13:48:22 +02:00
Nick Wellnhofer
fc4bd04bdd autotools: Remove unused variable 2024-06-21 13:48:22 +02:00
Nick Wellnhofer
4c1b88513f autotools: Move MODULE_PLATFORM_LIBS into NON_PC_LIBS 2024-06-21 13:48:22 +02:00
Nick Wellnhofer
29bf09ec44 autotools: Remove XML_LIBTOOLLIBS 2024-06-21 13:48:22 +02:00
Nick Wellnhofer
02f519e67b autotools: Use pkg-config to check for libreadline
This handles static linking properly and avoids overlinking.

Change the --with-readline default to no as it was before and raise an
error if libreadline couldn't be found.

Do the same for libhistory.
2024-06-21 13:48:22 +02:00
Rosen Penev
2def7b4b28 clang-tidy: move assignments out of if
Found with bugprone-assignment-in-if-condition

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-20 21:11:44 -07:00
Rosen Penev
5803ad26b5 meson: change history to a feature
Simpler.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-21 00:12:58 +00:00
Rosen Penev
e9948ee56c meson: change readline to a feature
Simpler and easier to force enable.

Also removed wrong curses check. This is meant for static readline and
not needed with meson.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-21 00:12:58 +00:00
Rosen Penev
5d542feff1 libxml: define ATTRIBUTE_UNUSED for clang
Silences warnings under Clang on Windows.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-20 15:24:15 -07:00
Mike Dalessio
bbbbbb4649 parser: implement xmlCtxtGetOptions
In 712a31ab, the `options` struct member was deprecated. To allow
callers to check the status of options bits, introduce
xmlCtxtGetOptions.
2024-06-20 20:39:54 +00:00
Heiko Becker
a4517bfeaf meson: Add libxml2 part of include dir to pc file
The autotools build results in a pkgconfig file, which looks like this:

"
...
includedir=${prefix}/include
...
Cflags: -I${includedir}/libxml2
"

The latter part is missing when built with meson.
2024-06-20 20:38:19 +00:00
Rosen Penev
217e9b7af2 clang-tidy: don't return in void functions
Found with readability-redundant-control-flow

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-20 20:37:34 +00:00
Nick Wellnhofer
4c3d22b059 uri: Fix xmlBuildURI with NULL base
Don't try to parse URI if base is NULL. Fixes functions like xmlParseDTD
with certain filenames.

Should fix #742.
2024-06-20 21:15:08 +02:00
Nick Wellnhofer
1dd5e76a69 xinclude: Don't remove root element
Don't replace include element at root with empty nodeset.
2024-06-18 20:12:03 +02:00
Nick Wellnhofer
860fb460ea SAX2: Fix null deref after malloc failure
Short-lived regression.
2024-06-18 20:00:45 +02:00
Rosen Penev
1d8bd1262b meson: fix icu and iconv om BSDs again
libdir is needed when searching for iconv, not includedir.

Remove OpenBSD from the bsd list. Something is wrong there and iconv.h
is installed somewhere else.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-18 11:12:07 +00:00
Rosen Penev
f61d23b8c6 meson: only apply threads_dep to runtest
Not needed elsewhere.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-17 12:57:59 -07:00
Nick Wellnhofer
32cac377c8 parser: Selectively reenable reading from "-"
Make filename "-" mean stdin for legacy SAX1 functions and xmlReadFile.
This should hopefully fix most command line utilities.

See #737.
2024-06-17 18:08:31 +02:00
Nick Wellnhofer
52ce0d70f9 tests: Add XInclude test for issue #733 2024-06-17 17:35:12 +02:00
Nick Wellnhofer
c5e9a5b2c9 parser: Use catalogs with resource loader 2024-06-17 15:49:25 +02:00
Nick Wellnhofer
57004006ae reader: Fix xmlTextReaderReadString
Regressed in commit 7cbf609a.

Should fix #738.
2024-06-17 15:49:03 +02:00
Nick Wellnhofer
3c7c831c7c xinclude: Set XPath context doc
Regressed in commit 78eab7a1.
2024-06-17 15:47:43 +02:00
Nick Wellnhofer
6deebe036a parser: Make xmlInputCreateUrl handle HTTP input 2024-06-17 15:47:43 +02:00
Nick Wellnhofer
d2fd9d37b0 parser: Fix swapped arguments 2024-06-17 15:47:43 +02:00
Nick Wellnhofer
1ff484339e xinclude: Load included documents with XML_PARSE_DTDLOAD
We must detect ID attributes declared in external DTDs.

Regressed in 12f0bb94.
2024-06-17 15:47:43 +02:00
Nick Wellnhofer
3aca5bcfc3 doc: Ignore empty headers 2024-06-17 15:47:43 +02:00
Nick Wellnhofer
5a9a0e6fe6 testapi: Don't test xmlunicode functions 2024-06-17 15:47:42 +02:00
Nick Wellnhofer
1112699cfa legacy: Remove most legacy functions from public headers
Also remove warning messages.
2024-06-17 15:47:42 +02:00
Rosen Penev
b4b4162fc7 meson: fix compilation on BSDs with icu+iconv
on BSDs, icu is installed and included from /usr/local. When found,
libiconv headers override the normal ones and thus result in a missing
link. Work around this oddity and add the link.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-16 19:47:47 -07:00
Rosen Penev
915951b87b meson: add DEFS to CFLAGS
Adding a configuration flag as an include directory is wrong and errors
on BSDs.

ERROR: Include dir -DU_DISABLE_RENAMING=1 does not exist.

Matches the autotools build now.

Requires has_argument to fix non BSDs because of an annoying meson
quirk.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-16 19:43:44 -07:00