From: <man...@us...> - 2013-11-27 15:18:52
|
Revision: 3325 http://sourceforge.net/p/modplug/code/3325 Author: manxorist Date: 2013-11-27 15:18:44 +0000 (Wed, 27 Nov 2013) Log Message: ----------- [Ref] Avoid potential macro redefinition warning in BuildSettings.h with different build systems or compiler settings. [Fix] libopenmpt: Do not assume building in_openmpt, xmp-openmpt and libopenmpt_modplug into the same DLL as libopenmpt itself. Decouple these from LIBOPENMPT_BUILD macro, libopenmpt_internal.h and BuildSettings.h . Modified Paths: -------------- trunk/OpenMPT/common/BuildSettings.h trunk/OpenMPT/common/version.cpp trunk/OpenMPT/libopenmpt/libopenmpt_modplug.c trunk/OpenMPT/libopenmpt/libopenmpt_winamp.cpp trunk/OpenMPT/libopenmpt/libopenmpt_xmplay.cpp Modified: trunk/OpenMPT/common/BuildSettings.h =================================================================== --- trunk/OpenMPT/common/BuildSettings.h 2013-11-27 02:20:27 UTC (rev 3324) +++ trunk/OpenMPT/common/BuildSettings.h 2013-11-27 15:18:44 UTC (rev 3325) @@ -283,8 +283,12 @@ #endif #if MPT_COMPILER_MSVC +#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS // Define to disable the "This function or variable may be unsafe" warnings. +#endif #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1 #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT 1 +#ifndef _SCL_SECURE_NO_WARNINGS #define _SCL_SECURE_NO_WARNINGS #endif +#endif Modified: trunk/OpenMPT/common/version.cpp =================================================================== --- trunk/OpenMPT/common/version.cpp 2013-11-27 02:20:27 UTC (rev 3324) +++ trunk/OpenMPT/common/version.cpp 2013-11-27 15:18:44 UTC (rev 3325) @@ -317,10 +317,6 @@ "Pel K. Txnder for the scrolling credits control :)\n" "http://tinyurl.com/4yze8\n" #endif -#if defined(LIBOPENMPT_BUILD) && !defined(NO_XMPLAY) - "Arseny Kapoulkine for pugixml\n" - "http://pugixml.org/\n" -#endif "\n" "The people at ModPlug forums for crucial contribution\n" "in the form of ideas, testing and support; thanks\n" @@ -329,7 +325,6 @@ "christofori, Diamond, Ganja, Georg, Goor00, jmkz,\n" "KrazyKatz, LPChip, Nofold, Rakib, Sam Zen\n" "Skaven, Skilletaudio, Snu, Squirrel Havoc, Waxhead\n" - "\n" #ifndef NO_VST "\n" "VST PlugIn Technology by Steinberg Media Technologies GmbH\n" Modified: trunk/OpenMPT/libopenmpt/libopenmpt_modplug.c =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_modplug.c 2013-11-27 02:20:27 UTC (rev 3324) +++ trunk/OpenMPT/libopenmpt/libopenmpt_modplug.c 2013-11-27 15:18:44 UTC (rev 3325) @@ -7,16 +7,18 @@ * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. */ -#include "BuildSettings.h" - #ifndef NO_LIBMODPLUG +#ifdef LIBOPENMPT_BUILD_DLL +#undef LIBOPENMPT_BUILD_DLL +#endif + #ifdef _MSC_VER +#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS +#endif #endif /* _MSC_VER */ -#include "libopenmpt_internal.h" - #include "libopenmpt.h" #include <limits.h> @@ -30,7 +32,7 @@ /* msvc errors when seeing dllexport declarations after prototypes have been declared in modplug.h */ #define LIBOPENMPT_MODPLUG_API #else /* !_MSC_VER */ -#define LIBOPENMPT_MODPLUG_API LIBOPENMPT_API +#define LIBOPENMPT_MODPLUG_API LIBOPENMPT_API_HELPER_EXPORT #endif /* _MSC_VER */ #include "libmodplug/modplug.h" Modified: trunk/OpenMPT/libopenmpt/libopenmpt_winamp.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_winamp.cpp 2013-11-27 02:20:27 UTC (rev 3324) +++ trunk/OpenMPT/libopenmpt/libopenmpt_winamp.cpp 2013-11-27 15:18:44 UTC (rev 3325) @@ -7,12 +7,18 @@ * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. */ -#include "BuildSettings.h" - #ifndef NO_WINAMP -#include "libopenmpt_internal.h" +#ifdef LIBOPENMPT_BUILD_DLL +#undef LIBOPENMPT_BUILD_DLL +#endif +#ifdef _MSC_VER +#ifndef _CRT_SECURE_NO_WARNINGS +#define _CRT_SECURE_NO_WARNINGS +#endif +#endif // _MSC_VER + #include "libopenmpt.hpp" #include "libopenmpt_settings.hpp" @@ -20,8 +26,6 @@ #include "svn_version.h" static char * in_openmpt_string = "in_openmpt " OPENMPT_API_VERSION_STRING "." OPENMPT_API_VERSION_STRINGIZE(OPENMPT_VERSION_REVISION); -#define LIBOPENMPT_WINAMP_API LIBOPENMPT_API - #define NOMINMAX #include <windows.h> @@ -441,7 +445,7 @@ 0 // out_mod }; -extern "C" LIBOPENMPT_WINAMP_API In_Module * winampGetInModule2() { +extern "C" __declspec(dllexport) In_Module * winampGetInModule2() { return &inmod; } Modified: trunk/OpenMPT/libopenmpt/libopenmpt_xmplay.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_xmplay.cpp 2013-11-27 02:20:27 UTC (rev 3324) +++ trunk/OpenMPT/libopenmpt/libopenmpt_xmplay.cpp 2013-11-27 15:18:44 UTC (rev 3325) @@ -7,12 +7,18 @@ * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. */ -#include "BuildSettings.h" - #ifndef NO_XMPLAY -#include "libopenmpt_internal.h" +#ifdef LIBOPENMPT_BUILD_DLL +#undef LIBOPENMPT_BUILD_DLL +#endif +#ifdef _MSC_VER +#ifndef _CRT_SECURE_NO_WARNINGS +#define _CRT_SECURE_NO_WARNINGS +#endif +#endif // _MSC_VER + #include "libopenmpt.hpp" #include "libopenmpt_settings.hpp" @@ -267,6 +273,10 @@ } std::ostringstream credits; credits << openmpt::string::get( openmpt::string::credits ); + credits << "Additional thanks to:" << std::endl; + credits << std::endl; + credits << "Arseny Kapoulkine for pugixml" << std::endl; + credits << "http://pugixml.org/" << std::endl; MessageBox( win, StringDecode( credits.str(), CP_UTF8 ).c_str(), TEXT(SHORT_TITLE), MB_ICONINFORMATION ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |