Daniel Veillard wrote:
On Sat, Nov 24, 2007 at 12:19:26AM +0200, Roumen Petrov wrote:Daniel Veillard wrote:On Thu, Nov 22, 2007 at 11:29:49PM +0100, Hannes Eder wrote:the attached patch fixes the warnings below in libxml2-2.6.28:In general it's best to report with the latest versions 2.6.30 ATMcompiler: gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125) and yes ... it's cygwin ;) encoding.c:1706: warning: passing arg 2 of `libiconv' from incompatible pointer typeDiverging definitions for iconv() . man iconv on Linux states: size_t iconv(iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft); so that patch can't be applied, sorryAgain replying to old mails...If you use AM_ICONV in configure.ac you will see a check for iconvWhat version of automake is required for this special heck to work. Remember that I want to be able to configure, and potentiall autogen in very very old platforms. i can't rely on recent support from the auto* tools.declaration and you should take care if ICONV_CONST is defined !FYI Second argument of function is const when iconv is build as separate library.So that please update configure.ac as add AM_ICONV macro and update source to use ICONV_CONST at right places.No idea how to use AM_ICONV and ICONV_CONST, honnestly, it's probably not worth the hassle considering it's just a warning. i'm afraid there is more risk trying to fix this than leaving it alone. Daniel
AM_ICONV is defined in iconv.m4. I can found it in gettext-0.10.38 (gnu site begin with gettext-0.10.40 from 15-Sep-2001).
The macro use AC_DEFINE_UNQUOTED, AC_TRY_COMPILE, AC_TRY_LINK.
I can found them in autoconf 2.50 but I'm not sure for 2.13.
So that for AM_ICONV: AC_PREREQ(2.50) is sufficient.
sample code:
iconv_t cd = ...
...
{
ICONV_CONST char *s = (ICONV_CONST char*) inbuf;
size_t res;
res = iconv (cd, &s, ....);
}
...
Roumen