From 786b2ca1533c0caef987dd9d43f3a011b07c7251 Mon Sep 17 00:00:00 2001 From: Alon Bar-Lev Date: Mon, 7 May 2012 15:04:23 +0300 Subject: [PATCH] build: iconv does not have const input parameter. glibc was changed[1]. [1] http://sourceware.org/git/?p=glibc.git;a=commit;f=iconv/iconv.h;h=0efb48a1dfd132138a44c238b6e7f67a185a360e --- configure.ac | 28 ---------------------------- mp3unicode.cpp | 5 +---- 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/configure.ac b/configure.ac index dc578e4..4c91cac 100644 --- a/configure.ac +++ b/configure.ac @@ -95,34 +95,6 @@ AC_ARG_VAR([ICONV_LIBS], [linker flags for iconv]) CPPFLAGS="${CPPFLAGS} ${ICONV_CFLAGS}" LIBS="${LIBS} ${ICONV_LIBS}" -AC_MSG_CHECKING([iconv can handle const]) -OLD_CPPFLAGS="${CPPFLAGS}" -test "${GCC}" = "yes" && CPPFLAGS="${CPPFLAGS} -Werror" -AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include -#include - ]], - [[ -const char *test1 = NULL; -iconv ( - (iconv_t)0, - &test1, - NULL, - NULL, - NULL -); - ]] - )], - [AC_MSG_RESULT([yes])], - [ - AC_MSG_RESULT([no]) - AC_DEFINE([HAVE_OLD_ICONV], [1], [Iconv does not support const]) - ] -) -CPPFLAGS="${OLD_CPPFLAGS}" - if test "${enable_pedantic}" = "yes"; then enable_strict="yes"; CXXFLAGS="${CXXFLAGS} -pedantic" diff --git a/mp3unicode.cpp b/mp3unicode.cpp index 9f676c0..ca25941 100644 --- a/mp3unicode.cpp +++ b/mp3unicode.cpp @@ -229,10 +229,7 @@ class Converter { if ( iconv ( cd, -#ifdef HAVE_OLD_ICONV - (char **) -#endif - &from, + (char **)&from, &from_size, &to, &to_size