From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- external/cppunit/windows.patch | 50 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 external/cppunit/windows.patch (limited to 'external/cppunit/windows.patch') diff --git a/external/cppunit/windows.patch b/external/cppunit/windows.patch new file mode 100644 index 000000000..e6ca26cbb --- /dev/null +++ b/external/cppunit/windows.patch @@ -0,0 +1,50 @@ +--- misc/cppunit-1.15.0/include/cppunit/plugin/TestPlugIn.h 2010-01-11 14:42:25.084658287 +0100 ++++ misc/build/cppunit-1.15.0/include/cppunit/plugin/TestPlugIn.h 2010-01-11 14:42:18.660706180 +0100 +@@ -133,9 +133,8 @@ + /*! \def CPPUNIT_PLUGIN_IMPLEMENT_MAIN() + * \brief Implements the 'main' function for the plug-in. + * +- * This macros implements the main() function for dynamic library. +- * For example, WIN32 requires a DllMain function, while some Unix +- * requires a main() function. This macros takes care of the implementation. ++ * This macro implements the main() function for dynamic library ++ * on Unix for some weird reason. + */ + + // Win32 +@@ -149,23 +149,7 @@ + + // Win32 + #if defined(CPPUNIT_HAVE_WIN32_DLL_LOADER) +-#if !defined(APIENTRY) +-#define WIN32_LEAN_AND_MEAN +-#define NOGDI +-#define NOUSER +-#define NOKERNEL +-#define NOSOUND +-#ifndef NOMINMAX +-#define NOMINMAX +-#endif +-#define BLENDFUNCTION void // for mingw & gcc +-#include +-#endif + #define CPPUNIT_PLUGIN_IMPLEMENT_MAIN() \ +- BOOL APIENTRY DllMain( HANDLE, DWORD, LPVOID ) \ +- { \ +- return TRUE; \ +- } \ + typedef char __CppUnitPlugInImplementMainDummyTypeDef + + // Unix +--- misc/cppunit-1.15.0/include/cppunit/TestAssert.h ++++ misc/build/cppunit-1.15.0/include/cppunit/TestAssert.h +@@ -76,7 +76,7 @@ + const int precision = 15; + #endif // #ifdef DBL_DIG + char buffer[128]; +-#ifdef __STDC_SECURE_LIB__ // Use secure version with visual studio 2005 to avoid warning. ++#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__) // Use secure version with visual studio 2005 to avoid warning. + sprintf_s(buffer, sizeof(buffer), "%.*g", precision, x); + #else + sprintf(buffer, "%.*g", precision, x); + -- cgit v1.2.3