diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2013-10-17 01:32:29 +0200 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2013-10-17 17:17:22 +0000 |
commit | 7223027a3a7e6599e387559d85f1eaebf3bbbd6c (patch) | |
tree | 10017f4f62c300eef573e6ac73dba9271c824855 /external/cppunit/windows.patch | |
parent | 894f5e46a6d72d3cfc3731c49a5f01626c6b95db (diff) |
fdo#70393: move cppunit to a subdir of external
Change-Id: I96ab796757af0c6c6741059b35fcaeefc2bf4507
Reviewed-on: https://gerrit.libreoffice.org/6286
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'external/cppunit/windows.patch')
-rw-r--r-- | external/cppunit/windows.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/external/cppunit/windows.patch b/external/cppunit/windows.patch new file mode 100644 index 000000000000..c8ea6d7565dc --- /dev/null +++ b/external/cppunit/windows.patch @@ -0,0 +1,48 @@ +--- misc/cppunit-1.13.1/include/cppunit/plugin/TestPlugIn.h 2010-01-11 14:42:25.084658287 +0100 ++++ misc/build/cppunit-1.13.1/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,21 +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 +-#define NOMINMAX +-#define BLENDFUNCTION void // for mingw & gcc +-#include <windows.h> +-#endif + #define CPPUNIT_PLUGIN_IMPLEMENT_MAIN() \ +- BOOL APIENTRY DllMain( HANDLE, DWORD, LPVOID ) \ +- { \ +- return TRUE; \ +- } \ + typedef char __CppUnitPlugInImplementMainDummyTypeDef + + // Unix +--- misc/cppunit-1.13.1/include/cppunit/TestAssert.h ++++ misc/build/cppunit-1.13.1/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); + |