While trying out 4.9.1 I noticed that unicode.c now uses lots
of stdint-Types, but does not reference them by their
standard names, resulting in compilation errors:
http://en.wikipedia.org/wiki/Stdint.h
Also, on some (older) Unix systems iconv's second parameter
is of type const char ** rather than char **,
resulting in at least a warning for me.
The attached patch against the 4.9.1 release
fixes both issues.
Running http://www.imapwiki.org/ImapTest on 4.9.1 patched
this way looks pretty much the same as for vanilla
4.8.1, although it's hard to see exactly, as
courier-imap doesn't pass all their regression tests
at the moment:
http://www.imapwiki.org/ImapTest/ServerStatus
Thomas
diff -r 3b98ae7ddd4a unicode/unicode.c
--- a/unicode/unicode.c Fri May 06 14:05:40 2011 +0200
+++ b/unicode/unicode.c Fri May 06 15:12:53 2011 +0200
@@ -198,13 +198,13 @@
size_t utf7encodebuf_cnt;
/* Accumulated bits for base64 encoding */
- u_int32_t utf7bits;
+ uint32_t utf7bits;
/* How many bits in utf7bits */
- u_int16_t utf7bitcount;
+ uint16_t utf7bitcount;
/* Flag: in base64mode */
- u_int16_t utfmode;
+ uint16_t utfmode;
int errflag;
@@ -343,7 +343,7 @@
/* We better be getting UCS-2 here! */
- const u_int16_t *utext=(const u_int16_t *)text;
+ const uint16_t *utext=(const uint16_t *)text;
cnt /= 2;
while (cnt)
@@ -381,7 +381,7 @@
}
toutf7->utf7bits = (toutf7->utf7bits << 16) |
- (((u_int32_t)*utext) & 0xFFFF);
+ (((uint32_t)*utext) & 0xFFFF);
toutf7->utf7bitcount += 16;
++utext;
@@ -391,7 +391,7 @@
while (toutf7->utf7bitcount >= 6)
{
- u_int32_t v;
+ uint32_t v;
int n;
if (toutf7->errflag)
@@ -453,11 +453,11 @@
struct libmail_u_convert_hdr hdr;
/* Accumulated UCS-2 stream */
- u_int16_t convbuf[512];
+ uint16_t convbuf[512];
size_t convbuf_cnt;
/* Accumulated base64 bits */
- u_int32_t modbits;
+ uint32_t modbits;
/* How many bits extracted from a base64 stream */
@@ -583,7 +583,7 @@
/* Not in the base64 encoded stream */
convert_fromutf7_add(fromutf7,
- ((u_int16_t)*text) & 0xFFFF);
+ ((uint16_t)*text) & 0xFFFF);
++text;
--cnt;
continue;
@@ -619,7 +619,7 @@
/* Got a UCS-2 char */
int shiftcnt=fromutf7->modcnt - 16;
- u_int32_t v=fromutf7->modbits;
+ uint32_t v=fromutf7->modbits;
if (shiftcnt)
v >>= shiftcnt;
@@ -799,7 +799,7 @@
}
static void convert_flush(struct libmail_u_convert_iconv *);
-static void convert_flush_iconv(struct libmail_u_convert_iconv *, char **,
+static void convert_flush_iconv(struct libmail_u_convert_iconv *, const char **,
size_t *);
/*
@@ -883,7 +883,7 @@
static void convert_flush(struct libmail_u_convert_iconv *h)
{
- char *p;
+ const char *p;
size_t n;
if (h->bufcnt == 0 || h->errflag)
@@ -917,7 +917,7 @@
*/
static void convert_flush_iconv(struct libmail_u_convert_iconv *h,
- char **inbuf, size_t *inbytesleft)
+ const char **inbuf, size_t *inbytesleft)
{
int save_errno;
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Courier-imap mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap