all repos — fluxbox @ 622af75c929bfc3f49e3a13775f356be1fd17ee6

custom fork of the fluxbox windowmanager

checking for const msg in iconv
fluxgen fluxgen
commit

622af75c929bfc3f49e3a13775f356be1fd17ee6

parent

82de6ace6d64b95ec495a3a9df57d5729029825f

1 files changed, 13 insertions(+), 2 deletions(-)

jump to
M configure.inconfigure.in

@@ -63,7 +63,7 @@ AC_MSG_RESULT(yes)

], [AC_MSG_RESULT(no)]) -AC_MSG_CHECKING([iconv]) +AC_MSG_CHECKING([for iconv]) AC_TRY_COMPILE( [#include <iconv.h>], [iconv_t cd = iconv_open("", "")],

@@ -72,7 +72,18 @@ HAVE_ICONV=no)

if test x"$HAVE_ICONV" = x"yes"; then AC_DEFINE(HAVE_ICONV, 1, "iconv") - AC_MSG_RESULT([yes]) +dnl now check for const char *msg argument in iconv(..) + AC_TRY_COMPILE( + [#include <iconv.h>], + [ + char **msg, **new_msg; + size_t result, inleft, outleft; + result = iconv((iconv_t)(-1), msg, &inleft, new_msg, &outleft); + return 0; + ], + [ AC_MSG_RESULT([yes (non const msg)])], + [ AC_DEFINE(HAVE_CONST_ICONV, 1, "iconv") + AC_MSG_RESULT([yes (const msg)])]) else AC_MSG_RESULT([no]) fi