update credits
[LibreOffice.git] / external / cppunit / windows.patch
blobe6ca26cbb0e3eeefab12d51c3e7955903f8d04de
1 --- misc/cppunit-1.15.0/include/cppunit/plugin/TestPlugIn.h 2010-01-11 14:42:25.084658287 +0100
2 +++ misc/build/cppunit-1.15.0/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,23 +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 -#ifndef NOMINMAX
26 -#define NOMINMAX
27 -#endif
28 -#define BLENDFUNCTION void // for mingw & gcc
29 -#include <windows.h>
30 -#endif
31 #define CPPUNIT_PLUGIN_IMPLEMENT_MAIN() \
32 - BOOL APIENTRY DllMain( HANDLE, DWORD, LPVOID ) \
33 - { \
34 - return TRUE; \
35 - } \
36 typedef char __CppUnitPlugInImplementMainDummyTypeDef
38 // Unix
39 --- misc/cppunit-1.15.0/include/cppunit/TestAssert.h
40 +++ misc/build/cppunit-1.15.0/include/cppunit/TestAssert.h
41 @@ -76,7 +76,7 @@
42 const int precision = 15;
43 #endif // #ifdef DBL_DIG
44 char buffer[128];
45 -#ifdef __STDC_SECURE_LIB__ // Use secure version with visual studio 2005 to avoid warning.
46 +#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__) // Use secure version with visual studio 2005 to avoid warning.
47 sprintf_s(buffer, sizeof(buffer), "%.*g", precision, x);
48 #else
49 sprintf(buffer, "%.*g", precision, x);