1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 20:49:11 +00:00

(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

This commit is contained in:
rubidium
2010-12-25 12:49:36 +00:00
parent d8b823142e
commit 2c4c6b4fe1
2 changed files with 13 additions and 13 deletions

View File

@@ -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;