summaryrefslogtreecommitdiff
path: root/src/os/unix
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-12-25 12:49:36 +0000
committerrubidium <rubidium@openttd.org>2010-12-25 12:49:36 +0000
commit2c4c6b4fe17326c8440de0f206165c0d1f11f985 (patch)
tree5f42b4517ca7579e77db42f8639443d95f0e599c /src/os/unix
parentd8b823142ed25f1d9417033a89632981d54e0c94 (diff)
downloadopenttd-2c4c6b4fe17326c8440de0f206165c0d1f11f985.tar.xz
(svn r21634) -Codechange: apparantly the "broken" iconv interface is the new official interface, so update the variable/definition naming slightly as it's not broken just different from the earlier iconv interface
Diffstat (limited to 'src/os/unix')
-rw-r--r--src/os/unix/unix.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/os/unix/unix.cpp b/src/os/unix/unix.cpp
index cec912bec..61a2b9f39 100644
--- a/src/os/unix/unix.cpp
+++ b/src/os/unix/unix.cpp
@@ -151,10 +151,10 @@ static const char *GetLocalCode()
static const char *convert_tofrom_fs(iconv_t convd, const char *name)
{
static char buf[1024];
- /* Work around buggy iconv implementation where inbuf is wrongly typed as
- * non-const. Correct implementation is at
- * http://www.opengroup.org/onlinepubs/007908799/xsh/iconv.html */
-#ifdef HAVE_BROKEN_ICONV
+ /* There are different implementations of iconv. The older ones,
+ * e.g. SUSv2, pass a const pointer, whereas the newer ones, e.g.
+ * IEEE 1003.1 (2004), pass a non-const pointer. */
+#ifdef HAVE_NON_CONST_ICONV
char *inbuf = const_cast<char*>(name);
#else
const char *inbuf = name;