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

83 Commits

Author SHA1 Message Date
Nick Wellnhofer
0f568c0b73 Consolidate private header files
Private functions were previously declared

- in header files in the root directory
- in public headers guarded with IN_LIBXML
- in libxml.h
- redundantly in source files that used them.

Consolidate all private header files in include/private.
2022-08-26 02:11:56 +02:00
Nick Wellnhofer
2bea68afb5 Bump version to 2.11.0
This will be the next release cut from the master branch.
2022-08-25 13:53:38 +02:00
Nick Wellnhofer
ae383bdb74 Release v2.10.0 2022-08-17 13:22:20 +02:00
Nick Wellnhofer
3c4e4bb726 Fix build with older pkg-config versions
The PKG_CHECK_VAR macro was introduced in pkg-config 0.28. Guard the
invocation with m4_ifdef.

Fixes #374.
2022-08-05 16:24:51 +02:00
Nick Wellnhofer
670701075b Add configuration flag for XPointer locations support
Add a new configuration flag that controls whether the outdated support
for XPointer locations (ranges and points) is enabled.

    --with-xptr-locs          # Autotools
    LIBXML2_WITH_XPTR_LOCS    # CMake

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.

The flag defaults to "off" and support for this extensions has to be
requested explicitly. The relevant API functions are deprecated.
2022-04-21 02:41:58 +02:00
Christopher Degawa
f60e219325 configure: move XML_PRIVATE_LIBS after WIN32_EXTRA_LIBADD is set
currently the pkg-config file lacks -lws2_32 because WIN32_EXTRA_LIBADD
isn't set by the time XML_PRIVATE_LIBS is set

Signed-off-by: Christopher Degawa <ccom@randomderp.com>
2022-04-04 02:40:16 +00:00
Nick Wellnhofer
5ce893c0c4 Move regexp tests to runtest 2022-04-04 04:28:15 +02:00
Nick Wellnhofer
0cca7b511c Move testModule to new test suite
Invoke testModule when the modern test suite is run with 'make check'.
2022-04-04 04:18:07 +02:00
Nick Wellnhofer
f23ca9f9ea Move testThreads to new test suite
Invoke testThreads when the modern test suite is run with 'make check'.
2022-04-04 04:18:07 +02:00
Nick Wellnhofer
48b03c8479 Remove major parts of old test suite
Remove all the parts of the old test suite which are covered by
runtest.c for quite some time.

The following test programs are removed:

- testC14N
- testHTML
- testReader
- testRelax
- testSAX
- testSchemas
- testURI
- testXPath

This also removes a few results of unimportant tests only run by the old
test suite.
2022-04-04 04:14:55 +02:00
Nick Wellnhofer
1db151aceb Remove LIBS from XML_PRIVATE_LIBS 2022-04-03 14:37:45 +02:00
Nick Wellnhofer
cf6cd81c3e Add WIN32_EXTRA_LIBADD to XML_PRIVATE_LIBS 2022-04-03 14:08:45 +02:00
David Seifert
d47c52ac2b Avoid obsolescent test -a constructs
* POSIX calls the `-a` operator obsolescent and strongly discourages
  its use, instead recommending chaining `test` calls instead:
  https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html
2022-04-02 19:43:06 +00:00
Nick Wellnhofer
c8ccb727b1 Move AM_MAINTAINER_MODE to AM section 2022-04-02 18:03:44 +02:00
James Hilliard
0f04d5a12b configure: check for icu DEFS
In some cases we need to add additional defs to build against icu if
icu has certain options configured.

ICU warns about this when building:

*** WARNING: You must set the following flags before code compiled against this ICU will function properly:

    -DU_DISABLE_RENAMING=1

We can fetch these flags from the icu pkgconfig and add them if
required.

This fixes symbol errors if ICU is built without renaming.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
2022-04-02 15:54:37 +00:00
David Seifert
5ccdfa43ff configure.ac: produce tar.xz only (GNOME policy)
* This is part of a policy from 2011:
  https://mail.gnome.org/archives/distributor-list/2011-September/msg00000.html
2022-04-02 15:00:59 +00:00
David Seifert
7bce30083a configure.ac: make AM_SILENT_RULES([yes]) unconditional
* No need to support Automake 1.10 anymore.
2022-04-02 15:00:59 +00:00
Nick Wellnhofer
1366c5693d Don't try to recreate COPYING symlink
Since automake is initialized with "foreign" for quite some while,
it shouldn't touch these files anymore.
2022-04-02 15:36:22 +02:00
David Seifert
5c71ada83a
Detect libm using libtool's macros 2022-03-30 16:51:17 +02:00
David Seifert
dff686883c
configure.ac: disable static libraries by default 2022-03-30 16:51:16 +02:00
David Seifert
9e30435358
python/Makefile.am: rely on global AM_INIT_AUTOMAKE
* Even Debian oldoldstable has Automake 1.15 available nowadays.
2022-03-30 16:51:14 +02:00
David Seifert
7a4037bea2
configure.ac: remove useless AC_SUBST
* CPPFLAGS/LDFLAGS are always substituted
2022-03-30 16:51:12 +02:00
Nick Wellnhofer
456a0bf6cb Remove --with-html-dir option
Install documentation in $(docdir).
2022-03-29 16:24:19 +02:00
Nick Wellnhofer
7458096766 Rework documentation build system
Since several generated files are under version control, their
timestamps are essentially random and rebuilding documentation using
Makefile rules can't work reliably. Simply add a phony rebuild target
that regenerates the whole documentation and other files
unconditionally.

    make -C doc rebuild
2022-03-29 16:24:19 +02:00
David Seifert
d9335077dd
Use AM_PATH_PYTHON/PKG_CHECK_MODULES for python bindings
* `AM_PATH_PYTHON` is a much more common idiom for building
  and installing python modules than writing your own.
* It also makes cross-compiling the python bindings possible.
  Previously the `PYTHON_CFLAGS`/`PYTHON_LIBS` would have been
  based on the `--build` python and not the `--host` python.
  By using `pkg-config`, we can always redirect the python-X.Y.pc.

Bug: https://bugs.gentoo.org/582130
2022-03-29 13:37:16 +02:00
Nick Wellnhofer
4a8c71eb7c Remove DOCBparser
This code has been broken and deprecated since version 2.6.0, released
in 2003. Because of a bug in commit 961b535c, DOCBparser.c was never
compiled since 2012. I couldn't find a Debian package using any of its
symbols, so it seems safe to remove this module.
2022-03-04 22:56:21 +01:00
Nick Wellnhofer
21ddad5284 Remove ICONV_CONST test
We can simply cast the offending pointer to (void *).
2022-03-04 22:08:58 +01:00
Nick Wellnhofer
5c009c668b Remove obsolete AC_HEADER checks 2022-03-02 01:31:56 +01:00
Nick Wellnhofer
72119afe00 Don't check for standard C89 library functions
Don't check for

- fprintf
- localtime
- printf
- rand
- sprintf
- srand
- sscanf
- strftime
- time
- vfprintf
- vsprintf

If the C99 functions snprintf and vsnprintf are missing, Trio is
enabled.
2022-03-02 01:14:08 +01:00
Nick Wellnhofer
776d15d383 Don't check for standard C89 headers
Don't check for

- ctype.h
- errno.h
- float.h
- limits.h
- math.h
- signal.h
- stdarg.h
- stdlib.h
- string.h
- time.h

Stop including non-standard headers

- malloc.h
- strings.h
2022-03-02 00:43:54 +01:00
Nick Wellnhofer
b66ce0bba8 Don't include ICU headers in public headers
There's no need to make these implementation details public.
2022-03-01 13:02:49 +01:00
Nick Wellnhofer
6117700e2c Remove special configuration for certain maintainers 2022-02-20 21:49:05 +01:00
Nick Wellnhofer
aeaf02c0a3 Disable docbook support by default
The docbook code is broken and has been deprecated for years.
2022-02-20 21:49:04 +01:00
Nick Wellnhofer
96889d195b Disable legacy support by default
If you need support for legacy APIs, you have to enable it explicitly:

    ./configure --with-legacy
2022-02-20 21:49:04 +01:00
Nick Wellnhofer
a0a0f3be93 Disable FTP support by default
In the unlikely case that you really need FTP support, you have to
enable it explicitly with:

    ./configure --with-ftp
2022-02-20 21:49:04 +01:00
Nick Wellnhofer
a075d256fd Release v2.9.13 2022-02-19 19:26:42 +01:00
Nick Wellnhofer
85a35ba068 Support custom prefix when installing Python module
Also fixes make distcheck.
2022-02-14 17:44:29 +01:00
Nick Wellnhofer
7fe9addcbc Remove CVS and SVN-related code 2022-02-13 23:35:18 +01:00
Nick Wellnhofer
97fe12791a Remove wrong tarname from AC_INIT
Remove the "tarname" added in commit 7c0253aa. Having a tarname
including a version number would result in tarballs named
libxml2-2.9.12-2.9.12.tar.gz.

This change also means that documentation will now be installed in
$(datadir)/doc/libxml2 instead of $(datadir)/doc/libxml2-$(version).
Having a version number in the documentation directory doesn't seem
helpful. The new location also matches the default autotools $(docdir).
2022-01-20 16:16:52 +01:00
Mattia Rizzolo
7c0253aadf Refactor the settings of $docdir
This is a completely noop change for this project, since before this
commit nothing was using $docdir nor PROGRAM_TARNAME.

Setting the fourth parameter of AC_INIT() makes it set PROGRAM_TARNAME,
which then used as the last path component of the default docdir,
effectively making $docdir be the same as the previous
$BASE_DIR/$DOC_MODULE.

Signed-off-by: Mattia Rizzolo <mattia@mapreri.org>
2022-01-16 14:47:35 +01:00
Ben Boeckel
51c88c6f8d configure: remove unused checks for functions
Nothing uses the results from these checks, so remove the checks. There
are some "uses" in order to suppress macro shadowing in MSVC's
implementation of `isinf` and `isnan` as macros, but those are
hard-coded and do not require checks to manage.
2022-01-16 14:34:37 +01:00
Ben Boeckel
1a013ba711 configure: remove unused checks for libraries
These libraries are queried for, but no code cares about the results, so
remove the checks.
2022-01-16 14:34:37 +01:00
Ben Boeckel
9669bd68a3 configure: remove unused checks for headers
These headers are checked for at configure time, but the code never
cares about the results of these checks, so skip them.
2022-01-16 14:34:37 +01:00
Daniel Veillard
b48e77cf4f Release of libxml2-2.9.12
Brown paper bag release, some recently added sources were missing from
the 2.9.11 tarball:
- configure.ac: bump version
- fuzz/Makefile.am: add fuzz.h and seed/regexp to EXTRA_DIST
2021-05-13 20:56:16 +02:00
Daniel Veillard
e1bcffea18 Release of libxml2-2.9.11
Prompted by CVE-2021-3541, but this includes an awful lot of serious bug
fixes by Nick and others.
- configure.ac: bumped to new release
- doc/* updated and regenerated
2021-05-13 15:35:21 +02:00
Nick Wellnhofer
0ff527482d Fix autotools warnings 2020-08-17 02:54:28 +02:00
Martin Vidner
43a8836cde Fix rebuilding docs, by hiding __attribute__((...)) behind a macro.
When enabled via `./configure --enable-rebuild-docs`,
`make -C doc libxml2-api.xml` will invoke apibuild.py
to rebuild libxml2-api.xml from the sources.
But the code added in
9fa3200cb3 made it error out with

```
Parsing ../parser.c
Parse Error: parsing type : expecting a name
('Got token ', ('sep', '('))
('Last token: ', ('sep', '('))
('Token queue: ', [('name', 'destructor'), ('sep', ')'), ('sep', ')')])
('Line 14689 end: ', '')
```
2020-06-24 19:55:52 +02:00
Nick Wellnhofer
00ed736eec Add a couple of libFuzzer targets
- XML fuzzer
  Currently tests the pull parser, push parser and reader, as well as
  serialization. Supports splitting fuzz data into multiple documents
  for things like external DTDs or entities. The seed corpus is built
  from parts of the test suite.

- Regexp fuzzer
  Seed corpus was statically generated from test suite.

- URI fuzzer
  Tests parsing and most other functions from uri.c.
2020-06-05 13:53:11 +02:00
Samuel Thibault
9fa3200cb3 Call xmlCleanupParser on ELF destruction
Fixes #153.
2020-05-04 13:53:11 +02:00
Nick Wellnhofer
20c60886e4 Fix typos
Resolves #133.
2020-03-08 17:41:53 +01:00