cmake/PlatformChecks.cmake    |    2 ++
 include/config-auto.h.in      |    3 +++
 src/cppunit/PlugInManager.cpp |   15 ++++++++++++++-
 3 files changed, 19 insertions(+), 1 deletion(-)

New commits:
commit f8cd3430163bde5e8ade2a2245437710b2ec048d
Author: Bernhard Sessler <bernhard.sess...@corscience.de>
Date:   Thu Dec 12 10:17:31 2013 +0100

    src: Fix build with Borland C++ compiler
    
    Change-Id: I0a182186c396f2e45bec76c83506f765f2462b3c
    Signed-off-by: Bernhard Sessler <bernhard.sess...@corscience.de>
    Reviewed-on: https://gerrit.libreoffice.org/7115
    Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrh...@googlemail.com>

diff --git a/cmake/PlatformChecks.cmake b/cmake/PlatformChecks.cmake
index 5d20bfe..d446586 100644
--- a/cmake/PlatformChecks.cmake
+++ b/cmake/PlatformChecks.cmake
@@ -121,6 +121,8 @@ if(CPPUNIT_HAVE_TYPEINFO)
                                   CPPUNIT_HAVE_RTTI)
 endif()
 
+set(CPPUNIT_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P} CACHE INTERNAL "Size of a 
void pointer")
+
 if(_unsupported_compiler)
     message(FATAL_ERROR "Your compiler does not support all features required 
to build cppunit!")
 endif()
diff --git a/include/config-auto.h.in b/include/config-auto.h.in
index 7d7c0ae..1f877ee 100644
--- a/include/config-auto.h.in
+++ b/include/config-auto.h.in
@@ -87,6 +87,9 @@
 /* Define if you have the <unistd.h> header file. */
 #cmakedefine CPPUNIT_HAVE_UNISTD_H 1
 
+/* The size of a void pointer */
+#cmakedefine CPPUNIT_SIZEOF_VOID_P @CPPUNIT_SIZEOF_VOID_P@
+
 /* Name of package */
 #cmakedefine CPPUNIT_PACKAGE "@CPPUNIT_PACKAGE@"
 
diff --git a/src/cppunit/PlugInManager.cpp b/src/cppunit/PlugInManager.cpp
index 4f8b371..aec7713 100644
--- a/src/cppunit/PlugInManager.cpp
+++ b/src/cppunit/PlugInManager.cpp
@@ -1,6 +1,10 @@
 #include <cppunit/config/SourcePrefix.h>
 #include <cppunit/XmlOutputterHook.h>
-#include <stdint.h>
+#include <cppunit/config-auto.h>
+
+#ifdef CPPUNIT_HAVE_STDINT_H
+    #include <stdint.h>
+#endif
 
 #if !defined(CPPUNIT_NO_TESTPLUGIN)
 #include <cppunit/extensions/TestFactoryRegistry.h>
@@ -8,6 +12,15 @@
 #include <cppunit/plugin/TestPlugIn.h>
 #include <cppunit/plugin/DynamicLibraryManager.h>
 
+#if !defined(CPPUNIT_HAVE_STDINT_H)
+#   if (CPPUNIT_SIZEOF_VOID_P == 4)
+        typedef unsigned long int uintptr_t;
+#   elif (CPPUNIT_SIZEOF_VOID_P == 8)
+        typedef unsigned long long uintptr_t;
+#   else
+#       error "Unsupported compiler"
+#   endif
+#endif
 
 CPPUNIT_NS_BEGIN
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to