Re: [PATCH 5/5] src: Fix build with Borland C++ compiler
On Mon, Dec 16, 2013 at 4:48 AM, Bernhard Sessler bernhard.sess...@corscience.de wrote: Signed-off-by: Bernhard Sessler bernhard.sess...@corscience.de --- src/cppunit/PlugInManager.cpp | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/cppunit/PlugInManager.cpp b/src/cppunit/PlugInManager.cpp index 4f8b371..0ebe4c5 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,9 @@ #include cppunit/plugin/TestPlugIn.h #include cppunit/plugin/DynamicLibraryManager.h +#ifndef CPPUNIT_HAVE_STDINT_H +typedef unsigned int* uintptr_t; uintptr_t is a scalar integer that has the 'size' of void*.. not a pointer to an int iow uint32_t if sizeof(void*) == 4 uint64_t if sizeof(void*) == 8 uintptr_t foo = 4; foo += 2; = foo should be 6 not 12; ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [PATCH 5/5] src: Fix build with Borland C++ compiler
Hi, On 16.12.2013 13:14, Norbert Thiebaud wrote: On Mon, Dec 16, 2013 at 4:48 AM, Bernhard Sessler bernhard.sess...@corscience.de wrote: Signed-off-by: Bernhard Sessler bernhard.sess...@corscience.de --- src/cppunit/PlugInManager.cpp | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/cppunit/PlugInManager.cpp b/src/cppunit/PlugInManager.cpp index 4f8b371..0ebe4c5 100644 --- a/src/cppunit/PlugInManager.cpp +++ b/src/cppunit/PlugInManager.cpp @@ -1,6 +1,10 @@ snip +#ifndef CPPUNIT_HAVE_STDINT_H +typedef unsigned int* uintptr_t; uintptr_t is a scalar integer that has the 'size' of void*.. not a pointer to an int iow uint32_t if sizeof(void*) == 4 uint64_t if sizeof(void*) == 8 uintptr_t foo = 4; foo += 2; = foo should be 6 not 12; Argh, sorry, didn't pay attention here. I will fix that in an updated patchset. Thanks for the comment, good find. Regards, Bernhard ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice