diff options
| -rwxr-xr-x | common/translation.cpp | 4 | ||||
| -rwxr-xr-x | configure | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/common/translation.cpp b/common/translation.cpp index 7346441d27..7dfb3fcc8e 100755 --- a/common/translation.cpp +++ b/common/translation.cpp @@ -119,7 +119,11 @@ bool TranslationManager::convert(const char *message) { char *msgcpy = new char[len + 1]; strcpy(msgcpy, message); char *msg = msgcpy; +#ifdef ICONV_USES_CONST + const char **pmsg = &msg; +#else char **pmsg = &msg; +#endif // Preparing conversion destination size_t len2 = _sizeconv; @@ -2349,6 +2349,18 @@ EOF add_to_config_h_if_yes $_termconv '#define TERMCONV' if test "$_termconv" = yes ; then + uses_const=no + cat > $TMPC << EOF +#include <iconv.h> +int main(int argc, char **argv) { + iconv_t iconvP; + const char **inbuf = 0; + iconv(iconvP, inbuf, 0, 0, 0); + return 0; +} +EOF + cc_check $LDFLAGS $LIBS $CXXFLAGS && uses_const=yes + add_to_config_h_if_yes $uses_const '#define ICONV_USES_CONST' echo "with terminal conversion)" else echo "without terminal conversion)" |
