From 42fe4c54b08c04f86264e59fedf064c188fd1455 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Tue, 27 May 2025 18:06:43 +0800 Subject: [PATCH] 5.0.2 --- ...add-loongarch64-support-for-Firebird.patch | 13 +- ....xz => Firebird-5.0.2.1613-0-source.tar.xz | 4 +- add-pkgconfig-files.patch | 22 +- btyacc-honour-build-flags.patch | 12 - c++17.patch | 144 ---- firebird-logrotate | 1 - firebird.spec | 30 +- noexcept.patch | 664 ------------------ 8 files changed, 41 insertions(+), 849 deletions(-) rename Firebird-4.0.5.3140-0.tar.xz => Firebird-5.0.2.1613-0-source.tar.xz (32%) delete mode 100644 btyacc-honour-build-flags.patch delete mode 100644 c++17.patch delete mode 100644 noexcept.patch diff --git a/0001-add-loongarch64-support-for-Firebird.patch b/0001-add-loongarch64-support-for-Firebird.patch index c76576f..ba7d651 100644 --- a/0001-add-loongarch64-support-for-Firebird.patch +++ b/0001-add-loongarch64-support-for-Firebird.patch @@ -9,7 +9,7 @@ Subject: [PATCH] add loongarch support 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/common/classes/DbImplementation.cpp b/src/common/classes/DbImplementation.cpp -index 95b1e33..4f2def6 100644 +index 7c58ee9..17d7ca1 100644 --- a/src/common/classes/DbImplementation.cpp +++ b/src/common/classes/DbImplementation.cpp @@ -39,6 +39,7 @@ static const UCHAR CpuPowerPc64 = 4; @@ -21,10 +21,10 @@ index 95b1e33..4f2def6 100644 static const UCHAR CpuS390 = 9; static const UCHAR CpuS390x = 10; diff --git a/src/common/common.h b/src/common/common.h -index 9fbe954..1a0ef22 100644 +index 2eac429..24b858d 100644 --- a/src/common/common.h +++ b/src/common/common.h -@@ -148,6 +148,10 @@ +@@ -152,6 +152,10 @@ #define RISC_ALIGNMENT #endif /* sparc */ @@ -34,8 +34,8 @@ index 9fbe954..1a0ef22 100644 + #ifdef MIPSEL #define FB_CPU CpuMipsel - #endif /* mipsel */ -@@ -918,7 +922,7 @@ void GDS_breakpoint(int); + #define RISC_ALIGNMENT +@@ -924,7 +928,7 @@ void GDS_breakpoint(int); // ASF: Currently, all little-endian are FB_SWAP_DOUBLE and big-endian aren't. // AP: Define it for your hardware correctly in case your CPU do not follow mentioned rule. // The follwoing lines are kept for reference only. @@ -44,5 +44,6 @@ index 9fbe954..1a0ef22 100644 //#define FB_SWAP_DOUBLE 1 //#elif defined(sparc) || defined(PowerPC) || defined(PPC) || defined(__ppc__) || defined(HPUX) || defined(MIPS) || defined(__ppc64__) //#define FB_SWAP_DOUBLE 0 --- +- 2.31.1 + diff --git a/Firebird-4.0.5.3140-0.tar.xz b/Firebird-5.0.2.1613-0-source.tar.xz similarity index 32% rename from Firebird-4.0.5.3140-0.tar.xz rename to Firebird-5.0.2.1613-0-source.tar.xz index 6acdc81..b2127b2 100644 --- a/Firebird-4.0.5.3140-0.tar.xz +++ b/Firebird-5.0.2.1613-0-source.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5c2709070d90e179d57ba8205bcebce852890bc2750e88eba560b68bd1e955ea -size 30722288 +oid sha256:f0861673bbbcae25716b741b00f77cc19875bfa561e61836ee02b6a7a7a355e8 +size 29516408 diff --git a/add-pkgconfig-files.patch b/add-pkgconfig-files.patch index 981afe2..51b60b4 100644 --- a/add-pkgconfig-files.patch +++ b/add-pkgconfig-files.patch @@ -1,3 +1,14 @@ +From d10d26b71990998f50b5ae16f5541e93f2eefbec Mon Sep 17 00:00:00 2001 +From: Funda Wang +Date: Tue, 27 May 2025 00:34:14 +0800 +Subject: [PATCH] add pkgconfig files + +--- + builds/install/arch-specific/linux/misc/fbclient.pc.in | 10 ++++++++++ + configure.ac | 1 + + 2 files changed, 11 insertions(+) + create mode 100644 builds/install/arch-specific/linux/misc/fbclient.pc.in + diff --git a/builds/install/arch-specific/linux/misc/fbclient.pc.in b/builds/install/arch-specific/linux/misc/fbclient.pc.in new file mode 100644 index 0000000..d49fdc5 @@ -15,14 +26,17 @@ index 0000000..d49fdc5 +Cflags: -I${includedir}/firebird +Libs: -L${libdir} -lfbclient diff --git a/configure.ac b/configure.ac -index 0a3de36..922c778 100644 +index 1d8a2e2..28d867e 100644 --- a/configure.ac +++ b/configure.ac -@@ -1307,6 +1307,7 @@ case "$PLATFORM" in +@@ -1540,6 +1540,7 @@ case "$PLATFORM" in gen/install/misc/firebird.init.d.gentoo:builds/install/arch-specific/linux/firebird.init.d.gentoo.in gen/install/misc/firebird.init.d.slackware:builds/install/arch-specific/linux/firebird.init.d.slackware.in gen/install/misc/rc.config.firebird:builds/install/arch-specific/linux/rc.config.firebird.in -+ gen/install/misc/fbclient.pc:builds/install/arch-specific/linux/misc/fbclient.pc.in - gen/Release/firebird/bin/linuxLibrary.sh:builds/install/arch-specific/linux/linuxLibrary.sh.in ++ gen/install/misc/fbclient.pc:builds/install/arch-specific/linux/misc/fbclient.pc.in gen/install/misc/firebird.service:builds/install/arch-specific/linux/firebird.service.in ], + [chmod a+x gen/install/*sh 2>/dev/null]) +-- +2.47.1 + diff --git a/btyacc-honour-build-flags.patch b/btyacc-honour-build-flags.patch deleted file mode 100644 index cb9f38c..0000000 --- a/btyacc-honour-build-flags.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/extern/btyacc/Makefile 2022-08-12 15:24:40.846774310 +0200 -+++ a/extern/btyacc/Makefile 2022-08-12 15:26:20.954809720 +0200 -@@ -12,7 +12,7 @@ - # across all of our supported compilers/platforms. - - # Vanilla CFLAGS --CFLAGS= -+CFLAGS=-fPIC -pie - - # No LDFLAGS - #LDFLAGS= - diff --git a/c++17.patch b/c++17.patch deleted file mode 100644 index 76cd4e2..0000000 --- a/c++17.patch +++ /dev/null @@ -1,144 +0,0 @@ -From ff49d71b0cdbab75f8a22717c4f88343a5961868 Mon Sep 17 00:00:00 2001 -From: Adriano dos Santos Fernandes -Date: Mon, 31 May 2021 08:55:26 -0300 -Subject: [PATCH] Set POSIX build to use C++17. - ---- - CMakeLists.txt | 4 ++-- - builds/posix/make.defaults | 2 +- - builds/posix/prefix.freebsd_amd64 | 2 +- - configure.ac | 2 +- - examples/extauth/Makefile | 2 +- - examples/interfaces/makefile | 2 +- - extern/icu/android/aarch64/config.sh | 2 +- - extern/icu/android/armv7a/config.sh | 4 ++-- - extern/icu/android/linux/config.sh | 2 +- - 9 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 620fd032af4..5f336efd611 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -206,14 +206,14 @@ if (MINGW) - set(CMAKE_STATIC_LIBRARY_PREFIX) - - add_definitions(-D_WIN32_WINNT=0x0600) -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4 -std=c++11") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4 -std=c++17") - endif() - - if (UNIX) - set(OS_DIR posix) - - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -msse4 -std=c++11") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -msse4 -std=c++17") - - if (NOT CMAKE_CROSSCOMPILING) - set(LIB_readline readline) -diff --git a/builds/posix/make.defaults b/builds/posix/make.defaults -index d96e89053fa..57bbb006865 100755 ---- a/builds/posix/make.defaults -+++ b/builds/posix/make.defaults -@@ -103,7 +103,7 @@ GLOB_OPTIONS:= - #____________________________________________________________________________ - - # Global c++ flags: firebird needs no RTTI, choose build standard --PLUSPLUS_FLAGS:= -fno-rtti -std=c++11 -+PLUSPLUS_FLAGS:= -fno-rtti -std=c++17 - - # If this is defined then we use special rules useful for developers only - IsDeveloper = @DEVEL_FLG@ -diff --git a/builds/posix/prefix.freebsd_amd64 b/builds/posix/prefix.freebsd_amd64 -index f27567a2715..0736d87e935 100644 ---- a/builds/posix/prefix.freebsd_amd64 -+++ b/builds/posix/prefix.freebsd_amd64 -@@ -26,4 +26,4 @@ DEV_FLAGS=-ggdb -DFREEBSD -DAMD64 -pipe -MMD -p -fPIC -Wall -Wno-non-virtual-dto - # This file must be compiled with SSE4.2 support - %/CRC32C.o: CXXFLAGS += -msse4 - --CXXFLAGS := $(CXXFLAGS) -std=c++11 -+CXXFLAGS := $(CXXFLAGS) -std=c++17 -diff --git a/configure.ac b/configure.ac -index 9b40be43101..e4a83cf8d3b 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -899,7 +899,7 @@ dnl if 64-bit mode, then archive tool, ar, needs -X64 option - fi - - XE_SAVE_ENV() --CXXFLAGS="$CXXFLAGS -std=c++11" -+CXXFLAGS="$CXXFLAGS -std=c++17" - AC_CACHE_CHECK([whether the C++ compiler understands noexcept], [ac_cv_cxx_noexcept], [ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[int f(int x) noexcept { return x + 1; }]], [[]])], - [ac_cv_cxx_noexcept=yes], [ac_cv_cxx_noexcept=no])]) -diff --git a/examples/extauth/Makefile b/examples/extauth/Makefile -index 9da7bbd357f..3c8b878d225 100644 ---- a/examples/extauth/Makefile -+++ b/examples/extauth/Makefile -@@ -61,7 +61,7 @@ KEYGEN_objects=$(INTERMED)/keygen.o - TCWRAP_objects=$(INTERMED)/TcWrapper.o - KEY_AUTH_objects=$(INTERMED)/ExtAuth.o - --CXXFLAGS=-std=c++11 -pthread -I$(ROOT)/include -fPIC $(TOMCRYPT_COMPILE) -+CXXFLAGS=-std=c++17 -pthread -I$(ROOT)/include -fPIC $(TOMCRYPT_COMPILE) - LDFLAGS=-pthread -L$(LIB) -Wl,-rpath,'$$ORIGIN/../lib' $(TOMCRYPT_LINK) - - LINK_LIBS=-lfbclient -ltomcrypt -ltommath -diff --git a/examples/interfaces/makefile b/examples/interfaces/makefile -index 153c3d558dc..b65dba90a7d 100644 ---- a/examples/interfaces/makefile -+++ b/examples/interfaces/makefile -@@ -33,7 +33,7 @@ FBCLIENT = $(FIREBIRD)/lib/libfbclient.so - # General Compiler and linker Defines for Linux - # --------------------------------------------------------------------- - CXX = c++ --CXXFLAGS= -c -Wall -g3 -std=c++11 -fno-rtti $(INCLUDE) -+CXXFLAGS= -c -Wall -g3 -std=c++17 -fno-rtti $(INCLUDE) - RM = rm -f - - # -diff --git a/extern/icu/android/aarch64/config.sh b/extern/icu/android/aarch64/config.sh -index 51ef623a3c5..f464d930ec2 100755 ---- a/extern/icu/android/aarch64/config.sh -+++ b/extern/icu/android/aarch64/config.sh -@@ -18,7 +18,7 @@ - --enable-dyload \ - --with-cross-build=$CROSS_BUILD_DIR \ - CFLAGS='-Os' \ -- CXXFLAGS='--std=c++11' \ -+ CXXFLAGS='--std=c++17' \ - LDFLAGS='-static-libstdc++' \ - CC=aarch64-linux-android24-clang \ - CXX=aarch64-linux-android24-clang++ \ -diff --git a/extern/icu/android/armv7a/config.sh b/extern/icu/android/armv7a/config.sh -index fe1bd037456..0e458c690e7 100755 ---- a/extern/icu/android/armv7a/config.sh -+++ b/extern/icu/android/armv7a/config.sh -@@ -18,10 +18,10 @@ - --enable-dyload \ - --with-cross-build=$CROSS_BUILD_DIR \ - CFLAGS='-Os -march=armv7-a -mfloat-abi=softfp -mfpu=neon' \ -- CXXFLAGS='--std=c++11 -march=armv7-a -mfloat-abi=softfp -mfpu=neon' \ -+ CXXFLAGS='--std=c++17 -march=armv7-a -mfloat-abi=softfp -mfpu=neon' \ - LDFLAGS='-static-libstdc++ -march=armv7-a -Wl,--fix-cortex-a8' \ - CC=arm-linux-androideabi-clang \ - CXX=arm-linux-androideabi-clang++ \ - AR=arm-linux-androideabi-ar \ - RANLIB=arm-linux-androideabi-ranlib \ -- --with-data-packaging=archive -\ No newline at end of file -+ --with-data-packaging=archive -diff --git a/extern/icu/android/linux/config.sh b/extern/icu/android/linux/config.sh -index a8b56024aae..6e7d9c5f5c8 100755 ---- a/extern/icu/android/linux/config.sh -+++ b/extern/icu/android/linux/config.sh -@@ -1,7 +1,7 @@ - #!/bin/sh - ../source/runConfigureICU Linux --prefix=$PWD/prebuilt \ - CFLAGS="-Os" \ -- CXXFLAGS="--std=c++11" \ -+ CXXFLAGS="--std=c++17" \ - --enable-static \ - --enable-shared=no \ - --enable-extras=no \ diff --git a/firebird-logrotate b/firebird-logrotate index 5da6610..a85bca6 100644 --- a/firebird-logrotate +++ b/firebird-logrotate @@ -1,7 +1,6 @@ firebird.log { weekly missingok - rotate 52 compress delaycompress notifempty diff --git a/firebird.spec b/firebird.spec index fea6981..6d41d25 100644 --- a/firebird.spec +++ b/firebird.spec @@ -1,5 +1,5 @@ -%global ver 4.0.5 -%global rev 3140 +%global ver 5.0.2 +%global rev 1613 # firebird is mis-compiled when LTO is enabled. A root # cause analysis has not yet been completed. Reported upstream. @@ -8,13 +8,13 @@ Name: firebird Version: %{ver}.%{rev} -Release: 2 +Release: 1 Summary: SQL relational database management system License: Interbase-1.0 -URL: http://www.firebirdsql.org/ +URL: https://www.firebirdsql.org/ -Source0: https://github.com/FirebirdSQL/firebird/releases/download/v%{ver}/Firebird-%{ver}.%{rev}-0.tar.xz +Source0: https://github.com/FirebirdSQL/firebird/releases/download/v%{ver}/Firebird-%{ver}.%{rev}-0-source.tar.xz Source1: firebird-logrotate Source2: firebird.service Source3: fb_config @@ -23,14 +23,11 @@ Source4: firebird.sysusers.conf Patch0000: add-pkgconfig-files.patch Patch0001: no-copy-from-icu.patch Patch0002: cloop-honour-build-flags.patch -# from upstream -Patch0003: c++17.patch -Patch0004: noexcept.patch -Patch0006: btyacc-honour-build-flags.patch -Patch0009: 0001-add-loongarch64-support-for-Firebird.patch +Patch0003: 0001-add-loongarch64-support-for-Firebird.patch BuildRequires: autoconf BuildRequires: automake +BuildRequires: cmake BuildRequires: libtommath-devel BuildRequires: libtool BuildRequires: ncurses-devel @@ -38,6 +35,7 @@ BuildRequires: libicu-devel BuildRequires: libedit-devel BuildRequires: gcc-c++ BuildRequires: libstdc++-static +BuildRequires: re2-devel BuildRequires: systemd-units BuildRequires: chrpath BuildRequires: zlib-devel @@ -126,7 +124,6 @@ in production systems, under a variety of names, since 1981. Summary: Development libraries and headers for Firebird SQL server Requires: %{name}-devel = %{version}-%{release} Requires: libfbclient2 = %{version}-%{release} -Requires: pkgconfig %description -n libfbclient2-devel Development files for Firebird SQL server client library. @@ -155,13 +152,14 @@ language support for stored procedures and triggers. It has been used in production systems, under a variety of names, since 1981. %prep -%autosetup -n Firebird-%{ver}.%{rev}-0 -p1 +%autosetup -n Firebird-%{ver}.%{rev}-0-source -p1 %build export CFLAGS="%{optflags} -fno-strict-aliasing" export CXXFLAGS="${CFLAGS} -fno-delete-null-pointer-checks" NOCONFIGURE=1 ./autogen.sh %configure --disable-rpath --prefix=%{_prefix} \ + --with-system-re2 \ --with-system-editline \ --with-fbbin=%{_bindir} --with-fbsbin=%{_sbindir} \ --with-fbconf=%{_sysconfdir}/%{name} \ @@ -169,7 +167,6 @@ NOCONFIGURE=1 ./autogen.sh --with-fbdoc=%{_defaultdocdir}/%{name} \ --with-fbsample=%{_defaultdocdir}/%{name}/sample \ --with-fbsample-db=%{_localstatedir}/lib/%{name}/data \ - --with-fbhelp=%{_localstatedir}/lib/%{name}/system \ --with-fbintl=%{_libdir}/%{name}/intl \ --with-fbmisc=%{_datadir}/%{name}/misc \ --with-fbsecure-db=%{_localstatedir}/lib/%{name}/secdb \ @@ -266,8 +263,7 @@ fi %dir %attr(0700,%{name},%{name}) %{_localstatedir}/lib/%{name}/data %dir %attr(0755,%{name},%{name}) %{_localstatedir}/lib/%{name}/system %dir %attr(0755,%{name},%{name}) %{_localstatedir}/lib/%{name}/tzdata -%attr(0600,firebird,firebird) %config(noreplace) %{_localstatedir}/lib/%{name}/secdb/security4.fdb -%attr(0644,firebird,firebird) %{_localstatedir}/lib/%{name}/system/help.fdb +%attr(0600,firebird,firebird) %config(noreplace) %{_localstatedir}/lib/%{name}/secdb/security5.fdb %attr(0644,firebird,firebird) %{_localstatedir}/lib/%{name}/system/firebird.msg %attr(0644,firebird,firebird) %{_localstatedir}/lib/%{name}/tzdata/*.res %ghost %dir %attr(0775,%{name},%{name}) /run/%{name} @@ -316,10 +312,12 @@ fi %{_bindir}/gsec %{_bindir}/isql-fb %{_bindir}/nbackup -%{_bindir}/qli %{_bindir}/gsplit %changelog +* Tue May 27 2025 Funda Wang - 5.0.2.1613-1 +- update to 5.0.2.1613 + * Sat Apr 26 2025 Funda Wang - 4.0.5.3140-2 - change user and group creation to systemd style (recognized by rpm 4.20) diff --git a/noexcept.patch b/noexcept.patch deleted file mode 100644 index f1a1f48..0000000 --- a/noexcept.patch +++ /dev/null @@ -1,664 +0,0 @@ -From a999f35f0fad27798fdc88a3f5cdf2e3e9041594 Mon Sep 17 00:00:00 2001 -From: Adriano dos Santos Fernandes -Date: Mon, 31 May 2021 08:55:26 -0300 -Subject: [PATCH] Replace FB_NOTHROW by noexcept and remove FB_THROW. - ---- - src/common/classes/alloc.cpp | 128 +++++++++++++++++------------------ - src/common/classes/alloc.h | 74 ++++++++------------ - 2 files changed, 94 insertions(+), 108 deletions(-) - -diff --git a/src/common/classes/alloc.cpp b/src/common/classes/alloc.cpp -index 1bd6ad4f09d..ee91ab89df8 100644 ---- a/src/common/classes/alloc.cpp -+++ b/src/common/classes/alloc.cpp -@@ -68,19 +68,19 @@ - #define VALGRIND_FIX_IT // overrides suspicious valgrind behavior - #endif // USE_VALGRIND - --void* operator new(size_t s ALLOC_PARAMS) FB_THROW (OOM_EXCEPTION) -+void* operator new(size_t s ALLOC_PARAMS) - { - return MemoryPool::globalAlloc(s ALLOC_PASS_ARGS); - } --void* operator new[](size_t s ALLOC_PARAMS) FB_THROW (OOM_EXCEPTION) -+void* operator new[](size_t s ALLOC_PARAMS) - { - return MemoryPool::globalAlloc(s ALLOC_PASS_ARGS); - } --void operator delete(void* mem ALLOC_PARAMS) FB_NOTHROW -+void operator delete(void* mem ALLOC_PARAMS) noexcept - { - MemoryPool::globalFree(mem); - } --void operator delete[](void* mem ALLOC_PARAMS) FB_NOTHROW -+void operator delete[](void* mem ALLOC_PARAMS) noexcept - { - MemoryPool::globalFree(mem); - } -@@ -109,7 +109,7 @@ static const int GUARD_BYTES = 0; - #endif - - template --T absVal(T n) FB_NOTHROW -+T absVal(T n) noexcept - { - return n < 0 ? -n : n; - } -@@ -160,7 +160,7 @@ struct FailedBlock - FailedBlock* failedList = NULL; - #endif - --void corrupt(const char* text) FB_NOTHROW -+void corrupt(const char* text) noexcept - { - #ifdef DEV_BUILD - fprintf(stderr, "%s\n", text); -@@ -377,7 +377,7 @@ class MemHeader - - #ifdef MEM_DEBUG - void print_contents(bool used, FILE* file, bool used_only, -- const char* filter_path, const size_t filter_len) FB_NOTHROW -+ const char* filter_path, const size_t filter_len) noexcept - { - if (used || !used_only) - { -@@ -406,7 +406,7 @@ class MemHeader - } - #endif - -- void validate(MemPool* p, StatInt& vUse) FB_NOTHROW -+ void validate(MemPool* p, StatInt& vUse) noexcept - { - if (p == pool && !isExtent()) - vUse += getSize(); -@@ -461,7 +461,7 @@ class MemBaseHunk - } - - public: -- void validate(MemPool* pool, size_t hdr, StatInt& vMap, StatInt& vUse) FB_NOTHROW -+ void validate(MemPool* pool, size_t hdr, StatInt& vMap, StatInt& vUse) noexcept - { - if (length >= DEFAULT_ALLOCATION) - { -@@ -526,7 +526,7 @@ class MemSmallHunk : public MemBaseHunk - - #ifdef MEM_DEBUG - void print_contents(FILE* file, MemPool* pool, bool used_only, -- const char* filter_path, const size_t filter_len) FB_NOTHROW -+ const char* filter_path, const size_t filter_len) noexcept - { - UCHAR* m = ((UCHAR*) this) + hdrSize(); - fprintf(file, "Small hunk %p: memory=[%p:%p) spaceRemaining=%" SIZEFORMAT " length=%" SIZEFORMAT "\n", -@@ -598,7 +598,7 @@ class MemMediumHunk : public MemBaseHunk - - #ifdef MEM_DEBUG - void print_contents(FILE* file, MemPool* pool, bool used_only, -- const char* filter_path, const size_t filter_len) FB_NOTHROW -+ const char* filter_path, const size_t filter_len) noexcept - { - UCHAR* m = ((UCHAR*) this) + hdrSize(); - fprintf(file, "Medium hunk %p: memory=[%p:%p) spaceRemaining=%" SIZEFORMAT " length=%" SIZEFORMAT "\n", -@@ -630,7 +630,7 @@ class MemBigHunk - - #ifdef MEM_DEBUG - void print_contents(FILE* file, MemPool* pool, bool used_only, -- const char* filter_path, const size_t filter_len) FB_NOTHROW -+ const char* filter_path, const size_t filter_len) noexcept - { - fprintf(file, "Big hunk %p: memory=%p length=%" SIZEFORMAT "\n", - this, block, length); -@@ -1647,7 +1647,7 @@ class FreeObjects - - ~FreeObjects(); - -- FreeObjPtr allocateBlock(MemPool* pool, size_t from, size_t& size) FB_THROW (OOM_EXCEPTION) -+ FreeObjPtr allocateBlock(MemPool* pool, size_t from, size_t& size) - { - size_t full_size = size + (from ? 0 : ListBuilder::MEM_OVERHEAD); - if (full_size > Limits::TOP_LIMIT) -@@ -1696,7 +1696,7 @@ class FreeObjects - - #ifdef MEM_DEBUG - void print_contents(FILE* file, MemPool* pool, bool used_only, -- const char* filter_path, const size_t filter_len) FB_NOTHROW -+ const char* filter_path, const size_t filter_len) noexcept - { - for (Extent* ext = currentExtent; ext; ext = ext->next) - ext->print_contents(file, pool, used_only, filter_path, filter_len); -@@ -1717,7 +1717,7 @@ class FreeObjects - ListBuilder listBuilder; - Extent* currentExtent; - -- MemBlock* newBlock(MemPool* pool, unsigned slot) FB_THROW (OOM_EXCEPTION); -+ MemBlock* newBlock(MemPool* pool, unsigned slot); - }; - - -@@ -1799,26 +1799,26 @@ class MemPool - }; - #endif // VALIDATE_POOL - -- MemBlock* alloc(size_t from, size_t& length, bool flagRedirect) FB_THROW (OOM_EXCEPTION); -- void releaseBlock(MemBlock *block, bool flagDecr) FB_NOTHROW; -+ MemBlock* alloc(size_t from, size_t& length, bool flagRedirect); -+ void releaseBlock(MemBlock *block, bool flagDecr) noexcept; - - public: -- void* allocate(size_t size ALLOC_PARAMS) FB_THROW (OOM_EXCEPTION); -- MemBlock* allocate2(size_t from, size_t& size ALLOC_PARAMS) FB_THROW (OOM_EXCEPTION); -+ void* allocate(size_t size ALLOC_PARAMS); -+ MemBlock* allocate2(size_t from, size_t& size ALLOC_PARAMS); - - private: -- virtual void memoryIsExhausted(void) FB_THROW (OOM_EXCEPTION); -- void* allocRaw(size_t length) FB_THROW (OOM_EXCEPTION); -- static void releaseMemory(void* block, bool flagExtent) FB_NOTHROW; -- static void releaseRaw(bool destroying, void *block, size_t size, bool use_cache = true) FB_NOTHROW; -- void* getExtent(size_t from, size_t& to) FB_THROW (OOM_EXCEPTION); -+ virtual void memoryIsExhausted(void); -+ void* allocRaw(size_t length); -+ static void releaseMemory(void* block, bool flagExtent) noexcept; -+ static void releaseRaw(bool destroying, void *block, size_t size, bool use_cache = true) noexcept; -+ void* getExtent(size_t from, size_t& to); - - public: -- static void releaseExtent(bool destroying, void *block, size_t size, MemPool* pool) FB_NOTHROW; -+ static void releaseExtent(bool destroying, void *block, size_t size, MemPool* pool) noexcept; - - // pass desired size, return actual extent size - template -- void newExtent(size_t& size, Extent** linkedList) FB_THROW (OOM_EXCEPTION); -+ void newExtent(size_t& size, Extent** linkedList); - - private: - #ifdef USE_VALGRIND -@@ -1830,9 +1830,9 @@ class MemPool - - public: - static void deletePool(MemPool* pool); -- static void globalFree(void* block) FB_NOTHROW; -+ static void globalFree(void* block) noexcept; - -- static void deallocate(void* block) FB_NOTHROW; -+ static void deallocate(void* block) noexcept; - bool validate(char* buf, FB_SIZE_T size); - - // Create memory pool instance -@@ -1840,7 +1840,7 @@ class MemPool - - // Set statistics group for pool. Usage counters will be decremented from - // previously set group and added to new -- void setStatsGroup(MemoryStats& stats) FB_NOTHROW; -+ void setStatsGroup(MemoryStats& stats) noexcept; - - // Initialize and finalize global memory pool - static MemPool* init() -@@ -1893,25 +1893,25 @@ class MemPool - } - - // Statistics -- void increment_usage(size_t size) FB_NOTHROW -+ void increment_usage(size_t size) noexcept - { - stats->increment_usage(size); - used_memory += size; - } - -- void decrement_usage(size_t size) FB_NOTHROW -+ void decrement_usage(size_t size) noexcept - { - stats->decrement_usage(size); - used_memory -= size; - } - -- void increment_mapping(size_t size) FB_NOTHROW -+ void increment_mapping(size_t size) noexcept - { - stats->increment_mapping(size); - mapped_memory += size; - } - -- void decrement_mapping(size_t size) FB_NOTHROW -+ void decrement_mapping(size_t size) noexcept - { - stats->decrement_mapping(size); - mapped_memory -= size; -@@ -1919,9 +1919,9 @@ class MemPool - - #ifdef MEM_DEBUG - // Print out pool contents. This is debugging routine -- void print_contents(FILE*, unsigned flags, const char* filter_path) FB_NOTHROW; -+ void print_contents(FILE*, unsigned flags, const char* filter_path) noexcept; - // The same routine, but more easily callable from the debugger -- void print_contents(const char* filename, unsigned flags, const char* filter_path) FB_NOTHROW; -+ void print_contents(const char* filename, unsigned flags, const char* filter_path) noexcept; - - private: - MemPool* next; -@@ -1961,7 +1961,7 @@ void DoubleLinkedList::decrUsage(MemMediumHunk* hunk, MemPool* pool) - - - template --MemBlock* FreeObjects::newBlock(MemPool* pool, unsigned slot) FB_THROW (OOM_EXCEPTION) -+MemBlock* FreeObjects::newBlock(MemPool* pool, unsigned slot) - { - size_t size = Limits::getSize(slot); - -@@ -2170,7 +2170,7 @@ MemPool::~MemPool(void) - } - - template --void MemPool::newExtent(size_t& size, Extent** linkedList) FB_THROW(OOM_EXCEPTION) -+void MemPool::newExtent(size_t& size, Extent** linkedList) - { - // No large enough block found. We need to extend the pool - void* memory = NULL; -@@ -2214,7 +2214,7 @@ MemoryPool* MemoryPool::createPool(MemoryPool* parentPool, MemoryStats& stats) - return FB_NEW_POOL(*parentPool) MemoryPool(p); - } - --void MemPool::setStatsGroup(MemoryStats& newStats) FB_NOTHROW -+void MemPool::setStatsGroup(MemoryStats& newStats) noexcept - { - MutexLockGuard guard(mutex, "MemPool::setStatsGroup"); - -@@ -2230,12 +2230,12 @@ void MemPool::setStatsGroup(MemoryStats& newStats) FB_NOTHROW - stats->increment_usage(sav_used_memory); - } - --void MemoryPool::setStatsGroup(MemoryStats& newStats) FB_NOTHROW -+void MemoryPool::setStatsGroup(MemoryStats& newStats) noexcept - { - pool->setStatsGroup(newStats); - } - --MemBlock* MemPool::alloc(size_t from, size_t& length, bool flagRedirect) FB_THROW (OOM_EXCEPTION) -+MemBlock* MemPool::alloc(size_t from, size_t& length, bool flagRedirect) - { - MutexEnsureUnlock guard(mutex, "MemPool::alloc"); - guard.enter(); -@@ -2294,7 +2294,7 @@ MemBlock* MemPool::allocate2(size_t from, size_t& size - #ifdef DEBUG_GDS_ALLOC - , const char* fileName, int line - #endif --) FB_THROW (OOM_EXCEPTION) -+) - { - size_t length = from ? size : ROUNDUP(size + VALGRIND_REDZONE, roundingSize) + GUARD_BYTES; - MemBlock* memory = alloc(from, length, true); -@@ -2324,7 +2324,7 @@ MemBlock* MemPool::allocate2(size_t from, size_t& size - } - - --void* MemPool::allocate(size_t size ALLOC_PARAMS) FB_THROW (OOM_EXCEPTION) -+void* MemPool::allocate(size_t size ALLOC_PARAMS) - { - #ifdef VALIDATE_POOL - MutexLockGuard guard(mutex, "MemPool::allocate"); -@@ -2339,7 +2339,7 @@ void* MemPool::allocate(size_t size ALLOC_PARAMS) FB_THROW (OOM_EXCEPTION) - } - - --void MemPool::releaseMemory(void* object, bool flagExtent) FB_NOTHROW -+void MemPool::releaseMemory(void* object, bool flagExtent) noexcept - { - if (object) - { -@@ -2403,7 +2403,7 @@ void MemPool::releaseMemory(void* object, bool flagExtent) FB_NOTHROW - } - } - --void MemPool::releaseBlock(MemBlock* block, bool decrUsage) FB_NOTHROW -+void MemPool::releaseBlock(MemBlock* block, bool decrUsage) noexcept - { - if (block->pool != this) - corrupt("bad block released"); -@@ -2464,12 +2464,12 @@ void MemPool::releaseBlock(MemBlock* block, bool decrUsage) FB_NOTHROW - releaseRaw(pool_destroying, hunk, hunk->length, false); - } - --void MemPool::memoryIsExhausted(void) FB_THROW (OOM_EXCEPTION) -+void MemPool::memoryIsExhausted(void) - { - Firebird::BadAlloc::raise(); - } - --void* MemPool::allocRaw(size_t size) FB_THROW (OOM_EXCEPTION) -+void* MemPool::allocRaw(size_t size) - { - #ifndef USE_VALGRIND - if (size == DEFAULT_ALLOCATION) -@@ -2549,7 +2549,7 @@ void* MemPool::allocRaw(size_t size) FB_THROW (OOM_EXCEPTION) - } - - --void* MemPool::getExtent(size_t from, size_t& to) FB_THROW(OOM_EXCEPTION) // pass desired minimum size, return actual extent size -+void* MemPool::getExtent(size_t from, size_t& to) // pass desired minimum size, return actual extent size - { - #ifdef VALIDATE_POOL - MutexLockGuard guard(mutex, "MemPool::getExtent"); -@@ -2560,7 +2560,7 @@ void* MemPool::getExtent(size_t from, size_t& to) FB_THROW(OOM_EXCEPTION) // pa - } - - --void MemPool::releaseExtent(bool destroying, void* block, size_t size, MemPool* pool) FB_NOTHROW -+void MemPool::releaseExtent(bool destroying, void* block, size_t size, MemPool* pool) noexcept - { - if (size < DEFAULT_ALLOCATION) - releaseMemory(block, true); -@@ -2573,7 +2573,7 @@ void MemPool::releaseExtent(bool destroying, void* block, size_t size, MemPool* - } - - --void MemPool::releaseRaw(bool destroying, void* block, size_t size, bool use_cache) FB_NOTHROW -+void MemPool::releaseRaw(bool destroying, void* block, size_t size, bool use_cache) noexcept - { - #ifndef USE_VALGRIND - if (use_cache && (size == DEFAULT_ALLOCATION)) -@@ -2666,19 +2666,19 @@ void MemPool::releaseRaw(bool destroying, void* block, size_t size, bool use_cac - } - } - --void MemPool::globalFree(void* block) FB_NOTHROW -+void MemPool::globalFree(void* block) noexcept - { - deallocate(block); - } - --void* MemoryPool::calloc(size_t size ALLOC_PARAMS) FB_THROW (OOM_EXCEPTION) -+void* MemoryPool::calloc(size_t size ALLOC_PARAMS) - { - void* block = allocate(size ALLOC_PASS_ARGS); - memset(block, 0, size); - return block; - } - --void MemPool::deallocate(void* block) FB_NOTHROW -+void MemPool::deallocate(void* block) noexcept - { - releaseMemory(block, false); - } -@@ -2720,7 +2720,7 @@ bool MemPool::validate(char* buf, FB_SIZE_T size) - } - - #ifdef MEM_DEBUG --void MemPool::print_contents(const char* filename, unsigned flags, const char* filter_path) FB_NOTHROW -+void MemPool::print_contents(const char* filename, unsigned flags, const char* filter_path) noexcept - { - FILE* out = os_utils::fopen(filename, "w"); - if (!out) -@@ -2731,7 +2731,7 @@ void MemPool::print_contents(const char* filename, unsigned flags, const char* f - } - - // This member function can't be const because there are calls to the mutex. --void MemPool::print_contents(FILE* file, unsigned flags, const char* filter_path) FB_NOTHROW -+void MemPool::print_contents(FILE* file, unsigned flags, const char* filter_path) noexcept - { - bool used_only = flags & MemoryPool::PRINT_USED_ONLY; - -@@ -2818,7 +2818,7 @@ MemoryPool& AutoStorage::getAutoMemoryPool() - } - - #ifdef LIBC_CALLS_NEW --void* MemoryPool::globalAlloc(size_t s ALLOC_PARAMS) FB_THROW (OOM_EXCEPTION) -+void* MemoryPool::globalAlloc(size_t s ALLOC_PARAMS) - { - if (!defaultMemoryManager) - { -@@ -2831,17 +2831,17 @@ void* MemoryPool::globalAlloc(size_t s ALLOC_PARAMS) FB_THROW (OOM_EXCEPTION) - } - #endif // LIBC_CALLS_NEW - --void MemoryPool::globalFree(void* block) FB_NOTHROW -+void MemoryPool::globalFree(void* block) noexcept - { - MemPool::globalFree(block); - } - --void* MemoryPool::allocate(size_t size ALLOC_PARAMS) FB_THROW (OOM_EXCEPTION) -+void* MemoryPool::allocate(size_t size ALLOC_PARAMS) - { - return pool->allocate(size ALLOC_PASS_ARGS); - } - --void MemoryPool::deallocate(void* block) FB_NOTHROW -+void MemoryPool::deallocate(void* block) noexcept - { - pool->deallocate(block); - } -@@ -2870,14 +2870,14 @@ void MemoryPool::deletePool(MemoryPool* pool) - delete pool; - } - --void MemoryPool::print_contents(FILE* file, unsigned flags, const char* filter_path) FB_NOTHROW -+void MemoryPool::print_contents(FILE* file, unsigned flags, const char* filter_path) noexcept - { - #ifdef MEM_DEBUG - pool->print_contents(file, flags, filter_path); - #endif - } - --void MemoryPool::print_contents(const char* filename, unsigned flags, const char* filter_path) FB_NOTHROW -+void MemoryPool::print_contents(const char* filename, unsigned flags, const char* filter_path) noexcept - { - #ifdef MEM_DEBUG - pool->print_contents(filename, flags, filter_path); -@@ -2950,21 +2950,21 @@ void AutoStorage::ProbeStack() const - // in a case when we actually need "new" only with file/line information - // this version should be also present as a pair for "delete". - #ifdef DEBUG_GDS_ALLOC --void* operator new(size_t s) FB_THROW (OOM_EXCEPTION) -+void* operator new(size_t s) - { - return MemoryPool::globalAlloc(s ALLOC_ARGS); - } --void* operator new[](size_t s) FB_THROW (OOM_EXCEPTION) -+void* operator new[](size_t s) - { - return MemoryPool::globalAlloc(s ALLOC_ARGS); - } - --void operator delete(void* mem) FB_NOTHROW -+void operator delete(void* mem) noexcept - { - MemoryPool::globalFree(mem); - } - --void operator delete[](void* mem) FB_NOTHROW -+void operator delete[](void* mem) noexcept - { - MemoryPool::globalFree(mem); - } -diff --git a/src/common/classes/alloc.h b/src/common/classes/alloc.h -index 65f9afbb8a9..44d9e0ea462 100644 ---- a/src/common/classes/alloc.h -+++ b/src/common/classes/alloc.h -@@ -58,20 +58,6 @@ - - #include - --#define OOM_EXCEPTION std::bad_alloc -- --#if __cplusplus >= 201103L --#define FB_NO_THROW_SPECIFIER --#endif -- --#ifdef FB_NO_THROW_SPECIFIER --#define FB_THROW(x) --#define FB_NOTHROW noexcept --#else --#define FB_THROW(x) throw(x) --#define FB_NOTHROW throw() --#endif -- - #ifdef DEBUG_GDS_ALLOC - #define FB_NEW new(__FILE__, __LINE__) - #define FB_NEW_POOL(pool) new(pool, __FILE__, __LINE__) -@@ -106,10 +92,10 @@ class MemoryStats - ~MemoryStats() - {} - -- size_t getCurrentUsage() const FB_NOTHROW { return mst_usage.value(); } -- size_t getMaximumUsage() const FB_NOTHROW { return mst_max_usage; } -- size_t getCurrentMapping() const FB_NOTHROW { return mst_mapped.value(); } -- size_t getMaximumMapping() const FB_NOTHROW { return mst_max_mapped; } -+ size_t getCurrentUsage() const noexcept { return mst_usage.value(); } -+ size_t getMaximumUsage() const noexcept { return mst_max_usage; } -+ size_t getCurrentMapping() const noexcept { return mst_mapped.value(); } -+ size_t getMaximumMapping() const noexcept { return mst_max_mapped; } - - private: - // Forbid copying/assignment -@@ -131,7 +117,7 @@ class MemoryStats - size_t mst_max_mapped; - - // These methods are thread-safe due to usage of atomic counters only -- void increment_usage(size_t size) FB_NOTHROW -+ void increment_usage(size_t size) noexcept - { - for (MemoryStats* statistics = this; statistics; statistics = statistics->mst_parent) - { -@@ -141,7 +127,7 @@ class MemoryStats - } - } - -- void decrement_usage(size_t size) FB_NOTHROW -+ void decrement_usage(size_t size) noexcept - { - for (MemoryStats* statistics = this; statistics; statistics = statistics->mst_parent) - { -@@ -149,7 +135,7 @@ class MemoryStats - } - } - -- void increment_mapping(size_t size) FB_NOTHROW -+ void increment_mapping(size_t size) noexcept - { - for (MemoryStats* statistics = this; statistics; statistics = statistics->mst_parent) - { -@@ -159,7 +145,7 @@ class MemoryStats - } - } - -- void decrement_mapping(size_t size) FB_NOTHROW -+ void decrement_mapping(size_t size) noexcept - { - for (MemoryStats* statistics = this; statistics; statistics = statistics->mst_parent) - { -@@ -205,21 +191,21 @@ class MemoryPool - #define ALLOC_PASS_ARGS - #endif // DEBUG_GDS_ALLOC - -- void* calloc(size_t size ALLOC_PARAMS) FB_THROW (OOM_EXCEPTION); -+ void* calloc(size_t size ALLOC_PARAMS); - - #ifdef LIBC_CALLS_NEW -- static void* globalAlloc(size_t s ALLOC_PARAMS) FB_THROW (OOM_EXCEPTION); -+ static void* globalAlloc(size_t s ALLOC_PARAMS); - #else -- static void* globalAlloc(size_t s ALLOC_PARAMS) FB_THROW (OOM_EXCEPTION) -+ static void* globalAlloc(size_t s ALLOC_PARAMS) - { - return defaultMemoryManager->allocate(s ALLOC_PASS_ARGS); - } - #endif // LIBC_CALLS_NEW - -- void* allocate(size_t size ALLOC_PARAMS) FB_THROW (OOM_EXCEPTION); -+ void* allocate(size_t size ALLOC_PARAMS); - -- static void globalFree(void* mem) FB_NOTHROW; -- void deallocate(void* mem) FB_NOTHROW; -+ static void globalFree(void* mem) noexcept; -+ void deallocate(void* mem) noexcept; - - // Set context pool for current thread of execution - static MemoryPool* setContextPool(MemoryPool* newPool); -@@ -229,7 +215,7 @@ class MemoryPool - - // Set statistics group for pool. Usage counters will be decremented from - // previously set group and added to new -- void setStatsGroup(MemoryStats& stats) FB_NOTHROW; -+ void setStatsGroup(MemoryStats& stats) noexcept; - - // Initialize and finalize global memory pool - static void init(); -@@ -241,9 +227,9 @@ class MemoryPool - // Print out pool contents. This is debugging routine - static const unsigned PRINT_USED_ONLY = 0x01; - static const unsigned PRINT_RECURSIVE = 0x02; -- void print_contents(FILE*, unsigned flags = 0, const char* filter_path = 0) FB_NOTHROW; -+ void print_contents(FILE*, unsigned flags = 0, const char* filter_path = 0) noexcept; - // The same routine, but more easily callable from the debugger -- void print_contents(const char* filename, unsigned flags = 0, const char* filter_path = 0) FB_NOTHROW; -+ void print_contents(const char* filename, unsigned flags = 0, const char* filter_path = 0) noexcept; - - public: - struct Finalizer -@@ -298,7 +284,7 @@ class MemoryPool - - } // namespace Firebird - --static inline Firebird::MemoryPool* getDefaultMemoryPool() FB_NOTHROW -+static inline Firebird::MemoryPool* getDefaultMemoryPool() noexcept - { - fb_assert(Firebird::MemoryPool::defaultMemoryManager); - return Firebird::MemoryPool::defaultMemoryManager; -@@ -355,36 +341,36 @@ class SubsystemContextPoolHolder : public ContextPoolHolder - using Firebird::MemoryPool; - - // operators new and delete --extern void* operator new(size_t s ALLOC_PARAMS) FB_THROW (OOM_EXCEPTION); --extern void* operator new[](size_t s ALLOC_PARAMS) FB_THROW (OOM_EXCEPTION); --extern void operator delete(void* mem ALLOC_PARAMS) FB_NOTHROW; --extern void operator delete[](void* mem ALLOC_PARAMS) FB_NOTHROW; -+extern void* operator new(size_t s ALLOC_PARAMS); -+extern void* operator new[](size_t s ALLOC_PARAMS); -+extern void operator delete(void* mem ALLOC_PARAMS) noexcept; -+extern void operator delete[](void* mem ALLOC_PARAMS) noexcept; - - --inline void* operator new(size_t s, Firebird::MemoryPool& pool ALLOC_PARAMS) FB_THROW (OOM_EXCEPTION) -+inline void* operator new(size_t s, Firebird::MemoryPool& pool ALLOC_PARAMS) - { - return pool.allocate(s ALLOC_PASS_ARGS); - } --inline void* operator new[](size_t s, Firebird::MemoryPool& pool ALLOC_PARAMS) FB_THROW (OOM_EXCEPTION) -+inline void* operator new[](size_t s, Firebird::MemoryPool& pool ALLOC_PARAMS) - { - return pool.allocate(s ALLOC_PASS_ARGS); - } - --inline void operator delete(void* mem, Firebird::MemoryPool& pool ALLOC_PARAMS) FB_NOTHROW -+inline void operator delete(void* mem, Firebird::MemoryPool& pool ALLOC_PARAMS) noexcept - { - MemoryPool::globalFree(mem); - } --inline void operator delete[](void* mem, Firebird::MemoryPool& pool ALLOC_PARAMS) FB_NOTHROW -+inline void operator delete[](void* mem, Firebird::MemoryPool& pool ALLOC_PARAMS) noexcept - { - MemoryPool::globalFree(mem); - } - - #if __cplusplus >= 201402L --inline void operator delete(void* mem, std::size_t s ALLOC_PARAMS) FB_NOTHROW -+inline void operator delete(void* mem, std::size_t s ALLOC_PARAMS) noexcept - { - MemoryPool::globalFree(mem); - } --inline void operator delete[](void* mem, std::size_t s ALLOC_PARAMS) FB_NOTHROW -+inline void operator delete[](void* mem, std::size_t s ALLOC_PARAMS) noexcept - { - MemoryPool::globalFree(mem); - } -@@ -392,8 +378,8 @@ inline void operator delete[](void* mem, std::size_t s ALLOC_PARAMS) FB_NOTHROW - - #ifdef DEBUG_GDS_ALLOC - --extern void operator delete(void* mem) FB_NOTHROW; --extern void operator delete[](void* mem) FB_NOTHROW; -+extern void operator delete(void* mem) noexcept; -+extern void operator delete[](void* mem) noexcept; - - #endif // DEBUG_GDS_ALLOC - -- Gitee