diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-01-19 16:19:44 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-06-29 14:24:25 +0000 |
commit | 0a5ec9de2d558a428fd31c258132bac0fe6d8e3f (patch) | |
tree | 2057501f0f98e123efe21a49d5adf27b3115f55d | |
parent | 93440e1c1237a2237e8a3b8914514d8889bb6172 (diff) |
external/firebird: Adapt to GCC 6
...which switched defaults from C++03 to C++14, so causes some errors now.
Curiously, the throw(std::bad_alloc) vs. throw-anything mismatch between the
global operator new replacements and the standard headers is OK for GCC only
when there is no further declaration in between the standard header and the
replacmenet definition.
Change-Id: Ib54727fecf4ad07426b811a9cc04b08ea80e59dc
(cherry picked from commit 3179e8f7e6ce550bbe766ed730e68b0374944dd5)
Reviewed-on: https://gerrit.libreoffice.org/26768
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r-- | external/firebird/firebird-c++11.patch.1 | 26 | ||||
-rw-r--r-- | external/firebird/firebird-c++11replfn.patch.0 | 6 |
2 files changed, 27 insertions, 5 deletions
diff --git a/external/firebird/firebird-c++11.patch.1 b/external/firebird/firebird-c++11.patch.1 index e8cb52d4d7fd..289057766016 100644 --- a/external/firebird/firebird-c++11.patch.1 +++ b/external/firebird/firebird-c++11.patch.1 @@ -1,4 +1,19 @@ # -*- Mode: Diff -*- +--- firebird/src/dudley/exe.epp ++++ firebird/src/dudley/exe.epp +@@ -2884,9 +2884,9 @@ + blr_parameter, 0, 0, 0, + blr_parameter, 0, 1, 0, + blr_parameter, 1, 0, 0, +- blr_end, +- blr_end, +- blr_end, ++ SCHAR(blr_end), ++ SCHAR(blr_end), ++ SCHAR(blr_end), + blr_eoc + }; + static FB_API_HANDLE req_handle; --- firebird/src/gpre/c_cxx.cpp +++ firebird/src/gpre/c_cxx.cpp @@ -876,7 +876,7 @@ @@ -156,6 +171,17 @@ } else { sprintf(p, "%d", value); +--- firebird/src/gpre/sqe.cpp ++++ firebird/src/gpre/sqe.cpp +@@ -2529,7 +2529,7 @@ + return par_stat(request); + + if (MSC_match(KW_MINUS)) +- return MSC_unary(nod_negate, par_primitive_value(request, false, paren_count, false)); ++ return MSC_unary(nod_negate, par_primitive_value(request, false, paren_count, NULL)); + + MSC_match(KW_PLUS); + --- firebird/src/common/classes/alloc.cpp +++ firebird/src/common/classes/alloc.cpp @@ -1100,7 +1100,7 @@ diff --git a/external/firebird/firebird-c++11replfn.patch.0 b/external/firebird/firebird-c++11replfn.patch.0 index d14296ccfa08..53b1dd0d045c 100644 --- a/external/firebird/firebird-c++11replfn.patch.0 +++ b/external/firebird/firebird-c++11replfn.patch.0 @@ -1,6 +1,6 @@ --- src/common/classes/alloc.h +++ src/common/classes/alloc.h -@@ -489,23 +489,11 @@ +@@ -489,23 +489,7 @@ inline static MemoryPool* getDefaultMemoryPool() { return Firebird::MemoryPool::processMemoryPool; } // Global versions of operators new and delete @@ -12,8 +12,6 @@ -{ - 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() -{ @@ -23,8 +21,6 @@ -{ - 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) |