Huhu, Predrag!
Predrag Punosevac <[email protected]> wrote:
|Steffen Nurpmeso <[email protected]> wrote:
|> Predrag Punosevac <[email protected]> wrote:
|>|Is this expected behaviour of 14.8.13
...
|>|imap.c: In function 'imap_path_encode':
|>|imap.c:376: error: 'iconv_t' undeclared (first use in this function)
...
|> Oh - you don't have libiconv installed? Oh yes, it seems i have
|> missed this dependency, IMAP needs to be disabled if iconv is not
...
|No IMAP support compiled in.
|Can't canonicalize "/home/predrag/imaps://[email protected]"
Ugh -- what is that? ^.^
...
|I am just too tired to look what went wrong with this but I sadly I am
The problem is that even OpenBSD has a "C" locale, and that should
return a MB_CUR_MAX of 1. I haven't tried that though, and
i dislike all the standard syntax that possibly leaves a door open
to allow MB_CUR_MAX of 4 for "C" ("C.UTF-8" then indeed). Could
be, or not.
Anyway S-nail should be a portable program, and i cannot maintain
a forest of preprocessor conditions for each and every
possibility. I.e., Kernighan i guess it was who disliked such
forests a lot and wrote (as of memory) that normal C conditions
should be used on constant expressions, because the compiler would
be smart enough to optimize them out. But that of course doesn't
work in inhomogenuous environments where functions which are used
in some condition simply don't exist! I.e., i have to write
#ifdef HAVE_ICONV
if(iconv(...) != 0)
...
#endif
instead of being able to say
if(HAVE_ICONV && iconv...
even if HAVE_ICONV is a constant with value 0. That is just one
more shit decision of the C standard committee.
On [master] i thus have introduced OPT_ALWAYS_UNICODE_LOCALE which
defaults to true for $OS=openbsd, but even that won't help us out
(despite the fact that [master] has no IMAP support at the moment)
because even with OPT_ALWAYS_UNICODE_LOCALE all we know is that
there is "C", and any other locale is UTF-8 based. I can slowly
take some more advantage of that as time and development passes,
but still we need to be prepared for HAVE_ICONV in that IMAP case
because of "C", right? Or should i assume "C.UTF-8" even in that
case? This is something to be careful with, and it needs testing
and/or experienced voices which are raised.
|back to 14.8.12 as you can see.
So just for you there is the attached patch for v14.8.14. You
need to set $FOR_PREDRAG, as in
$ FOR_PREDRAG=yes make all
|cups-filters-1.9.0p0
|cups-libs-2.1.4
...
|foomatic-db-engine-4.0.12p0
Terrible, is it? I always hated cups. Nothing can beat
a Postscript printer, for decades. Just my one cent.
--steffen
diff --git a/imap.c b/imap.c
index ea023d9..1528105 100644
--- a/imap.c
+++ b/imap.c
@@ -371,6 +371,7 @@ imap_path_encode(char const *cp, bool_t *err_or_null){
* local charset to UTF-8, then convert all characters which need to be
* encoded (except plain "&") to UTF-16BE first, then that to mUTF-7.
* We can skip the UTF-8 conversion occasionally, however */
+#ifdef HAVE_ICONV
if(!(options & OPT_UNICODE)){
int ir;
iconv_t icd;
@@ -405,6 +406,7 @@ imap_path_encode(char const *cp, bool_t *err_or_null){
else if(c <= 0x1F || c >= 0x7F || c == '&')
break;
}
+#endif /* HAVE_ICONV */
/* We need to encode, save what we have, encode the rest */
l_plain = l;
@@ -695,6 +697,7 @@ jeincpl:
*rv = '\0';
/* We can skip the UTF-8 conversion occasionally */
+#ifdef HAVE_ICONV
if(!(options & OPT_UNICODE)){
int ir;
iconv_t icd;
@@ -717,6 +720,7 @@ jeincpl:
if(ir != 0)
goto jerr;
}
+#endif /* HAVE_ICONV */
*err_or_null = FAL0;
rv = rv_base;
diff --git a/mk-conf.sh b/mk-conf.sh
index 60166a1..c15f77a 100644
--- a/mk-conf.sh
+++ b/mk-conf.sh
@@ -137,7 +137,7 @@ option_update() {
WANT_GSSAPI=0
fi
- if feat_no ICONV; then
+ if feat_no ICONV && [ -z "${FOR_PREDRAG}"} ]; then
WANT_IMAP=0
fi
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
__________________________________
[email protected]