Deal with iconv prototype changing with versions (hopefully right this time)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4416 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
bba70f8c5a
commit
0f964187fe
@ -59,7 +59,7 @@ const char* CODE_NAMES[] =
|
|||||||
* This code is assuming the iconv call for initializing the state
|
* This code is assuming the iconv call for initializing the state
|
||||||
* won't fail due to lack of space in the output buffer.
|
* won't fail due to lack of space in the output buffer.
|
||||||
*/
|
*/
|
||||||
#if _LIBICONV_VERSION < 0x010B
|
#if defined(__APPLE__) && _LIBICONV_VERSION < 0x010B
|
||||||
#define INIT_SHIFT_STATE(cd, fptr, ileft, tptr, oleft) \
|
#define INIT_SHIFT_STATE(cd, fptr, ileft, tptr, oleft) \
|
||||||
{ \
|
{ \
|
||||||
fptr = NULL; \
|
fptr = NULL; \
|
||||||
@ -103,7 +103,7 @@ bool convertToEncoding(const char* from, char* to, const int BUF_SIZE, const cha
|
|||||||
tptr = to;
|
tptr = to;
|
||||||
oleft = BUFSIZ;
|
oleft = BUFSIZ;
|
||||||
|
|
||||||
#if _LIBICONV_VERSION < 0x010B
|
#if defined(__APPLE__) && _LIBICONV_VERSION < 0x010B
|
||||||
ret = iconv(cd, &fptr, &ileft, &tptr, &oleft);
|
ret = iconv(cd, &fptr, &ileft, &tptr, &oleft);
|
||||||
#else
|
#else
|
||||||
ret = iconv(cd, const_cast<char**>(&fptr), &ileft, &tptr, &oleft);
|
ret = iconv(cd, const_cast<char**>(&fptr), &ileft, &tptr, &oleft);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user