Skip to content

Commit

Permalink
On FreeBSD, const char* is always used in iconv API
Browse files Browse the repository at this point in the history
  • Loading branch information
AMDmi3 committed Jan 13, 2013
1 parent bbe0631 commit ee99c3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ bool UTF16ToUTF8(const uint16 *source, char *dest, size_t length)
}

const char *source_char = reinterpret_cast<const char *>(source);
#if (defined(_LIBICONV_VERSION) && _LIBICONV_VERSION == 0x0109)
#if (defined(_LIBICONV_VERSION) && _LIBICONV_VERSION == 0x0109) || defined(__FreeBSD__)
// We are using an iconv API that uses const char*
const char *sourceChar = source_char;
#else
Expand Down Expand Up @@ -421,7 +421,7 @@ bool UTF8ToUTF16(const char *source, uint16 *dest, size_t length)
return false;
}

#if (defined(_LIBICONV_VERSION) && _LIBICONV_VERSION == 0x0109)
#if (defined(_LIBICONV_VERSION) && _LIBICONV_VERSION == 0x0109) || defined(__FreeBSD__)
// We are using an iconv API that uses const char*
const char *sourceChar = source;
#else
Expand Down

0 comments on commit ee99c3b

Please sign in to comment.