From 09b5dfbd5391429d2eb217855125b06b2226f32f Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Thu, 22 Jul 2010 07:55:35 +0000 Subject: Prevent Python from stripping off the final newline of the main(){} autoconfiguration tests. Some versions of gcc care enough about ANSI C to complain about this. Use the Linux install hierarchy conventions on other Unices as well. XKeysymToString returns NULL on unknown keysyms, which is not a valid std::string initializer. There appears to be some disagreement regarding the second parameter to iconv(). Some versions/installations have it as const, others don't. Unfortunately, due to wonderful C++ brain damage, implicit conversion from const to non-const doesn't work here. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5945 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DiscIO/Src/BannerLoader.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Source/Core/DiscIO/Src/BannerLoader.cpp') diff --git a/Source/Core/DiscIO/Src/BannerLoader.cpp b/Source/Core/DiscIO/Src/BannerLoader.cpp index 40c4d7e278..168dbd31fb 100644 --- a/Source/Core/DiscIO/Src/BannerLoader.cpp +++ b/Source/Core/DiscIO/Src/BannerLoader.cpp @@ -31,6 +31,13 @@ #include #endif +#ifdef __FreeBSD__ +#define ICONV_CONST const +#endif +#ifndef ICONV_CONST +#define ICONV_CONST +#endif + namespace DiscIO { void IBannerLoader::CopyToStringAndCheck(std::string& _rDestination, const char* _src) @@ -154,7 +161,9 @@ bool IBannerLoader::CopyBeUnicodeToString( std::string& _rDestination, const u16 char* utf8_buffer_start = utf8_buffer; char* src_buffer_start = src_buffer; - size_t iconv_size = iconv(conv_desc, &src_buffer, &inbytes, &utf8_buffer, &outbytes); + size_t iconv_size = iconv(conv_desc, + (ICONV_CONST char**)&src_buffer, &inbytes, + &utf8_buffer, &outbytes); // Handle failures if (iconv_size == (size_t) -1) -- cgit v1.2.3