expat: upgrade to 2.9.0
With this new version, the build started to fail with error: ‘XML_Size XML_GetCurrentColumnNumber(XML_Parser)’ is deprecated: please use XML_GetCurrentColumnNumber64 instead [-Werror=deprecated-declarations] so we need to check the expat version in case the system expat is older than 2.9 Also add 0001-fix-XML_GE-is-not-defined-evaluates-to-0-Werror-unde.patch to fix error: "XML_GE" is not defined, evaluates to 0 [-Werror=undef] 1087 | # if XML_GE == 1 | ^~~~~~ cc1plus: all warnings being treated as errors Change-Id: If4f1d652941b7766ed94b65a6eaa018f37c89387 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211867 Tested-by: Jenkins Tested-by: René Engelhard <rene@debian.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
+2
-2
@@ -116,8 +116,8 @@ ETONYEK_TARBALL := libetonyek-0.1.$(ETONYEK_VERSION_MICRO).tar.xz
|
||||
# three static lines
|
||||
# so that git cherry-pick
|
||||
# will not run into conflicts
|
||||
EXPAT_SHA256SUM := 1e727b8933ec51a77a9a9d9afcf8e688bce45d907c13e36ab7393fe36e703182
|
||||
EXPAT_TARBALL := expat-2.8.5.tar.xz
|
||||
EXPAT_SHA256SUM := 1e6371862cc31999b368c3b89b49994f0677e1bab5f1b2b85ae3741f5d803051
|
||||
EXPAT_TARBALL := expat-2.9.0.tar.xz
|
||||
# three static lines
|
||||
# so that git cherry-pick
|
||||
# will not run into conflicts
|
||||
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
From 3e3d9091bc3db29901a1507466bf0479ff38de9a Mon Sep 17 00:00:00 2001
|
||||
From: Xisco Fauli <xiscofauli@libreoffice.org>
|
||||
Date: Tue, 6 Oct 2026 10:50:50 +0200
|
||||
Subject: [PATCH] fix XML_GE is not defined, evaluates to 0 [-Werror=undef]
|
||||
|
||||
---
|
||||
expat/lib/expat.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/expat/lib/expat.h b/expat/lib/expat.h
|
||||
index 1b2852dd..fea2fd99 100644
|
||||
--- a/expat/lib/expat.h
|
||||
+++ b/expat/lib/expat.h
|
||||
@@ -1084,7 +1084,7 @@ enum XML_Parser_Property {
|
||||
# if defined(XML_TESTING)
|
||||
XML_PROP_INVALID = 0,
|
||||
# endif
|
||||
-# if XML_GE == 1
|
||||
+# if defined(XML_GE) && XML_GE == 1
|
||||
XML_PROP_ALLOC_TRACKER_ACTIVATION_THRESHOLD = 1, // of type `uint64_t`
|
||||
XML_PROP_ALLOC_TRACKER_MAXIMUM_AMPLIFICATION = 2, // of type `double`
|
||||
XML_PROP_BILLION_LAUGHS_ACTIVATION_THRESHOLD = 3, // of type `uint64_t`
|
||||
--
|
||||
2.47.3
|
||||
|
||||
+1
@@ -57,6 +57,7 @@ $(eval $(call gb_StaticLibrary_add_generated_cobjects,expat,\
|
||||
endif
|
||||
|
||||
$(eval $(call gb_StaticLibrary_add_generated_cobjects,expat,\
|
||||
UnpackedTarball/expat/lib/xcs \
|
||||
UnpackedTarball/expat/lib/xmlparse \
|
||||
UnpackedTarball/expat/lib/xmlrole \
|
||||
UnpackedTarball/expat/lib/xmltok \
|
||||
|
||||
+1
@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,expat,2))
|
||||
|
||||
$(eval $(call gb_UnpackedTarball_add_patches,expat,\
|
||||
external/expat/expat-winapi.patch \
|
||||
external/expat/0001-fix-XML_GE-is-not-defined-evaluates-to-0-Werror-unde.patch \
|
||||
))
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
|
||||
Vendored
+2
-2
@@ -13,8 +13,8 @@
|
||||
|
||||
--- misc/expat-2.5.0/lib/xmlparse.c 2022-10-26 00:09:08.000000000 +0900
|
||||
+++ misc/build/expat-2.5.0/lib/xmlparse.c 2022-10-30 23:09:01.843006341 +0900
|
||||
@@ -98,6 +98,10 @@
|
||||
#include <errno.h>
|
||||
@@ -112,6 +112,10 @@
|
||||
#include <wchar.h> /* wcsncmp */
|
||||
|
||||
#ifdef _WIN32
|
||||
+# undef HAVE_ARC4RANDOM
|
||||
|
||||
@@ -888,8 +888,13 @@ bool SimpleXMLParser::Execute( const OString &rFileName, XMLFile* pXMLFile )
|
||||
if (!result)
|
||||
{
|
||||
m_aErrorInformation.m_eCode = XML_GetErrorCode( m_aParser );
|
||||
#if (XML_MAJOR_VERSION > 2 || (XML_MAJOR_VERSION == 2 && XML_MINOR_VERSION >= 9))
|
||||
m_aErrorInformation.m_nLine = XML_GetCurrentLineNumber64( m_aParser );
|
||||
m_aErrorInformation.m_nColumn = XML_GetCurrentColumnNumber64( m_aParser );
|
||||
#else
|
||||
m_aErrorInformation.m_nLine = XML_GetErrorLineNumber( m_aParser );
|
||||
m_aErrorInformation.m_nColumn = XML_GetErrorColumnNumber( m_aParser );
|
||||
#endif
|
||||
|
||||
m_aErrorInformation.m_sMessage = "ERROR: "_ostr;
|
||||
if ( !pXMLFile->GetName().isEmpty())
|
||||
|
||||
@@ -315,11 +315,19 @@ public:
|
||||
public: //XLocator
|
||||
virtual sal_Int32 SAL_CALL getColumnNumber() override
|
||||
{
|
||||
#if (XML_MAJOR_VERSION > 2 || (XML_MAJOR_VERSION == 2 && XML_MINOR_VERSION >= 9))
|
||||
return XML_GetCurrentColumnNumber64( m_pParser->getEntity().pParser );
|
||||
#else
|
||||
return XML_GetCurrentColumnNumber( m_pParser->getEntity().pParser );
|
||||
#endif
|
||||
}
|
||||
virtual sal_Int32 SAL_CALL getLineNumber() override
|
||||
{
|
||||
#if (XML_MAJOR_VERSION > 2 || (XML_MAJOR_VERSION == 2 && XML_MINOR_VERSION >= 9))
|
||||
return XML_GetCurrentLineNumber64( m_pParser->getEntity().pParser );
|
||||
#else
|
||||
return XML_GetCurrentLineNumber( m_pParser->getEntity().pParser );
|
||||
#endif
|
||||
}
|
||||
virtual OUString SAL_CALL getPublicId() override
|
||||
{
|
||||
@@ -337,7 +345,11 @@ public: //XLocator
|
||||
}
|
||||
virtual sal_Int64 SAL_CALL getPosition() override
|
||||
{
|
||||
#if (XML_MAJOR_VERSION > 2 || (XML_MAJOR_VERSION == 2 && XML_MINOR_VERSION >= 9))
|
||||
return XML_GetCurrentByteIndex64( m_pParser->getEntity().pParser );
|
||||
#else
|
||||
return XML_GetCurrentByteIndex( m_pParser->getEntity().pParser );
|
||||
#endif
|
||||
}
|
||||
virtual ::sal_Int64 SAL_CALL getLength() override
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user