Skip to content

Commit

Permalink
build: iconv does not have const input parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
alonbl committed May 7, 2012
1 parent ab6cd1d commit 786b2ca
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 32 deletions.
28 changes: 0 additions & 28 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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 <iconv.h>
#include <stdlib.h>
]],
[[
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"
Expand Down
5 changes: 1 addition & 4 deletions mp3unicode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,7 @@ class Converter {
if (
iconv (
cd,
#ifdef HAVE_OLD_ICONV
(char **)
#endif
&from,
(char **)&from,
&from_size,
&to,
&to_size
Expand Down

0 comments on commit 786b2ca

Please sign in to comment.