On Thu, Mar 13, 2008 at 10:35:23PM +0100, Christian Kellermann wrote:
Dear List,
let me again thank you for your great efforts! One minor thing I stumbled upon today's update: My System has the following iconv signature: size_t iconv (iconv_t cd, const char* * inbuf, size_t * inbytesleft, char* * outbuf, size_t * outbytesleft);
I therefore need something like the following to make dillo compile (an work) again:
Index: src/html.cc =================================================================== RCS file: /sfhome/cvs/dillo/dillo2/src/html.cc,v retrieving revision 1.48 diff -b -u -p -r1.48 html.cc --- src/html.cc 13 Mar 2008 14:58:44 -0000 1.48 +++ src/html.cc 13 Mar 2008 21:43:26 -0000 @@ -3844,7 +3844,8 @@ static Dstr *Html_encode_text(iconv_t en int rc = 0; Dstr *output; const int bufsize = 128; - char *buffer, *inPtr, *outPtr; + const char *inPtr; + char *buffer, *outPtr; size_t inLeft, outRoom; bool bad_chars = false;
You will also need to patch decode.c.
I hope this does not break other systems.
Unfortunately it does. Your system conforms to the old standard: http://www.opengroup.org/onlinepubs/007908799/xsh/iconv.html Glibc conforms to the new one: http://www.opengroup.org/onlinepubs/009695399/functions/iconv.html One way I see to overcome this in Dillo is to define an inbuf_t from autoconf, and to use it in html.cc and decode.cc. If configure.in checks for a longer program, like: #include <iconv.h> int main(void) { const char *inPtr; char *outPtr; size_t inLeft = 0, outRoom = 0; iconv_t encoder = iconv_open("ASCII", "UTF-8"); iconv(encoder, &inPtr, &inLeft, &outPtr, &outRoom); return 0; } using gcc -Werror, if it passes, #define inbuf_t const char You can try this in your system. (but first check a simple "#define inbuf_t const char" in config.h, plus the respective patch). -- Cheers Jorge.-