diff --git a/SconsTests/utils.py b/SconsTests/utils.py index a3b63a4d8b..8c5c45c770 100644 --- a/SconsTests/utils.py +++ b/SconsTests/utils.py @@ -16,8 +16,8 @@ def CheckLib(context, name): ret = context.TryLink(""" int main(int argc, char **argv) { return 0; - } - """, '.c') + } + \n""", '.c') if not ret: context.env.Replace(LIBS = lastLIBS) @@ -72,7 +72,7 @@ def CheckPortaudio(context, version): printf("%d", Pa_GetVersion()); return 0; } - """, '.c')[1] + \n""", '.c')[1] if found: ret = (version <= found) diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp index e7736f2d5b..1080ae3f08 100644 --- a/Source/Core/Common/Src/FileUtil.cpp +++ b/Source/Core/Common/Src/FileUtil.cpp @@ -652,13 +652,11 @@ const char *GetUserPath(int DirIDX) #ifdef _WIN32 // Keep the directory setup the way it was on windows snprintf(UserDir, sizeof(UserDir), ROOT_DIR DIR_SEP USERDATA_DIR DIR_SEP); -#elif defined (__linux__) +#else if (File::Exists(ROOT_DIR DIR_SEP USERDATA_DIR)) snprintf(UserDir, sizeof(UserDir), ROOT_DIR DIR_SEP USERDATA_DIR DIR_SEP); else snprintf(UserDir, sizeof(UserDir), "%s" DIR_SEP DOLPHIN_DATA_DIR DIR_SEP, getenv("HOME")); -#else - snprintf(UserDir, sizeof(UserDir), "%s" DIR_SEP DOLPHIN_DATA_DIR DIR_SEP, getenv("HOME")); #endif INFO_LOG(COMMON, "GetUserPath: Setting user directory to %s:", UserDir); diff --git a/Source/Core/Core/Src/HW/BBA-TAP/TAP_Unix.cpp b/Source/Core/Core/Src/HW/BBA-TAP/TAP_Unix.cpp index 5ae365052b..5bf8658ff7 100644 --- a/Source/Core/Core/Src/HW/BBA-TAP/TAP_Unix.cpp +++ b/Source/Core/Core/Src/HW/BBA-TAP/TAP_Unix.cpp @@ -82,8 +82,10 @@ bool CEXIETHERNET::activate() { system("brctl addif pan0 Dolphin"); system("ifconfig Dolphin 0.0.0.0 promisc up"); resume(); -#endif return true; +#else + return false; +#endif } bool CEXIETHERNET::CheckRecieved() { 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) diff --git a/Source/Core/DolphinWX/Src/GeckoCodeDiag.cpp b/Source/Core/DolphinWX/Src/GeckoCodeDiag.cpp index 888dc503b1..23b6d38985 100644 --- a/Source/Core/DolphinWX/Src/GeckoCodeDiag.cpp +++ b/Source/Core/DolphinWX/Src/GeckoCodeDiag.cpp @@ -109,4 +109,4 @@ void CodeConfigPanel::ApplyChanges(wxCommandEvent&) } -} \ No newline at end of file +} diff --git a/Source/Core/DolphinWX/Src/GeckoCodeDiag.h b/Source/Core/DolphinWX/Src/GeckoCodeDiag.h index 44e4836a62..f0374f7efd 100644 --- a/Source/Core/DolphinWX/Src/GeckoCodeDiag.h +++ b/Source/Core/DolphinWX/Src/GeckoCodeDiag.h @@ -42,4 +42,4 @@ private: } -#endif \ No newline at end of file +#endif diff --git a/Source/Core/InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp b/Source/Core/InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp index 68294ebfc2..f1dcbaa79a 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp +++ b/Source/Core/InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp @@ -113,9 +113,10 @@ KeyboardMouse::Key::Key(Display* const display, KeyCode keycode) if (keysym >= 97 && keysym <= 122) keysym -= 32; - // 0x0110ffff is the top of the unicode character range according to keysymdef.h - // although it is probably more than we need. - if (keysym == NoSymbol || keysym > 0x0110ffff) + // 0x0110ffff is the top of the unicode character range according + // to keysymdef.h although it is probably more than we need. + if (keysym == NoSymbol || keysym > 0x0110ffff || + XKeysymToString(keysym) == NULL) m_keyname = std::string(); else m_keyname = std::string(XKeysymToString(keysym)); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp index 27aaf725d5..04c481178d 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp @@ -337,4 +337,4 @@ void PixelShaderCache::SetCurrentShader(GLuint Shader) CurrentShader = Shader; glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, CurrentShader); } -} \ No newline at end of file +} diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderCache.cpp index 8c34d3377b..43f6e7a9c9 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderCache.cpp @@ -259,4 +259,4 @@ void VertexShaderCache::SetCurrentShader(GLuint Shader) CurrentShader = Shader; glBindProgramARB(GL_VERTEX_PROGRAM_ARB, CurrentShader); } -} \ No newline at end of file +} diff --git a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteConfigDiag.cpp b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteConfigDiag.cpp index 848fec8b84..2b285e66de 100644 --- a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteConfigDiag.cpp +++ b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteConfigDiag.cpp @@ -111,4 +111,4 @@ void WiimoteConfigDiag::Save(wxCommandEvent& event) inifile.Save(ini_filename); Close(); -} \ No newline at end of file +} diff --git a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteConfigDiag.h b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteConfigDiag.h index 07471e920e..1aed269dd1 100644 --- a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteConfigDiag.h +++ b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteConfigDiag.h @@ -46,4 +46,4 @@ private: }; -#endif \ No newline at end of file +#endif