diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-06-19 15:21:27 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-06-19 15:25:53 +0200 |
commit | 0032fc0385679d15992fb1a2e8dc0ff1c228c911 (patch) | |
tree | db496b855533e0810fa9a18b85b62d8cd395eca4 /sdext | |
parent | a38f8c2228f15611136ad6a4b69d77e167a2b781 (diff) |
Fix check for broken standard library
The compiler's __GNUC__ etc. need not match the libstdc++ version used (esp.
when using Clang as compiler), and libstdc++'s __GLIBCXX__ macro doesn't inrease
monotonically with version numbers, so resort to a configure check.
Change-Id: I06de6b68324169863f6f5c31ae5d855e8b04cd6b
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/pdfimport/tree/drawtreevisiting.cxx | 4 | ||||
-rw-r--r-- | sdext/source/pdfimport/tree/writertreevisiting.cxx | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx b/sdext/source/pdfimport/tree/drawtreevisiting.cxx index 4d262ca23336..eb9780d55b77 100644 --- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx +++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx @@ -28,7 +28,7 @@ #include "basegfx/polygon/b2dpolypolygontools.hxx" #include "basegfx/range/b2drange.hxx" - +#include <config_global.h> #include <osl/diagnose.h> #include "com/sun/star/i18n/BreakIterator.hpp" #include "com/sun/star/i18n/CharacterClassification.hpp" @@ -452,7 +452,7 @@ void DrawXmlOptimizer::visit( PolyPolyElement& elem, const std::list< Element* > elem.Children.splice( elem.Children.end(), pNext->Children ); // workaround older compilers that do not have std::list::erase(const_iterator) -#if defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ <= 8 +#if HAVE_BROKEN_CONST_ITERATORS std::list< Element* >::iterator tmpIt = elem.Parent->Children.begin(); std::advance(tmpIt, std::distance(elem.Parent->Children.cbegin(), next_it)); elem.Parent->Children.erase(tmpIt); diff --git a/sdext/source/pdfimport/tree/writertreevisiting.cxx b/sdext/source/pdfimport/tree/writertreevisiting.cxx index 82f8c38bc27e..93c917a475ad 100644 --- a/sdext/source/pdfimport/tree/writertreevisiting.cxx +++ b/sdext/source/pdfimport/tree/writertreevisiting.cxx @@ -28,6 +28,7 @@ #include "basegfx/polygon/b2dpolypolygontools.hxx" #include "basegfx/range/b2drange.hxx" +#include <config_global.h> #include <osl/diagnose.h> using namespace ::com::sun::star; @@ -403,7 +404,7 @@ void WriterXmlOptimizer::visit( PolyPolyElement& elem, const std::list< Element* elem.Children.splice( elem.Children.end(), pNext->Children ); // workaround older compilers that do not have std::list::erase(const_iterator) -#if defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ <= 8 +#if HAVE_BROKEN_CONST_ITERATORS std::list< Element* >::iterator tmpIt = elem.Parent->Children.begin(); std::advance(tmpIt, std::distance(elem.Parent->Children.cbegin(), next_it)); elem.Parent->Children.erase(tmpIt); |