external/firebird/UnpackedTarball_firebird.mk | 4 - external/firebird/firebird-c++11replfn.patch.0 | 54 +++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 3 deletions(-)
New commits: commit 542a3291005dc1db011c76f437d5e0b945fa726e Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Oct 30 09:22:49 2013 +0100 C++11: new/delete replacement functions cannot be inline ...as clarified by a new sentence added to paragraph 3 of 17.6.4.6 [replacement.functions]: "The programâs definitions shall not be specified as inline." Clang trunk towards 3.4 now generates errors for this. Having these replacement functions in the fbembed dynamic library is extremely fishy anyway; at least on Linux those symbols are not exported, and hopefully on no other platforms either. (If it turns out that this change causes the symbols to change from non-exported to exported on some other platform, the best fix would probably be to remove those replacement functions completely.) Change-Id: I590d55e44814a6707030c42e1087377e75819666 diff --git a/external/firebird/UnpackedTarball_firebird.mk b/external/firebird/UnpackedTarball_firebird.mk index c4119a0..77e691c 100644 --- a/external/firebird/UnpackedTarball_firebird.mk +++ b/external/firebird/UnpackedTarball_firebird.mk @@ -14,10 +14,8 @@ $(eval $(call gb_UnpackedTarball_set_tarball,firebird,$(FIREBIRD_TARBALL))) $(eval $(call gb_UnpackedTarball_add_patches,firebird,\ external/firebird/firebird-icu.patch.1 \ external/firebird/firebird-rpath.patch.0 \ -)) - -$(eval $(call gb_UnpackedTarball_add_patches,firebird,\ external/firebird/firebird-c++11.patch.1 \ + external/firebird/firebird-c++11replfn.patch.0 \ )) ifeq ($(OS)-$(COM),WNT-MSC) diff --git a/external/firebird/firebird-c++11replfn.patch.0 b/external/firebird/firebird-c++11replfn.patch.0 new file mode 100644 index 0000000..d14296c --- /dev/null +++ b/external/firebird/firebird-c++11replfn.patch.0 @@ -0,0 +1,54 @@ +--- src/common/classes/alloc.h ++++ src/common/classes/alloc.h +@@ -489,23 +489,11 @@ + inline static MemoryPool* getDefaultMemoryPool() { return Firebird::MemoryPool::processMemoryPool; } + + // Global versions of operators new and delete +-inline void* operator new(size_t s) THROW_BAD_ALLOC +-{ +- return Firebird::MemoryPool::globalAlloc(s); +-} +-inline void* operator new[](size_t s) THROW_BAD_ALLOC +-{ +- return Firebird::MemoryPool::globalAlloc(s); +-} ++void* operator new(size_t s) THROW_BAD_ALLOC; ++void* operator new[](size_t s) THROW_BAD_ALLOC; + +-inline void operator delete(void* mem) throw() +-{ +- Firebird::MemoryPool::globalFree(mem); +-} +-inline void operator delete[](void* mem) throw() +-{ +- Firebird::MemoryPool::globalFree(mem); +-} ++void operator delete(void* mem) throw(); ++void operator delete[](void* mem) throw(); + + #ifdef DEBUG_GDS_ALLOC + inline void* operator new(size_t s, Firebird::MemoryPool& pool, const char* file, int line) +--- src/common/classes/alloc.cpp ++++ src/common/classes/alloc.cpp +@@ -2080,3 +2080,21 @@ + #endif + + } // namespace Firebird ++ ++void* operator new(size_t s) THROW_BAD_ALLOC ++{ ++ return Firebird::MemoryPool::globalAlloc(s); ++} ++void* operator new[](size_t s) THROW_BAD_ALLOC ++{ ++ return Firebird::MemoryPool::globalAlloc(s); ++} ++ ++void operator delete(void* mem) throw() ++{ ++ Firebird::MemoryPool::globalFree(mem); ++} ++void operator delete[](void* mem) throw() ++{ ++ Firebird::MemoryPool::globalFree(mem); ++}
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits