lftp-devel  

ICONV_CONST definition in Mac OS X

Jjgod Jiang
Sun, 06 Jan 2008 08:36:30 -0800

Hi,

When I was trying to build lftp-3.6.1 in Mac OS X 10.5.1, the system supplied libiconv requires the second argument of iconv() to be (const char **), but the configure script of lftp will generate a config.h file which have

#define ICONV_CONST

defined. It will cause the following build failure:

if /bin/sh ../libtool --silent --tag=CXX --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -O2 -Wall -Wwrite-strings -Woverloaded-virtual -fno-exceptions -fno-rtti -fno-implement-inlines -Winline -MT buffer.lo -MD -MP -MF ".deps/buffer.Tpo" -c -o buffer.lo buffer.cc; \ then mv -f ".deps/buffer.Tpo" ".deps/buffer.Plo"; else rm -f ".deps/buffer.Tpo"; exit 1; fi buffer.cc: In member function 'virtual void DataRecoder::PutTranslated(Buffer*, const char*, int)':
buffer.cc:270: error: invalid conversion from 'char**' to 'const char**'
buffer.cc:270: error: initializing argument 2 of 'size_t libiconv(void*, const char**, size_t*, char**, size_t*)'
make[1]: *** [buffer.lo] Error 1
make: *** [all-recursive] Error 1

I wondering if something we can do to fix this.

- Jiang
  • ICONV_CONST definition in Mac OS X Jjgod Jiang