Package: libxalan-c111 Version: 1.11-6 Severity: important Tags: patch
The attached patch corrects some broken assumptions about the nature of XMLCh* in the xalan source.
See https://issues.apache.org/jira/browse/XALANC-773 This is required for xerces 3.2.0 where XMLCh == char16_t. Regards, Roger
diff -urN xalan-c-1.11.orig/c/src/xalanc/PlatformSupport/DirectoryEnumerator.hpp xalan-c-1.11/c/src/xalanc/PlatformSupport/DirectoryEnumerator.hpp --- xalan-c-1.11.orig/c/src/xalanc/PlatformSupport/DirectoryEnumerator.hpp 2012-03-19 16:18:10.000000000 +0000 +++ xalan-c-1.11/c/src/xalanc/PlatformSupport/DirectoryEnumerator.hpp 2017-08-09 12:05:08.604342028 +0100 @@ -84,7 +84,7 @@ const XalanDOMChar* getName() const { - return name; + return const_cast<XalanDOMChar*>(reinterpret_cast<const XalanDOMChar*>(&name[0])); } /** @@ -261,7 +261,7 @@ #pragma warning(disable: 4244) theHandleType theSearchHandle = _wfindfirst( - const_cast<wchar_t*>(theConversionFunction(theFullSearchSpec)), + reinterpret_cast<wchar_t*>(const_cast<XalanDOMChar*>(theConversionFunction(theFullSearchSpec))), &theFindData); #pragma warning(pop) diff -urN xalan-c-1.11.orig/c/src/xalanc/PlatformSupport/DOMStringHelper.cpp xalan-c-1.11/c/src/xalanc/PlatformSupport/DOMStringHelper.cpp --- xalan-c-1.11.orig/c/src/xalanc/PlatformSupport/DOMStringHelper.cpp 2012-03-19 16:18:10.000000000 +0000 +++ xalan-c-1.11/c/src/xalanc/PlatformSupport/DOMStringHelper.cpp 2017-08-09 12:05:08.604342028 +0100 @@ -868,7 +868,7 @@ const XalanDOMChar* theRHS) { #if defined(XALAN_USE_WINDOWS_COLLATION) - return _wcscoll_l(theLHS, theRHS, s_locale); + return _wcscoll_l(reinterpret_cast<const wchar_t *>(theLHS), reinterpret_cast<const wchar_t *>(theRHS), s_locale); #else return doCollationCompare( theLHS, diff -urN xalan-c-1.11.orig/c/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp xalan-c-1.11/c/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp --- xalan-c-1.11.orig/c/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp 2012-03-19 16:18:10.000000000 +0000 +++ xalan-c-1.11/c/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp 2017-08-09 12:05:08.604342028 +0100 @@ -123,7 +123,7 @@ #if defined(XALAN_WINDOWS) HandleType theFileHandle = CreateFileW( - theFileName.c_str(), + reinterpret_cast<const wchar_t *>(theFileName.c_str()), GENERIC_WRITE, 0, 0,