Good morning Predrag.

Predrag Punosevac <punoseva...@gmail.com> wrote:
 |Is this expected behaviour of 14.8.13
 |
 |# uname -a
 |OpenBSD oko.bagdala2.net 6.0 GENERIC.MP#2 amd64
 |
 |  CC imap.c
 |imap.c: In function 'imap_path_encode':
 |imap.c:376: error: 'iconv_t' undeclared (first use in this function)
 |imap.c:376: error: (Each undeclared identifier is reported only once
 |imap.c:376: error: for each function it appears in.)
 |imap.c:376: error: expected ';' before 'icd'
 |imap.c:380: error: 'icd' undeclared (first use in this function)
 |imap.c:380: warning: implicit declaration of function 'iconv_open'
 |imap.c:387: warning: implicit declaration of function 'n_iconv_str'
 |imap.c:392: warning: implicit declaration of function 'iconv_close'
 |imap.c: In function 'imap_path_decode':
 |imap.c:700: error: 'iconv_t' undeclared (first use in this function)
 |imap.c:700: error: expected ';' before 'icd'
 |imap.c:704: error: 'icd' undeclared (first use in this function)
 |*** Error 1 in . (./mk.mk:97 'imap.o': @if [ -z "" ]; then echo '  CC
 |imap.c'; else echo '  $ /usr/bin/gcc -DNDEBUG  -std=c99 -O3 -Wall
 |-Wex...)
 |*** Error 1 in /root/s-nail (makefile:9 'all')

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
found on the system.  And/or i need to add another configuration
option for systems which only provide an UTF-8 locale, so that the
iconv step is simply not needed at all!  That is better, i'll do
that one.

Thanks for reporting this!
You could get it going the way you want with the attached patch.
Ciao!

--steffen
--- imap.c.orig	2016-10-20 12:52:58.015737321 +0200
+++ imap.c	2016-10-20 12:52:33.482536895 +0200
@@ -371,6 +371,7 @@ imap_path_encode(char const *cp, bool_t
     * 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
          else if(c <= 0x1F || c >= 0x7F || c == '&')
             break;
    }
+#endif
 
    /* 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
 
    *err_or_null = FAL0;
    rv = rv_base;
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
__________________________________
S-nail-users@lists.sourceforge.net

Reply via email to