1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-01-29 21:46:59 +03:00

5495 Commits

Author SHA1 Message Date
Nick Wellnhofer
0d90125859 Fix Windows compiler warnings in python/types.c 2022-09-04 18:36:04 +02:00
Nick Wellnhofer
71736b4e9a Fix libxml_PyFileGet
Broken in commit 75cdb6dd.
2022-09-04 18:36:04 +02:00
Nick Wellnhofer
f9fcb2c47a Revert "CI job for MingW64/Autotools"
This reverts commit 6bfebf4d5886bd5f2a3979ceedc27ebd6c3c5009.
2022-09-04 04:47:48 +02:00
Nick Wellnhofer
6bfebf4d58 CI job for MingW64/Autotools 2022-09-04 04:04:45 +02:00
Nick Wellnhofer
0048fd0a50 Detect ws2_32 with AC_SEARCH_LIBS 2022-09-04 03:57:09 +02:00
Nick Wellnhofer
60b03c9ec9 Rework network configure checks
Migrate to AC_SEARCH_LIBS. Don't pollute LIBS.
2022-09-04 03:47:09 +02:00
Nick Wellnhofer
fe02289fa5 Remove arg cast configure checks
We can simply cast to non-const char * unconditionally.
2022-09-04 03:19:01 +02:00
Nick Wellnhofer
2d164d6835 Fix dlopen check 2022-09-04 02:54:20 +02:00
Nick Wellnhofer
1e60c76821 Remove HAVE_WIN32_THREADS configuration flag
Check for LIBXML_THREAD_ENABLED and _WIN32 instead.
2022-09-04 01:49:41 +02:00
Nick Wellnhofer
13a6637815 Remove BeOS support
Haiku shouldn't be affected.
2022-09-04 01:05:51 +02:00
Nick Wellnhofer
38290ec103 Rework dlopen and pthread detection
Migrate to AC_SEARCH_LIBS. Remove check for ancient GCC 3.3.
2022-09-04 00:49:36 +02:00
Nick Wellnhofer
e47df37be9 Fix test in configure.ac
Broken in commit b4847d60.
2022-09-04 00:46:32 +02:00
Nick Wellnhofer
202b8e1954 cmake: Enable GCC compiler warnings 2022-09-02 18:44:59 +02:00
Nick Wellnhofer
81621b1fe4 Fix compiler warnings in SAX2.c 2022-09-02 18:44:59 +02:00
Nick Wellnhofer
caef85633e Move automata test to runtest.c 2022-09-02 18:33:36 +02:00
Nick Wellnhofer
c59df16d1d Always link with -no-undefined
This is a good idea to detect errors early.
2022-09-02 18:33:36 +02:00
Nick Wellnhofer
513d65fee8 Use AM_CFLAGS and AM_LDFLAGS consistently 2022-09-02 18:33:36 +02:00
Nick Wellnhofer
75cdb6dd55 Fix unused variable warning in python/types.c 2022-09-02 18:33:36 +02:00
Nick Wellnhofer
1bd24d448a Fix compiler warning in examples 2022-09-02 18:33:36 +02:00
Nick Wellnhofer
d0ab5c4fe6 Fix compiler warnings in fuzzing code 2022-09-02 18:33:36 +02:00
Nick Wellnhofer
17d505e2d2 Remove -Wredundant-decls
Some Python headers contain redundant redeclarations.
2022-09-02 18:33:36 +02:00
Nick Wellnhofer
4d911ebc08 Call AC_CHECK_* with multiple arguments 2022-09-02 18:33:36 +02:00
Nick Wellnhofer
75bd98a5ef Remove unused code in nanohttp.c
This was hidden behind an undocumented flag RES_USE_INET6.
2022-09-02 18:33:36 +02:00
Nick Wellnhofer
5bffa33a12 Stop including sys/types.h 2022-09-02 18:33:36 +02:00
Nick Wellnhofer
05fc6ee27c configure.ac: Remove checks for unused programs 2022-09-02 18:33:36 +02:00
Nick Wellnhofer
16ae1d8f71 Don't define WIN32 macro 2022-09-02 18:33:36 +02:00
Nick Wellnhofer
0f77167f76 Rework library detection in configure.ac
Migrate to AC_CHECK_LIB and AC_SEARCH_LIBS. Don't pollute CPPFLAGS,
LDFLAGS and LIBS.
2022-09-02 18:33:36 +02:00
Nick Wellnhofer
f2dda8e804 Rearrange configure.ac
Move some sections around and align headers.
2022-09-02 18:33:36 +02:00
Nick Wellnhofer
6a5c88cc5e Consolidate zlib and lzma detection
Don't depend on a global variable for flag backup. Now the blocks can be
moved freely around.
2022-09-02 18:33:36 +02:00
Nick Wellnhofer
59f2f60e3e Remove "runtime debugging"
This doesn't seem useful as configuration option.
2022-09-02 18:33:35 +02:00
Nick Wellnhofer
b4847d60b9 Consolidate simple API modules in configure.ac
Add some small consistency fixes.
2022-09-02 18:33:35 +02:00
Nick Wellnhofer
88a8757bfe Fix dependency resolution in configure.ac
This mainly fixes the case of disabling a single module, for example

    ./configure --without-xpath

Before, there were still a few cases where a module wouldn't be disabled
unless another module depending on it were disabled, too. Finding the
correct options to really disable some modules could be extremely hard
for casual users.

Now every --without option should reliably disable dependent modules
unless they were specifcally requested. In the latter case, a warning is
printed consistently.

Some missing dependencies were added and the logic was consolidated in a
single code section.
2022-09-02 18:33:35 +02:00
Nick Wellnhofer
c714979293 Fix --with-valid --without-regexps build
This build config resulted in segfaults in 'runtest'  because a special
xmlElementContentPtr showed up in a few places. I'm not sure if this is
the right fix.

An error message was changed to conform to the --with-regexps build.

There are still a few missing validity errors, so the tests don't pass.
2022-09-02 18:33:35 +02:00
Nick Wellnhofer
884e142dc5 Fix --with-schemas --without-xpath build
xmlXPathInit must be called for schemas.
2022-09-02 18:33:35 +02:00
Nick Wellnhofer
14d38a7114 Don't build unneeded .c source files 2022-09-02 18:33:35 +02:00
Nick Wellnhofer
bdcf842cdb Move xmlIsXHTML to tree.c
It's declared in tree.h and not guarded by LIBXML_OUTPUT_ENABLED like
the other functions in xmlsave.c.
2022-09-02 18:33:35 +02:00
Nick Wellnhofer
6843fc726f Remove or annotate char casts 2022-09-01 04:31:30 +02:00
Nick Wellnhofer
2cac626976 Don't use sizeof(xmlChar) or sizeof(char) 2022-09-01 03:35:19 +02:00
Nick Wellnhofer
ad338ca737 Remove explicit integer casts
Remove explicit integer casts as final operation

- in assignments
- when passing arguments
- when returning values

Remove casts

- to the same type
- from certain range-bound values

The main motivation is that these explicit casts don't change the result
of operations and only render UBSan's implicit-conversion checks
useless. Removing these casts allows UBSan to detect cases where
truncation or sign-changes occur unexpectedly.

Document some explicit casts as truncating and add a few missing ones.
2022-09-01 02:33:57 +02:00
Nick Wellnhofer
aeb69fd357 Fix overflow check in SAX2.c 2022-09-01 02:33:57 +02:00
Nick Wellnhofer
65dc8a63ac Make xmlNewSAXParserCtx take a const sax handler
Also improve documentation.
2022-09-01 00:17:45 +02:00
Nick Wellnhofer
ce8f3d1195 Fix libxml_PyFileGet with stdout on macOS
macOS returns O_RDWR for standard file descriptors, but fails to write
to stdout or stderr when opened with fdopen(dup_fd, "rw").
2022-08-30 00:10:05 +02:00
Nick Wellnhofer
b1a0961858 Migrate from PyEval_ to PyObject_
PyEval_ functions are deprecated.

Fixes #208.
2022-08-29 17:21:19 +02:00
Nick Wellnhofer
ae2b802150 Cleanup distribution settings in Makefile.am
- Remove useless nodist_ prefix
- Prefer dist_ prefix over EXTRA_DIST
- Remove .in files from EXTRA_DIST
2022-08-29 16:31:47 +02:00
Nick Wellnhofer
b0916e0e96 Also clean *.pyc files for Python 2 2022-08-26 17:57:58 +02:00
Nick Wellnhofer
aa383e66c7 Don't distribute libxml2.spec
This is a generated file.
2022-08-26 17:38:11 +02:00
Xi Ruoyao
df003c0aea build: require automake-1.16.3 or later
We need
https://git.savannah.gnu.org/cgit/automake.git/commit/?id=e21d46f
to avoid an error like

    checking for PYTHON... no
    configure: error: Package requirements (python-3.1) were not met:

    No package 'python-3.1' found

With python-3.10.

Partially fixes #392.

Note that there is another issue with python-3.10, like:

    checking for python... no
    checking for python2... no
    checking for python3... no
    checking for python3.9... no
    ...
    configure: error: no suitable Python interpreter found

Fixing this one will need to require bumping automake version again, but
the automake version containing this fix is not released yet.  And, this
is rather minor because most environment has "python3" as a symlink to
"python3.10" or whatever the latest python3.x installed.
2022-08-26 14:38:36 +00:00
Nick Wellnhofer
47803697b2 Work around strange -fsanitize=integer issue
With clang 14, __attribute__ ((nosanitize)) stops working with

    -fsanitize=undefined,integer

Using the following works (and should be equivalent)

    -fsanitize=undefined,unsigned-integer-overflow,implicit-conversion
2022-08-26 16:37:46 +02:00
Nick Wellnhofer
8016c8edcc Remove set-but-unused variable in xmlXPathScanName
Fix clang warning.
2022-08-26 15:12:21 +02:00
Nick Wellnhofer
ebc04fec23 Allow Python deprecation warnings for now
See #208.
2022-08-26 15:10:06 +02:00