[Scummvm-cvs-logs] SF.net SVN: scummvm:[49868] scummvm/trunk
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Tue Jun 15 19:13:42 CEST 2010
Revision: 49868
http://scummvm.svn.sourceforge.net/scummvm/?rev=49868&view=rev
Author: lordhoto
Date: 2010-06-15 17:13:42 +0000 (Tue, 15 Jun 2010)
Log Message:
-----------
Fix iconv signature on BSD systems. (Based on what we do in tools/)
Modified Paths:
--------------
scummvm/trunk/common/translation.cpp
scummvm/trunk/configure
Modified: scummvm/trunk/common/translation.cpp
===================================================================
--- scummvm/trunk/common/translation.cpp 2010-06-15 17:13:18 UTC (rev 49867)
+++ scummvm/trunk/common/translation.cpp 2010-06-15 17:13:42 UTC (rev 49868)
@@ -119,7 +119,11 @@
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;
Modified: scummvm/trunk/configure
===================================================================
--- scummvm/trunk/configure 2010-06-15 17:13:18 UTC (rev 49867)
+++ scummvm/trunk/configure 2010-06-15 17:13:42 UTC (rev 49868)
@@ -2349,6 +2349,18 @@
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)"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list