Package: libmimetic-dev
Version: 0.9.6-1
Severity: normal
Tags: patch
Due to an error in the header file /usr/include/mimetic/body.h modern gcc
versions (>=4.3)
refuse to compile perfectly valid programs using an encoder of libmimetic.
A small self-contained example is:
#include <mimetic/mimetic.h>
#include <mimetic/message.h>
#include <string>
int main()
{
std::string body("This is the mail body");
mimetic::TextEntity *text = new mimetic::TextEntity(body, "utf-8");
if(text) {
mimetic::QP::Encoder qp;
text->body().code(qp);
}
}
This C++ program does not compile with gcc-4.4 due to const-correctness
problems. In more elaborate
examples other type conversion problems appear.
A less serious side effect of the bug is suboptimal performance.
The problem is fixed by the following patch which changes the code to the
version obviously intended by the author:
--- mimetic/body.h 2009-05-15 19:35:32.000000000 +0200
+++ mimetic-old/body.h 2009-06-01 00:15:20.000000000 +0200
@@ -137,7 +137,7 @@
if(codec.codeSizeMultiplier() > 1.0)
coded.reserve((size_type)::ceil(size() * codec.codeSizeMultiplier()));
- mimetic::code(begin(), end(), cc, back_inserter(coded) );
+ mimetic::code(begin(), end(), codec, back_inserter(coded) );
this->assign(coded);
return true;
}
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.18-6-amd64 (SMP w/1 CPU core)
Locale: LANG=de_AT.utf8, LC_CTYPE=de_AT.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages libmimetic-dev depends on:
ii libmimetic0 0.9.6-1 C++ MIME library (runtime)
libmimetic-dev recommends no packages.
Versions of packages libmimetic-dev suggests:
pn libmimetic-doc <none> (no description available)
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]