Skip to content
This repository was archived by the owner on Apr 4, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
14 changes: 7 additions & 7 deletions 3rdparty/expat/CMake.README
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
The cmake based buildsystem for expat works on Windows (cygwin, mingw, Visual
Studio) and should work on all other platform cmake supports.

Assuming ~/expat-2.2.10 is the source directory of expat, add a subdirectory
Assuming ~/expat-2.7.1 is the source directory of expat, add a subdirectory
build and change into that directory:
~/expat-2.2.10$ mkdir build && cd build
~/expat-2.2.10/build$
~/expat-2.7.1$ mkdir build && cd build
~/expat-2.7.1/build$

From that directory, call cmake first, then call make, make test and
make install in the usual way:
~/expat-2.2.10/build$ cmake ..
~/expat-2.7.1/build$ cmake ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
....
-- Configuring done
-- Generating done
-- Build files have been written to: /home/patrick/expat-2.2.10/build
-- Build files have been written to: /home/patrick/expat-2.7.1/build

If you want to specify the install location for your files, append
-DCMAKE_INSTALL_PREFIX=/your/install/path to the cmake call.

~/expat-2.2.10/build$ make && make test && make install
~/expat-2.7.1/build$ make && make test && make install
Scanning dependencies of target expat
[ 5%] Building C object CMakeFiles/expat.dir/lib/xmlparse.c.o
[ 11%] Building C object CMakeFiles/expat.dir/lib/xmlrole.c.o
Expand All @@ -36,7 +36,7 @@ Visual Studio Command Prompt or when using mingw, you must open a cmd.exe and
make sure that gcc can be called. On Windows, you also might want to specify a
special Generator for CMake:
for Visual Studio builds do:
cmake .. -G "Visual Studio 15 2017" && msbuild /m expat.sln
cmake .. -G "Visual Studio 16 2019" && msbuild /m expat.sln
for mingw builds do:
cmake .. -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=D:\expat-install
&& gmake && gmake install
636 changes: 479 additions & 157 deletions 3rdparty/expat/CMakeLists.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 3rdparty/expat/COPYING
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
Copyright (c) 2001-2019 Expat maintainers
Copyright (c) 2001-2025 Expat maintainers

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
863 changes: 859 additions & 4 deletions 3rdparty/expat/Changes

Large diffs are not rendered by default.

24 changes: 17 additions & 7 deletions 3rdparty/expat/ConfigureChecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ include(CheckCCompilerFlag)
include(CheckCSourceCompiles)
include(CheckIncludeFile)
include(CheckIncludeFiles)
include(CheckLibraryExists)
include(CheckSymbolExists)
include(TestBigEndian)

Expand Down Expand Up @@ -45,22 +46,31 @@ else(WORDS_BIGENDIAN)
endif(WORDS_BIGENDIAN)

if(HAVE_SYS_TYPES_H)
check_symbol_exists("off_t" "sys/types.h" OFF_T)
check_symbol_exists("size_t" "sys/types.h" SIZE_T)
else(HAVE_SYS_TYPES_H)
set(OFF_T "long")
set(SIZE_T "unsigned")
endif(HAVE_SYS_TYPES_H)
check_c_source_compiles("
#include <sys/types.h>
int main(void) {
const off_t offset = -123;
return 0;
}"
HAVE_OFF_T)
endif()

if(NOT HAVE_OFF_T)
set(off_t "long")
endif()

check_c_source_compiles("
#define _GNU_SOURCE
#include <stdlib.h> /* for NULL */
#include <unistd.h> /* for syscall */
#include <sys/syscall.h> /* for SYS_getrandom */
int main() {
int main(void) {
syscall(SYS_getrandom, NULL, 0, 0);
return 0;
}"
HAVE_SYSCALL_GETRANDOM)

check_c_compiler_flag("-fno-strict-aliasing" FLAG_NO_STRICT_ALIASING)
check_c_compiler_flag("-fvisibility=hidden" FLAG_VISIBILITY)

check_library_exists(m cos "" _EXPAT_LIBM_FOUND)
43 changes: 37 additions & 6 deletions 3rdparty/expat/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2017 Expat development team
# Copyright (c) 2017-2025 Sebastian Pipping <sebastian@pipping.org>
# Copyright (c) 2018 KangLin <kl222@126.com>
# Copyright (c) 2022 Johnny Jazeix <jazeix@gmail.com>
# Copyright (c) 2023 Sony Corporation / Snild Dolkow <snild@sony.com>
# Copyright (c) 2024 Alexander Bluhm <alexander.bluhm@gmx.net>
# Copyright (c) 2024 Dag-Erling Smørgrav <des@des.dev>
# Licensed under the MIT license:
#
# Permission is hereby granted, free of charge, to any person obtaining
Expand Down Expand Up @@ -53,32 +58,53 @@ pkgconfig_DATA = expat.pc
pkgconfigdir = $(libdir)/pkgconfig


dist_cmake_DATA = \
cmake/autotools/expat.cmake

nodist_cmake_DATA = \
cmake/autotools/expat-config-version.cmake \
cmake/autotools/expat-noconfig.cmake \
cmake/expat-config.cmake

cmakedir = $(libdir)/cmake/expat-@PACKAGE_VERSION@


_EXTRA_DIST_CMAKE = \
cmake/expat-config.cmake.in \
cmake/autotools/expat-noconfig__linux.cmake.in \
cmake/autotools/expat-noconfig__macos.cmake.in \
cmake/autotools/expat-noconfig__windows.cmake.in \
cmake/autotools/expat-package-init.cmake \
cmake/mingw-toolchain.cmake \
\
CMakeLists.txt \
CMake.README \
ConfigureChecks.cmake \
expat.pc.cmake \
expat_config.h.cmake

_EXTRA_DIST_WINDOWS = \
win32/build_expat_iss.bat \
win32/expat.iss \
win32/MANIFEST.txt \
win32/README.txt
win32/README.txt \
win32/version.rc.cmake

EXTRA_DIST = \
$(_EXTRA_DIST_CMAKE) \
$(_EXTRA_DIST_WINDOWS) \
\
conftools/expat.m4 \
conftools/get-version.sh \
conftools/PrintPath \
\
fuzz/xml_lpm_fuzzer.cpp \
fuzz/xml_lpm_fuzzer.proto \
fuzz/xml_parsebuffer_fuzzer.c \
fuzz/xml_parse_fuzzer.c \
\
xmlwf/xmlwf_helpgen.py \
xmlwf/xmlwf_helpgen.sh \
\
buildconf.sh \
Changes \
README.md \
\
Expand All @@ -92,10 +118,10 @@ buildlib:
@echo 'ERROR: is no longer supported. INSTEAD please:' >&2
@echo 'ERROR:' >&2
@echo 'ERROR: * Mass-patch Makefile.am, e.g.' >&2
@echo 'ERROR: # find -name Makefile.am -exec sed \' >&2
@echo 'ERROR: # find . -name Makefile.am -exec sed \' >&2
@echo 'ERROR: -e "s,libexpat\.la,libexpatw.la," \' >&2
@echo 'ERROR: -e "s,libexpat_la,libexpatw_la," \' >&2
@echo 'ERROR: -i {} +' >&2
@echo 'ERROR: -i.bak {} +' >&2
@echo 'ERROR:' >&2
@echo 'ERROR: * Run automake to re-generate Makefile.in files' >&2
@echo 'ERROR:' >&2
Expand All @@ -110,6 +136,11 @@ buildlib:
run-benchmark:
$(MAKE) -C tests/benchmark
./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/recset.xml 65535 3
./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_attr.xml 4096 3
./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_cdata.xml 4096 3
./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_comment.xml 4096 3
./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_tag.xml 4096 3
./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_text.xml 4096 3

.PHONY: download-xmlts-zip
download-xmlts-zip:
Expand Down
Loading