enigma-devel
[Top][All Lists]
Advanced

[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: Alexandros Tasos
Subject: Re: [Enigma-devel] Refresh of 1.01 Debian package in experimental - please help testing.
Date: Mon, 13 Jul 2009 10:03:07 +0300

Hi,

@Ronald: Sorry, I probably clicked BCC instead of CC.

@Erich: OK, I'll wait until Ubuntu syncs the Enigma package, then upgrade to karmic and test.
BTW, I found the request for syncing (it's actually a bug report):
https://bugs.launchpad.net/ubuntu/+source/enigma/+bug/398442

Greets,
Alexandros

2009/7/12 Ronald Lamprecht <address@hidden>
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 mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/enigma-devel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]