Skip to content

Commit b5ed6af

Browse files
committed
Merge branch 'upstream-expat' into update-expat
# By Expat Upstream * upstream-expat: expat 2025-09-16 (7643f96b)
2 parents 4957068 + 901927f commit b5ed6af

24 files changed

+18258
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* -whitespace

Modules/ThirdParty/Expat/src/itkexpat/CMakeLists.txt

Lines changed: 1030 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
2+
Copyright (c) 2001-2025 Expat maintainers
3+
4+
Permission is hereby granted, free of charge, to any person obtaining
5+
a copy of this software and associated documentation files (the
6+
"Software"), to deal in the Software without restriction, including
7+
without limitation the rights to use, copy, modify, merge, publish,
8+
distribute, sublicense, and/or sell copies of the Software, and to
9+
permit persons to whom the Software is furnished to do so, subject to
10+
the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included
13+
in all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
include(CheckCCompilerFlag)
2+
include(CheckCSourceCompiles)
3+
include(CheckIncludeFile)
4+
include(CheckIncludeFiles)
5+
include(CheckLibraryExists)
6+
include(CheckSymbolExists)
7+
include(TestBigEndian)
8+
9+
check_include_file("dlfcn.h" HAVE_DLFCN_H)
10+
check_include_file("fcntl.h" HAVE_FCNTL_H)
11+
check_include_file("inttypes.h" HAVE_INTTYPES_H)
12+
check_include_file("memory.h" HAVE_MEMORY_H)
13+
check_include_file("stdint.h" HAVE_STDINT_H)
14+
check_include_file("stdlib.h" HAVE_STDLIB_H)
15+
check_include_file("strings.h" HAVE_STRINGS_H)
16+
check_include_file("string.h" HAVE_STRING_H)
17+
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
18+
check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
19+
check_include_file("unistd.h" HAVE_UNISTD_H)
20+
21+
check_symbol_exists("getpagesize" "unistd.h" HAVE_GETPAGESIZE)
22+
check_symbol_exists("mmap" "sys/mman.h" HAVE_MMAP)
23+
check_symbol_exists("getrandom" "sys/random.h" HAVE_GETRANDOM)
24+
25+
if(EXPAT_WITH_LIBBSD)
26+
set(CMAKE_REQUIRED_LIBRARIES "${LIB_BSD}")
27+
set(_bsd "bsd/")
28+
else()
29+
set(_bsd "")
30+
endif()
31+
check_symbol_exists("arc4random_buf" "${_bsd}stdlib.h" HAVE_ARC4RANDOM_BUF)
32+
if(NOT HAVE_ARC4RANDOM_BUF)
33+
check_symbol_exists("arc4random" "${_bsd}stdlib.h" HAVE_ARC4RANDOM)
34+
endif()
35+
set(CMAKE_REQUIRED_LIBRARIES)
36+
37+
#/* Define to 1 if you have the ANSI C header files. */
38+
check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
39+
40+
test_big_endian(WORDS_BIGENDIAN)
41+
#/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
42+
if(WORDS_BIGENDIAN)
43+
set(BYTEORDER 4321)
44+
else(WORDS_BIGENDIAN)
45+
set(BYTEORDER 1234)
46+
endif(WORDS_BIGENDIAN)
47+
48+
if(HAVE_SYS_TYPES_H)
49+
check_c_source_compiles("
50+
#include <sys/types.h>
51+
int main(void) {
52+
const off_t offset = -123;
53+
(void)offset;
54+
return 0;
55+
}"
56+
HAVE_OFF_T)
57+
endif()
58+
59+
if(NOT HAVE_OFF_T)
60+
set(off_t "long")
61+
endif()
62+
63+
check_c_source_compiles("
64+
#define _GNU_SOURCE
65+
#include <stdlib.h> /* for NULL */
66+
#include <unistd.h> /* for syscall */
67+
#include <sys/syscall.h> /* for SYS_getrandom */
68+
int main(void) {
69+
syscall(SYS_getrandom, NULL, 0, 0);
70+
return 0;
71+
}"
72+
HAVE_SYSCALL_GETRANDOM)
73+
74+
check_c_compiler_flag("-fno-strict-aliasing" FLAG_NO_STRICT_ALIASING)
75+
check_c_compiler_flag("-fvisibility=hidden" FLAG_VISIBILITY)
76+
77+
check_library_exists(m cos "" _EXPAT_LIBM_FOUND)
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
/* expat_config.h.cmake. Based upon generated expat_config.h.in. */
2+
3+
#ifndef EXPAT_CONFIG_H
4+
# define EXPAT_CONFIG_H 1
5+
6+
/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
7+
#cmakedefine BYTEORDER @BYTEORDER@
8+
9+
/* Define to 1 if you have the `arc4random' function. */
10+
#cmakedefine HAVE_ARC4RANDOM
11+
12+
/* Define to 1 if you have the `arc4random_buf' function. */
13+
#cmakedefine HAVE_ARC4RANDOM_BUF
14+
15+
/* Define to 1 if you have the <dlfcn.h> header file. */
16+
#cmakedefine HAVE_DLFCN_H
17+
18+
/* Define to 1 if you have the <fcntl.h> header file. */
19+
#cmakedefine HAVE_FCNTL_H
20+
21+
/* Define to 1 if you have the `getpagesize' function. */
22+
#cmakedefine HAVE_GETPAGESIZE
23+
24+
/* Define to 1 if you have the `getrandom' function. */
25+
#cmakedefine HAVE_GETRANDOM
26+
27+
/* Define to 1 if you have the <inttypes.h> header file. */
28+
#cmakedefine HAVE_INTTYPES_H
29+
30+
/* Define to 1 if you have the `bsd' library (-lbsd). */
31+
#cmakedefine HAVE_LIBBSD
32+
33+
/* Define to 1 if you have the <memory.h> header file. */
34+
#cmakedefine HAVE_MEMORY_H
35+
36+
/* Define to 1 if you have a working `mmap' system call. */
37+
#cmakedefine HAVE_MMAP
38+
39+
/* Define to 1 if you have the <stdint.h> header file. */
40+
#cmakedefine HAVE_STDINT_H
41+
42+
/* Define to 1 if you have the <stdlib.h> header file. */
43+
#cmakedefine HAVE_STDLIB_H
44+
45+
/* Define to 1 if you have the <strings.h> header file. */
46+
#cmakedefine HAVE_STRINGS_H
47+
48+
/* Define to 1 if you have the <string.h> header file. */
49+
#cmakedefine HAVE_STRING_H
50+
51+
/* Define to 1 if you have `syscall' and `SYS_getrandom'. */
52+
#cmakedefine HAVE_SYSCALL_GETRANDOM
53+
54+
/* Define to 1 if you have the <sys/stat.h> header file. */
55+
#cmakedefine HAVE_SYS_STAT_H
56+
57+
/* Define to 1 if you have the <sys/types.h> header file. */
58+
#cmakedefine HAVE_SYS_TYPES_H
59+
60+
/* Define to 1 if you have the <unistd.h> header file. */
61+
#cmakedefine HAVE_UNISTD_H
62+
63+
/* Name of package */
64+
# define PACKAGE "@PACKAGE_NAME@"
65+
66+
/* Define to the address where bug reports for this package should be sent. */
67+
#cmakedefine PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
68+
69+
/* Define to the full name of this package. */
70+
#cmakedefine PACKAGE_NAME "@PACKAGE_NAME@"
71+
72+
/* Define to the full name and version of this package. */
73+
#cmakedefine PACKAGE_STRING "@PACKAGE_STRING@"
74+
75+
/* Define to the one symbol short name of this package. */
76+
#cmakedefine PACKAGE_TARNAME "@PACKAGE_TARNAME@"
77+
78+
/* Define to the home page for this package. */
79+
# define PACKAGE_URL ""
80+
81+
/* Define to the version of this package. */
82+
#cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@"
83+
84+
/* Define to 1 if you have the ANSI C header files. */
85+
# ifndef STDC_HEADERS
86+
#cmakedefine STDC_HEADERS
87+
# endif
88+
89+
/* whether byteorder is bigendian */
90+
#cmakedefine WORDS_BIGENDIAN
91+
92+
/* Define to allow retrieving the byte offsets for attribute names and values.
93+
*/
94+
#cmakedefine XML_ATTR_INFO
95+
96+
/* Define to specify how much context to retain around the current parse
97+
point, 0 to disable. */
98+
# define XML_CONTEXT_BYTES @XML_CONTEXT_BYTES@
99+
100+
# if ! defined(_WIN32)
101+
/* Define to include code reading entropy from `/dev/urandom'. */
102+
#cmakedefine XML_DEV_URANDOM
103+
# endif
104+
105+
/* Define to make parameter entity parsing functionality available. */
106+
#cmakedefine XML_DTD
107+
108+
/* Define as 1/0 to enable/disable support for general entities. */
109+
# define XML_GE @XML_GE@
110+
111+
/* Define to make XML Namespaces functionality available. */
112+
#cmakedefine XML_NS
113+
114+
/* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */
115+
# ifdef _MSC_VER
116+
# define __func__ __FUNCTION__
117+
# endif
118+
119+
/* Define to `long' if <sys/types.h> does not define. */
120+
#cmakedefine off_t @off_t@
121+
122+
#endif // ndef EXPAT_CONFIG_H
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
/*
2+
__ __ _
3+
___\ \/ /_ __ __ _| |_
4+
/ _ \\ /| '_ \ / _` | __|
5+
| __// \| |_) | (_| | |_
6+
\___/_/\_\ .__/ \__,_|\__|
7+
|_| XML parser
8+
9+
Copyright (c) 1999-2000 Thai Open Source Software Center Ltd
10+
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
11+
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
12+
Copyright (c) 2007 Karl Waclawek <karl@waclawek.net>
13+
Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org>
14+
Licensed under the MIT license:
15+
16+
Permission is hereby granted, free of charge, to any person obtaining
17+
a copy of this software and associated documentation files (the
18+
"Software"), to deal in the Software without restriction, including
19+
without limitation the rights to use, copy, modify, merge, publish,
20+
distribute, sublicense, and/or sell copies of the Software, and to permit
21+
persons to whom the Software is furnished to do so, subject to the
22+
following conditions:
23+
24+
The above copyright notice and this permission notice shall be included
25+
in all copies or substantial portions of the Software.
26+
27+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
28+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
29+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
30+
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
31+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
32+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
33+
USE OR OTHER DEALINGS IN THE SOFTWARE.
34+
*/
35+
36+
#define ASCII_A 0x41
37+
#define ASCII_B 0x42
38+
#define ASCII_C 0x43
39+
#define ASCII_D 0x44
40+
#define ASCII_E 0x45
41+
#define ASCII_F 0x46
42+
#define ASCII_G 0x47
43+
#define ASCII_H 0x48
44+
#define ASCII_I 0x49
45+
#define ASCII_J 0x4A
46+
#define ASCII_K 0x4B
47+
#define ASCII_L 0x4C
48+
#define ASCII_M 0x4D
49+
#define ASCII_N 0x4E
50+
#define ASCII_O 0x4F
51+
#define ASCII_P 0x50
52+
#define ASCII_Q 0x51
53+
#define ASCII_R 0x52
54+
#define ASCII_S 0x53
55+
#define ASCII_T 0x54
56+
#define ASCII_U 0x55
57+
#define ASCII_V 0x56
58+
#define ASCII_W 0x57
59+
#define ASCII_X 0x58
60+
#define ASCII_Y 0x59
61+
#define ASCII_Z 0x5A
62+
63+
#define ASCII_a 0x61
64+
#define ASCII_b 0x62
65+
#define ASCII_c 0x63
66+
#define ASCII_d 0x64
67+
#define ASCII_e 0x65
68+
#define ASCII_f 0x66
69+
#define ASCII_g 0x67
70+
#define ASCII_h 0x68
71+
#define ASCII_i 0x69
72+
#define ASCII_j 0x6A
73+
#define ASCII_k 0x6B
74+
#define ASCII_l 0x6C
75+
#define ASCII_m 0x6D
76+
#define ASCII_n 0x6E
77+
#define ASCII_o 0x6F
78+
#define ASCII_p 0x70
79+
#define ASCII_q 0x71
80+
#define ASCII_r 0x72
81+
#define ASCII_s 0x73
82+
#define ASCII_t 0x74
83+
#define ASCII_u 0x75
84+
#define ASCII_v 0x76
85+
#define ASCII_w 0x77
86+
#define ASCII_x 0x78
87+
#define ASCII_y 0x79
88+
#define ASCII_z 0x7A
89+
90+
#define ASCII_0 0x30
91+
#define ASCII_1 0x31
92+
#define ASCII_2 0x32
93+
#define ASCII_3 0x33
94+
#define ASCII_4 0x34
95+
#define ASCII_5 0x35
96+
#define ASCII_6 0x36
97+
#define ASCII_7 0x37
98+
#define ASCII_8 0x38
99+
#define ASCII_9 0x39
100+
101+
#define ASCII_TAB 0x09
102+
#define ASCII_SPACE 0x20
103+
#define ASCII_EXCL 0x21
104+
#define ASCII_QUOT 0x22
105+
#define ASCII_AMP 0x26
106+
#define ASCII_APOS 0x27
107+
#define ASCII_MINUS 0x2D
108+
#define ASCII_PERIOD 0x2E
109+
#define ASCII_COLON 0x3A
110+
#define ASCII_SEMI 0x3B
111+
#define ASCII_LT 0x3C
112+
#define ASCII_EQUALS 0x3D
113+
#define ASCII_GT 0x3E
114+
#define ASCII_LSQB 0x5B
115+
#define ASCII_RSQB 0x5D
116+
#define ASCII_UNDERSCORE 0x5F
117+
#define ASCII_LPAREN 0x28
118+
#define ASCII_RPAREN 0x29
119+
#define ASCII_FF 0x0C
120+
#define ASCII_SLASH 0x2F
121+
#define ASCII_HASH 0x23
122+
#define ASCII_PIPE 0x7C
123+
#define ASCII_COMMA 0x2C

0 commit comments

Comments
 (0)