Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / cppunit / windows.patch
blobc8ea6d7565dcbba35fe91eec3cdb318ac88baa72
1 --- misc/cppunit-1.13.1/include/cppunit/plugin/TestPlugIn.h 2010-01-11 14:42:25.084658287 +0100
2 +++ misc/build/cppunit-1.13.1/include/cppunit/plugin/TestPlugIn.h 2010-01-11 14:42:18.660706180 +0100
3 @@ -133,9 +133,8 @@
4 /*! \def CPPUNIT_PLUGIN_IMPLEMENT_MAIN()
5 * \brief Implements the 'main' function for the plug-in.
7 - * This macros implements the main() function for dynamic library.
8 - * For example, WIN32 requires a DllMain function, while some Unix
9 - * requires a main() function. This macros takes care of the implementation.
10 + * This macro implements the main() function for dynamic library
11 + * on Unix for some weird reason.
14 // Win32
15 @@ -149,21 +149,7 @@
17 // Win32
18 #if defined(CPPUNIT_HAVE_WIN32_DLL_LOADER)
19 -#if !defined(APIENTRY)
20 -#define WIN32_LEAN_AND_MEAN
21 -#define NOGDI
22 -#define NOUSER
23 -#define NOKERNEL
24 -#define NOSOUND
25 -#define NOMINMAX
26 -#define BLENDFUNCTION void // for mingw & gcc
27 -#include <windows.h>
28 -#endif
29 #define CPPUNIT_PLUGIN_IMPLEMENT_MAIN() \
30 - BOOL APIENTRY DllMain( HANDLE, DWORD, LPVOID ) \
31 - { \
32 - return TRUE; \
33 - } \
34 typedef char __CppUnitPlugInImplementMainDummyTypeDef
36 // Unix
37 --- misc/cppunit-1.13.1/include/cppunit/TestAssert.h
38 +++ misc/build/cppunit-1.13.1/include/cppunit/TestAssert.h
39 @@ -76,7 +76,7 @@
40 const int precision = 15;
41 #endif // #ifdef DBL_DIG
42 char buffer[128];
43 -#ifdef __STDC_SECURE_LIB__ // Use secure version with visual studio 2005 to avoid warning.
44 +#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__) // Use secure version with visual studio 2005 to avoid warning.
45 sprintf_s(buffer, sizeof(buffer), "%.*g", precision, x);
46 #else
47 sprintf(buffer, "%.*g", precision, x);