[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Enigma-devel] Refresh of 1.01 Debian package in experimental - ple
From: |
Ronald Lamprecht |
Subject: |
Re: [Enigma-devel] Refresh of 1.01 Debian package in experimental - please help testing. |
Date: |
Sun, 12 Jul 2009 22:59:48 +0200 |
User-agent: |
Thunderbird 2.0.0.22 (Windows/20090605) |
Hi,
Erich Schubert wrote:
However I just received a new bug report with respect to Xerces 3 and AMD64.
See attached patch which hopefully should resolve the issue. As I read
from the bug report at
http://bugs.debian.org/536682
it seems that it comes from assuming XMLSize_t == int which is true on
i386 but not on amd64.
It should also affect the 1.10 branch; the patch will likely apply
with some fuzz.
The syntax incompatibility has been introduced by Xerces revision 553923
on July 7th 2007. That has been unfortunatly the week in which my old PC
mainboard broke and I had to set up a new one. So I obviously missed
the notification and it did not cause compiler warnings on my system ...
Unfortunatly your fix is incomplete and breaks the backward
compatibility for Xerces 2.x. Please use the attached patch that has
been commited in r1755 to the trunk and r1756 to the 1.01 branch.
Greets,
Ronald
Index: src/Utf8ToXML.cc
===================================================================
--- src/Utf8ToXML.cc (revision 1754)
+++ src/Utf8ToXML.cc (working copy)
@@ -40,11 +40,19 @@
}
void Utf8ToXML::init(const char * const toTranscode) {
+#if _XERCES_VERSION >= 30000
+ XMLSize_t srcLength = std::strlen(toTranscode) + 1;
+ // make safe assumptions on utf-16 size
+ XMLSize_t maxDestLength = srcLength;
+ XMLSize_t charsEaten;
+ XMLSize_t destLength;
+#else
unsigned int srcLength = std::strlen(toTranscode) + 1;
// make safe assumptions on utf-16 size
unsigned int maxDestLength = srcLength;
unsigned int charsEaten;
unsigned int destLength;
+#endif
unsigned char *charSizes = new unsigned char[maxDestLength]; // just
junk
// make a buffer - size does not matter - the object is temporary
xmlString = new XMLCh[maxDestLength];
Index: src/XMLtoUtf8.cc
===================================================================
--- src/XMLtoUtf8.cc (revision 1754)
+++ src/XMLtoUtf8.cc (working copy)
@@ -27,11 +27,19 @@
namespace enigma
{
XMLtoUtf8::XMLtoUtf8(const XMLCh* const toTranscode) {
+#if _XERCES_VERSION >= 30000
+ XMLSize_t srcLength = XMLString::stringLen(toTranscode) + 1;
+ // make safe assumptions on utf-8 size
+ XMLSize_t maxDestLength = 3 * srcLength;
+ XMLSize_t charsEaten;
+ XMLSize_t destLength;
+#else
unsigned int srcLength = XMLString::stringLen(toTranscode) + 1;
// make safe assumptions on utf-8 size
unsigned int maxDestLength = 3 * srcLength;
unsigned int charsEaten;
unsigned int destLength;
+#endif
// make a buffer - size does not matter - the object is temporary
utf8String = new char[maxDestLength];
// transcode to utf-8 -- there are no unrepresentable chars
- [Enigma-devel] Refresh of 1.01 Debian package in experimental - please help testing., Erich Schubert, 2009/07/10
- Re: [Enigma-devel] Refresh of 1.01 Debian package in experimental - please help testing., Ronald Lamprecht, 2009/07/10
- Re: [Enigma-devel] Refresh of 1.01 Debian package in experimental - please help testing., Erich Schubert, 2009/07/10
- Re: [Enigma-devel] Refresh of 1.01 Debian package in experimental - please help testing., Ronald Lamprecht, 2009/07/10
- Re: [Enigma-devel] Refresh of 1.01 Debian package in experimental - please help testing., Alexandros Tasos, 2009/07/11
- Re: [Enigma-devel] Refresh of 1.01 Debian package in experimental - please help testing., Erich Schubert, 2009/07/12
- Re: [Enigma-devel] Refresh of 1.01 Debian package in experimental - please help testing.,
Ronald Lamprecht <=
- Re: [Enigma-devel] Refresh of 1.01 Debian package in experimental - please help testing., Alexandros Tasos, 2009/07/13
- Re: [Enigma-devel] Refresh of 1.01 Debian package in experimental - please help testing., Erich Schubert, 2009/07/15
- Re: [Enigma-devel] Refresh of 1.01 Debian package in experimental - please help testing., Erich Schubert, 2009/07/13