Skip to content

Commit c386c8b

Browse files
vstinnerlarryhastings
authored andcommitted
closes bpo-38174: Update vendored expat library to 2.2.8. (GH-16346) (#16434)
Fixes CVE-2019-15903. See full changelog at https://github.com/libexpat/libexpat/blob/R_2_2_8/expat/Changes.
1 parent 2784e78 commit c386c8b

22 files changed

+4919
-5856
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Update vendorized expat library version to 2.2.8, which resolves
2+
CVE-2019-15903.

Modules/expat/asciitab.h

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -31,34 +31,34 @@
3131
*/
3232

3333
/* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
34-
/* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
35-
/* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML,
36-
/* 0x0C */ BT_NONXML, BT_CR, BT_NONXML, BT_NONXML,
37-
/* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
38-
/* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
39-
/* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
40-
/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
41-
/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
42-
/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
43-
/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
44-
/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
45-
/* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
46-
/* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
47-
/* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI,
48-
/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
49-
/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
50-
/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
51-
/* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
52-
/* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
53-
/* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
54-
/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
55-
/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
56-
/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
57-
/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
58-
/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
59-
/* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
60-
/* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
61-
/* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
62-
/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
63-
/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
64-
/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,
34+
/* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
35+
/* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML,
36+
/* 0x0C */ BT_NONXML, BT_CR, BT_NONXML, BT_NONXML,
37+
/* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
38+
/* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
39+
/* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
40+
/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
41+
/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
42+
/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
43+
/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
44+
/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
45+
/* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
46+
/* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
47+
/* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI,
48+
/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
49+
/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
50+
/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
51+
/* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
52+
/* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
53+
/* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
54+
/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
55+
/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
56+
/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
57+
/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
58+
/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
59+
/* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
60+
/* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
61+
/* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
62+
/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
63+
/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
64+
/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,

Modules/expat/expat.h

Lines changed: 108 additions & 169 deletions
Large diffs are not rendered by default.

Modules/expat/expat_external.h

Lines changed: 47 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,6 @@
3535

3636
/* External API definitions */
3737

38-
/* Namespace external symbols to allow multiple libexpat version to
39-
co-exist. */
40-
#include "pyexpatns.h"
41-
42-
#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
43-
#define XML_USE_MSC_EXTENSIONS 1
44-
#endif
45-
4638
/* Expat tries very hard to make the API boundary very specifically
4739
defined. There are two macros defined to control this boundary;
4840
each of these can be defined before including this header to
@@ -65,12 +57,17 @@
6557
compiled with the cdecl calling convention as the default since
6658
system headers may assume the cdecl convention.
6759
*/
60+
61+
/* Namespace external symbols to allow multiple libexpat version to
62+
co-exist. */
63+
#include "pyexpatns.h"
64+
6865
#ifndef XMLCALL
69-
#if defined(_MSC_VER)
70-
#define XMLCALL __cdecl
71-
#elif defined(__GNUC__) && defined(__i386) && !defined(__INTEL_COMPILER)
72-
#define XMLCALL __attribute__((cdecl))
73-
#else
66+
# if defined(_MSC_VER)
67+
# define XMLCALL __cdecl
68+
# elif defined(__GNUC__) && defined(__i386) && ! defined(__INTEL_COMPILER)
69+
# define XMLCALL __attribute__((cdecl))
70+
# else
7471
/* For any platform which uses this definition and supports more than
7572
one calling convention, we need to extend this definition to
7673
declare the convention used on that platform, if it's possible to
@@ -81,41 +78,46 @@
8178
pre-processor and how to specify the same calling convention as the
8279
platform's malloc() implementation.
8380
*/
84-
#define XMLCALL
85-
#endif
86-
#endif /* not defined XMLCALL */
81+
# define XMLCALL
82+
# endif
83+
#endif /* not defined XMLCALL */
8784

88-
89-
#if !defined(XML_STATIC) && !defined(XMLIMPORT)
90-
#ifndef XML_BUILDING_EXPAT
85+
#if ! defined(XML_STATIC) && ! defined(XMLIMPORT)
86+
# ifndef XML_BUILDING_EXPAT
9187
/* using Expat from an application */
9288

93-
#ifdef XML_USE_MSC_EXTENSIONS
94-
#define XMLIMPORT __declspec(dllimport)
95-
#endif
89+
# if defined(_MSC_EXTENSIONS) && ! defined(__BEOS__) && ! defined(__CYGWIN__)
90+
# define XMLIMPORT __declspec(dllimport)
91+
# endif
9692

93+
# endif
94+
#endif /* not defined XML_STATIC */
95+
96+
#ifndef XML_ENABLE_VISIBILITY
97+
# define XML_ENABLE_VISIBILITY 0
9798
#endif
98-
#endif /* not defined XML_STATIC */
9999

100-
#if !defined(XMLIMPORT) && defined(__GNUC__) && (__GNUC__ >= 4)
101-
#define XMLIMPORT __attribute__ ((visibility ("default")))
100+
#if ! defined(XMLIMPORT) && XML_ENABLE_VISIBILITY
101+
# define XMLIMPORT __attribute__((visibility("default")))
102102
#endif
103103

104104
/* If we didn't define it above, define it away: */
105105
#ifndef XMLIMPORT
106-
#define XMLIMPORT
106+
# define XMLIMPORT
107107
#endif
108108

109-
#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
110-
#define XML_ATTR_MALLOC __attribute__((__malloc__))
109+
#if defined(__GNUC__) \
110+
&& (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
111+
# define XML_ATTR_MALLOC __attribute__((__malloc__))
111112
#else
112-
#define XML_ATTR_MALLOC
113+
# define XML_ATTR_MALLOC
113114
#endif
114115

115-
#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
116-
#define XML_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
116+
#if defined(__GNUC__) \
117+
&& ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
118+
# define XML_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
117119
#else
118-
#define XML_ATTR_ALLOC_SIZE(x)
120+
# define XML_ATTR_ALLOC_SIZE(x)
119121
#endif
120122

121123
#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL
@@ -125,33 +127,30 @@ extern "C" {
125127
#endif
126128

127129
#ifdef XML_UNICODE_WCHAR_T
128-
# define XML_UNICODE
129-
# if defined(__SIZEOF_WCHAR_T__) && (__SIZEOF_WCHAR_T__ != 2)
130-
# error "sizeof(wchar_t) != 2; Need -fshort-wchar for both Expat and libc"
131-
# endif
130+
# ifndef XML_UNICODE
131+
# define XML_UNICODE
132+
# endif
133+
# if defined(__SIZEOF_WCHAR_T__) && (__SIZEOF_WCHAR_T__ != 2)
134+
# error "sizeof(wchar_t) != 2; Need -fshort-wchar for both Expat and libc"
135+
# endif
132136
#endif
133137

134-
#ifdef XML_UNICODE /* Information is UTF-16 encoded. */
135-
#ifdef XML_UNICODE_WCHAR_T
138+
#ifdef XML_UNICODE /* Information is UTF-16 encoded. */
139+
# ifdef XML_UNICODE_WCHAR_T
136140
typedef wchar_t XML_Char;
137141
typedef wchar_t XML_LChar;
138-
#else
142+
# else
139143
typedef unsigned short XML_Char;
140144
typedef char XML_LChar;
141-
#endif /* XML_UNICODE_WCHAR_T */
142-
#else /* Information is UTF-8 encoded. */
145+
# endif /* XML_UNICODE_WCHAR_T */
146+
#else /* Information is UTF-8 encoded. */
143147
typedef char XML_Char;
144148
typedef char XML_LChar;
145-
#endif /* XML_UNICODE */
149+
#endif /* XML_UNICODE */
146150

147-
#ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */
148-
#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400
149-
typedef __int64 XML_Index;
150-
typedef unsigned __int64 XML_Size;
151-
#else
151+
#ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */
152152
typedef long long XML_Index;
153153
typedef unsigned long long XML_Size;
154-
#endif
155154
#else
156155
typedef long XML_Index;
157156
typedef unsigned long XML_Size;

Modules/expat/iasciitab.h

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -32,34 +32,34 @@
3232

3333
/* Like asciitab.h, except that 0xD has code BT_S rather than BT_CR */
3434
/* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
35-
/* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
36-
/* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML,
37-
/* 0x0C */ BT_NONXML, BT_S, BT_NONXML, BT_NONXML,
38-
/* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
39-
/* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
40-
/* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
41-
/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
42-
/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
43-
/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
44-
/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
45-
/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
46-
/* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
47-
/* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
48-
/* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI,
49-
/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
50-
/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
51-
/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
52-
/* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
53-
/* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
54-
/* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
55-
/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
56-
/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
57-
/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
58-
/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
59-
/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
60-
/* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
61-
/* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
62-
/* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
63-
/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
64-
/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
65-
/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,
35+
/* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
36+
/* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML,
37+
/* 0x0C */ BT_NONXML, BT_S, BT_NONXML, BT_NONXML,
38+
/* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
39+
/* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
40+
/* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
41+
/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
42+
/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
43+
/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
44+
/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
45+
/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
46+
/* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
47+
/* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
48+
/* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI,
49+
/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
50+
/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
51+
/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
52+
/* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
53+
/* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
54+
/* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
55+
/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
56+
/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
57+
/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
58+
/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
59+
/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
60+
/* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
61+
/* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
62+
/* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
63+
/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
64+
/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
65+
/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,

Modules/expat/internal.h

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
USE OR OTHER DEALINGS IN THE SOFTWARE.
5050
*/
5151

52-
#if defined(__GNUC__) && defined(__i386__) && !defined(__MINGW32__)
52+
#if defined(__GNUC__) && defined(__i386__) && ! defined(__MINGW32__)
5353
/* We'll use this version by default only where we know it helps.
5454
5555
regparm() generates warnings on Solaris boxes. See SF bug #692878.
@@ -59,8 +59,8 @@
5959
#define FASTCALL __attribute__((stdcall, regparm(3)))
6060
and let's try this:
6161
*/
62-
#define FASTCALL __attribute__((regparm(3)))
63-
#define PTRFASTCALL __attribute__((regparm(3)))
62+
# define FASTCALL __attribute__((regparm(3)))
63+
# define PTRFASTCALL __attribute__((regparm(3)))
6464
#endif
6565

6666
/* Using __fastcall seems to have an unexpected negative effect under
@@ -74,50 +74,49 @@
7474
/* Make sure all of these are defined if they aren't already. */
7575

7676
#ifndef FASTCALL
77-
#define FASTCALL
77+
# define FASTCALL
7878
#endif
7979

8080
#ifndef PTRCALL
81-
#define PTRCALL
81+
# define PTRCALL
8282
#endif
8383

8484
#ifndef PTRFASTCALL
85-
#define PTRFASTCALL
85+
# define PTRFASTCALL
8686
#endif
8787

8888
#ifndef XML_MIN_SIZE
89-
#if !defined(__cplusplus) && !defined(inline)
90-
#ifdef __GNUC__
91-
#define inline __inline
92-
#endif /* __GNUC__ */
93-
#endif
89+
# if ! defined(__cplusplus) && ! defined(inline)
90+
# ifdef __GNUC__
91+
# define inline __inline
92+
# endif /* __GNUC__ */
93+
# endif
9494
#endif /* XML_MIN_SIZE */
9595

9696
#ifdef __cplusplus
97-
#define inline inline
97+
# define inline inline
9898
#else
99-
#ifndef inline
100-
#define inline
101-
#endif
99+
# ifndef inline
100+
# define inline
101+
# endif
102102
#endif
103103

104104
#ifndef UNUSED_P
105-
# ifdef __GNUC__
106-
# define UNUSED_P(p) UNUSED_ ## p __attribute__((__unused__))
107-
# else
108-
# define UNUSED_P(p) UNUSED_ ## p
109-
# endif
105+
# define UNUSED_P(p) (void)p
110106
#endif
111107

112-
113108
#ifdef __cplusplus
114109
extern "C" {
115110
#endif
116111

117-
112+
#ifdef XML_ENABLE_VISIBILITY
113+
# if XML_ENABLE_VISIBILITY
114+
__attribute__((visibility("default")))
115+
# endif
116+
#endif
118117
void
119-
align_limit_to_full_utf8_characters(const char * from, const char ** fromLimRef);
120-
118+
_INTERNAL_trim_to_complete_utf8_characters(const char *from,
119+
const char **fromLimRef);
121120

122121
#ifdef __cplusplus
123122
}

0 commit comments

Comments
 (0)