Kaydet (Commit) 3179e8f7 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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
üst 23c2c7c9
# -*- 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 @@
......
--- 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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment