download.lst                                                                   
     |    4 
 
external/firebird/0001-Revert-Backported-fix-for-7122-Invalid-state-of-mapp.patch.1
 |   19 
 external/firebird/0001-Revert-Fix-for-most-cases-of-7522-7828.patch.1          
     |  268 ++++++++++
 external/firebird/ExternalPackage_firebird.mk                                  
     |    4 
 external/firebird/ExternalProject_firebird.mk                                  
     |    2 
 external/firebird/UnpackedTarball_firebird.mk                                  
     |    5 
 external/firebird/asan.patch                                                   
     |   14 
 external/firebird/c++17.patch                                                  
     |    6 
 external/firebird/firebird-cygwin-msvc-warnings.patch                          
     |    4 
 external/firebird/firebird-vs2017.patch.1                                      
     |   12 
 external/firebird/macos-arm64.patch.0                                          
     |   19 
 11 files changed, 295 insertions(+), 62 deletions(-)

New commits:
commit 4f870ba16a39b2405c063f5c19ab1970b1c24d8a
Author:     Xisco Fauli <[email protected]>
AuthorDate: Mon Mar 9 13:56:52 2026 +0100
Commit:     Xisco Fauli <[email protected]>
CommitDate: Mon Mar 9 22:23:26 2026 +0100

    Reapply "firebird: upgrade to 3.0.13.33818"
    
    This reverts commit bddad5774b683ad3f583751feeb290309f6ab8d4.
    
    Change-Id: I2b43e7b69f789561f7da03649519933a955b810e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201274
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/download.lst b/download.lst
index 2b1bd3cf6fa6..86c0952d1a98 100644
--- a/download.lst
+++ b/download.lst
@@ -116,8 +116,8 @@ EXPAT_TARBALL := expat-2.7.4.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-FIREBIRD_SHA256SUM := 
85b2bf0dd8f71d4814e077fac3f4dcb3015f4b4eaa76ffa0e7549f216602811f
-FIREBIRD_TARBALL := Firebird-3.0.12.33787-0.tar.bz2
+FIREBIRD_SHA256SUM := 
bd263c4f685fb8fc3f1dcb8be8a411033cc31c5404d1dfce5d3849aa3f63a64d
+FIREBIRD_TARBALL := Firebird-3.0.13.33818-0.tar.bz2
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/firebird/ExternalPackage_firebird.mk 
b/external/firebird/ExternalPackage_firebird.mk
index def1db3437a8..33416eea12fe 100644
--- a/external/firebird/ExternalPackage_firebird.mk
+++ b/external/firebird/ExternalPackage_firebird.mk
@@ -16,11 +16,11 @@ $(eval $(call 
gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/ifbclient.
 $(eval $(call 
gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/Engine12.dll,gen/$(if 
$(ENABLE_DEBUG),Debug,Release)/firebird/plugins/Engine12.dll))
 $(eval $(call 
gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/intl/fbintl.dll,gen/$(if
 $(ENABLE_DEBUG),Debug,Release)/firebird/intl/fbintl.dll))
 else ifeq ($(OS),MACOSX)
-$(eval $(call 
gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libfbclient.dylib.3.0.12,gen/$(if
 $(ENABLE_DEBUG),Debug,Release)/firebird/lib/libfbclient.dylib.3.0.12))
+$(eval $(call 
gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libfbclient.dylib.3.0.13,gen/$(if
 $(ENABLE_DEBUG),Debug,Release)/firebird/lib/libfbclient.dylib.3.0.13))
 $(eval $(call 
gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libEngine12.dylib,gen/$(if
 $(ENABLE_DEBUG),Debug,Release)/firebird/plugins/libEngine12.dylib))
 $(eval $(call 
gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/intl/libfbintl.dylib,gen/$(if
 $(ENABLE_DEBUG),Debug,Release)/firebird/intl/libfbintl.dylib))
 else ifeq ($(DISABLE_DYNLOADING),)
-$(eval $(call 
gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libfbclient.so.2,gen/$(if
 $(ENABLE_DEBUG),Debug,Release)/firebird/lib/libfbclient.so.3.0.12))
+$(eval $(call 
gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libfbclient.so.2,gen/$(if
 $(ENABLE_DEBUG),Debug,Release)/firebird/lib/libfbclient.so.3.0.13))
 $(eval $(call 
gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libEngine12.so,gen/$(if 
$(ENABLE_DEBUG),Debug,Release)/firebird/plugins/libEngine12.so))
 $(eval $(call 
gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/intl/libfbintl.so,gen/$(if
 $(ENABLE_DEBUG),Debug,Release)/firebird/intl/libfbintl.so))
 endif
diff --git a/external/firebird/ExternalProject_firebird.mk 
b/external/firebird/ExternalProject_firebird.mk
index c44b007513d7..140a6624484f 100644
--- a/external/firebird/ExternalProject_firebird.mk
+++ b/external/firebird/ExternalProject_firebird.mk
@@ -23,7 +23,7 @@ $(eval $(call gb_ExternalProject_register_targets,firebird,\
 ))
 
 firebird_BUILDDIR = $(EXTERNAL_WORKDIR)/gen/$(if 
$(ENABLE_DEBUG),Debug,Release)/firebird
-firebird_VERSION := 3.0.12
+firebird_VERSION := 3.0.13
 
 $(call gb_ExternalProject_get_state_target,firebird,build):
        $(call gb_Trace_StartRange,firebird,EXTERNAL)
diff --git a/external/firebird/firebird-cygwin-msvc-warnings.patch 
b/external/firebird/firebird-cygwin-msvc-warnings.patch
index 8665b4d8d523..74f581541573 100644
--- a/external/firebird/firebird-cygwin-msvc-warnings.patch
+++ b/external/firebird/firebird-cygwin-msvc-warnings.patch
@@ -4,8 +4,8 @@ diff -ur builds/posix/make.defaults builds/posix/make.defaults
 @@ -102,7 +102,7 @@
  #____________________________________________________________________________
  
- # Firebird needs no RTTI
--RTTI_FLAG:= -fno-rtti
+ # Firebird needs no RTTI, make it build with icu-76.1
+-RTTI_FLAG:= -fno-rtti -DU_SHOW_CPLUSPLUS_API=0 -DU_SHOW_CPLUSPLUS_HEADER_API=0
 +RTTI_FLAG:=
  
  # If this is defined then we use special rules useful for developers only
commit 5b7b27cb68282dddc9f9963eecdc646928e48e82
Author:     Xisco Fauli <[email protected]>
AuthorDate: Sun Mar 8 19:34:41 2026 +0100
Commit:     Xisco Fauli <[email protected]>
CommitDate: Mon Mar 9 22:23:13 2026 +0100

    Reapply "firebird: upgrade to 3.0.12.33787"
    
    This reverts commit daaf43e06bef5072c2e872a5a3b57c79fb0a487d.
    
    0001-Revert-Fix-for-most-cases-of-7522-7828.patch.1 is needed
    to fix some tests failing on Windows with
    
    Failure Location unknown## : Error
    Test name: MigrationTest::testTime
    An uncaught UNO exception
    - com.sun.star.sdbc.SQLException: {Message: "firebird_sdbc error:
    *Wrong file for memory mapping, see details in firebird.log
    caused by
    'isc_create_database'
     at 
E:/jenkins/workspace/gerrit_windows_wsl/connectivity/source/drivers/firebird/Util.cxx:69",
 Context: @0000002A787862E0, SQLState: "", ErrorCode: 1, NextException: void: 
void}
    
    Change-Id: I5409deb8d901cda824a252e8ba2497caaeb48757
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201219
    Reviewed-by: Xisco Fauli <[email protected]>
    Tested-by: Jenkins

diff --git a/download.lst b/download.lst
index c59a55e7ce37..2b1bd3cf6fa6 100644
--- a/download.lst
+++ b/download.lst
@@ -116,8 +116,8 @@ EXPAT_TARBALL := expat-2.7.4.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-FIREBIRD_SHA256SUM := 
c716fc1c788ed614050f5469e1ba0ff442c2f1f7b907a2c808a8bac1dc3d6f83
-FIREBIRD_TARBALL := Firebird-3.0.11.33703-0.tar.bz2
+FIREBIRD_SHA256SUM := 
85b2bf0dd8f71d4814e077fac3f4dcb3015f4b4eaa76ffa0e7549f216602811f
+FIREBIRD_TARBALL := Firebird-3.0.12.33787-0.tar.bz2
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git 
a/external/firebird/0001-Revert-Backported-fix-for-7122-Invalid-state-of-mapp.patch.1
 
b/external/firebird/0001-Revert-Backported-fix-for-7122-Invalid-state-of-mapp.patch.1
index 625ab20ef440..f67bb097dcff 100644
--- 
a/external/firebird/0001-Revert-Backported-fix-for-7122-Invalid-state-of-mapp.patch.1
+++ 
b/external/firebird/0001-Revert-Backported-fix-for-7122-Invalid-state-of-mapp.patch.1
@@ -38,19 +38,6 @@ index a891103b53..66be146060 100644
        isc_dpb_address = byte(1);
        isc_dpb_addr_protocol = byte(1);
        isc_dpb_addr_endpoint = byte(2);
-diff --git a/src/jrd/Mapping.h b/src/jrd/Mapping.h
-index b5e068d5a0..3ab1c70c92 100644
---- a/src/jrd/Mapping.h
-+++ b/src/jrd/Mapping.h
-@@ -44,7 +44,7 @@ bool mapUser(Firebird::string& name, Firebird::string& 
trusted_role, Firebird::s
- void clearMap(const char* dbName);
- void shutdownMappingIpc();
- 
--class GlobalMappingScan : public VirtualTableScan
-+class GlobalMappingScan: public VirtualTableScan
- {
- public:
-       GlobalMappingScan(CompilerScratch* csb, const Firebird::string& alias,
 diff --git a/src/jrd/jrd.cpp b/src/jrd/jrd.cpp
 index 43be48c5a6..4200780aa6 100644
 --- a/src/jrd/jrd.cpp
@@ -133,10 +120,10 @@ diff --git a/src/utilities/nbackup/nbackup.cpp 
b/src/utilities/nbackup/nbackup.c
 index e5384bf67a..4703079d67 100644
 --- a/src/utilities/nbackup/nbackup.cpp
 +++ b/src/utilities/nbackup/nbackup.cpp
-@@ -281,7 +281,7 @@ public:
-               username(_username), role(_role), password(_password),
+@@ -282,7 +282,7 @@
                run_db_triggers(_run_db_triggers), direct_io(_direct_io),
-               dbase(0), backup(0), decompress(_deco), childId(0), 
db_size_pages(0),
+               dbase(INVALID_HANDLE_VALUE), backup(INVALID_HANDLE_VALUE),
+               decompress(_deco), childId(0), db_size_pages(0),
 -              m_odsNumber(0), m_silent(false), m_printed(false), 
m_flash_map(false)
 +              m_odsNumber(0), m_silent(false), m_printed(false)
        {
diff --git 
a/external/firebird/0001-Revert-Fix-for-most-cases-of-7522-7828.patch.1 
b/external/firebird/0001-Revert-Fix-for-most-cases-of-7522-7828.patch.1
new file mode 100644
index 000000000000..533d0912abe6
--- /dev/null
+++ b/external/firebird/0001-Revert-Fix-for-most-cases-of-7522-7828.patch.1
@@ -0,0 +1,268 @@
+From 27e73983efcbd38e94d6e63e2f7e8d0d4fcebc1d Mon Sep 17 00:00:00 2001
+From: Xisco Fauli <[email protected]>
+Date: Mon, 9 Mar 2026 12:03:23 +0100
+Subject: [PATCH] Revert "Fix for most cases of #7522 (#7828)"
+
+This reverts commit 375afe2f8d128986da37171507850e619d465501.
+---
+ src/jrd/Mapping.cpp | 138 +++++++++++++++++---------------------------
+ src/jrd/Mapping.h   |   1 -
+ src/jrd/jrd.cpp     |   4 --
+ src/yvalve/why.cpp  |   9 ---
+ 4 files changed, 53 insertions(+), 99 deletions(-)
+
+diff --git a/src/jrd/Mapping.cpp b/src/jrd/Mapping.cpp
+index 31c33a6868..7c3e68c630 100644
+--- a/src/jrd/Mapping.cpp
++++ b/src/jrd/Mapping.cpp
+@@ -602,7 +602,6 @@ class MappingIpc FB_FINAL : public Firebird::IpcObject
+ public:
+       explicit MappingIpc(MemoryPool&)
+               : processId(getpid()),
+-                globalNamespace(true),
+                 cleanupSync(*getDefaultMemoryPool(), clearDelivery, 
THREAD_high)
+       { }
+ 
+@@ -653,90 +652,74 @@ public:
+ 
+               setup();
+ 
+-              // If current process runs as embedded, have no access to the 
global
+-              // namespace and is the only user of shared memory - shutdown 
own mapping
+-              // to let future service process to create same mapping in 
global namespace.
++              Guard gShared(this);
+ 
+-              const bool embedded = MasterInterfacePtr()->serverMode(-1) < 0;
+-              bool shutdownShmem = embedded && !globalNamespace;
++              MappingHeader* sMem = sharedMemory->getHeader();
++              target.copyTo(sMem->databaseForReset, 
sizeof(sMem->databaseForReset));
+ 
+-              {  // Guard scope
+-                      Guard gShared(this);
+-
+-                      MappingHeader* sMem = sharedMemory->getHeader();
+-                      target.copyTo(sMem->databaseForReset, 
sizeof(sMem->databaseForReset));
++              // Set currentProcess
++              sMem->currentProcess = -1;
++              for (unsigned n = 0; n < sMem->processes; ++n)
++              {
++                      MappingHeader::Process* p = &sMem->process[n];
++                      if (!(p->flags & MappingHeader::FLAG_ACTIVE))
++                              continue;
+ 
+-                      // Set currentProcess
+-                      sMem->currentProcess = -1;
+-                      for (unsigned n = 0; n < sMem->processes; ++n)
++                      if (p->id == processId)
+                       {
+-                              MappingHeader::Process* p = &sMem->process[n];
+-                              if (!(p->flags & MappingHeader::FLAG_ACTIVE))
+-                                      continue;
+-
+-                              if (p->id == processId)
+-                              {
+-                                      sMem->currentProcess = n;
+-                                      break;
+-                              }
++                              sMem->currentProcess = n;
++                              break;
+                       }
++              }
+ 
+-                      if (sMem->currentProcess < 0)
++              if (sMem->currentProcess < 0)
++              {
++                      // did not find current process
++                      // better ignore delivery than fail in it
++                      gds__log("MappingIpc::clearMap() failed to find current 
process %d in shared memory", processId);
++                      return;
++              }
++              MappingHeader::Process* current = 
&sMem->process[sMem->currentProcess];
++
++              // Deliver
++              for (unsigned n = 0; n < sMem->processes; ++n)
++              {
++                      MappingHeader::Process* p = &sMem->process[n];
++                      if (!(p->flags & MappingHeader::FLAG_ACTIVE))
++                              continue;
++
++                      if (p->id == processId)
+                       {
+-                              // did not find current process
+-                              // better ignore delivery than fail in it
+-                              gds__log("MappingIpc::clearMap() failed to find 
current process %d in shared memory", processId);
+-                              return;
++                              MAP_DEBUG(fprintf(stderr, "Internal resetMap(%s)
", sMem->databaseForReset));
++                              resetMap(sMem->databaseForReset);
++                              continue;
+                       }
+-                      MappingHeader::Process* current = 
&sMem->process[sMem->currentProcess];
+ 
+-                      // Deliver
+-                      for (unsigned n = 0; n < sMem->processes; ++n)
++                      SLONG value = 
sharedMemory->eventClear(&current->callbackEvent);
++                      p->flags |= MappingHeader::FLAG_DELIVER;
++                      if (sharedMemory->eventPost(&p->notifyEvent) != 
FB_SUCCESS)
+                       {
+-                              MappingHeader::Process* p = &sMem->process[n];
+-                              if (!(p->flags & MappingHeader::FLAG_ACTIVE))
+-                                      continue;
+-
+-                              if (p->id == processId)
+-                              {
+-                                      MAP_DEBUG(fprintf(stderr, "Internal 
resetMap(%s)
", sMem->databaseForReset));
+-                                      resetMap(sMem->databaseForReset);
+-                                      continue;
+-                              }
+-
+-                              SLONG value = 
sharedMemory->eventClear(&current->callbackEvent);
+-                              p->flags |= MappingHeader::FLAG_DELIVER;
+-                              if (sharedMemory->eventPost(&p->notifyEvent) != 
FB_SUCCESS)
+-                              {
+-                                      (Arg::Gds(isc_random) << "Error posting 
notifyEvent in mapping shared memory").raise();
+-                              }
++                              (Arg::Gds(isc_random) << "Error posting 
notifyEvent in mapping shared memory").raise();
++                      }
+ 
+-                              int tout = 0;
+-                              while 
(sharedMemory->eventWait(&current->callbackEvent, value, 10000) != FB_SUCCESS)
++                      int tout = 0;
++                      while (sharedMemory->eventWait(&current->callbackEvent, 
value, 10000) != FB_SUCCESS)
++                      {
++                              if (!ISC_check_process_existence(p->id))
+                               {
+-                                      if (!ISC_check_process_existence(p->id))
+-                                      {
+-                                              MAP_DEBUG(fprintf(stderr, 
"clearMapping: dead process found %d", p->id));
+-
+-                                              p->flags &= 
~MappingHeader::FLAG_ACTIVE;
+-                                              
sharedMemory->eventFini(&p->notifyEvent);
+-                                              
sharedMemory->eventFini(&p->callbackEvent);
+-                                              break;
+-                                      }
++                                      MAP_DEBUG(fprintf(stderr, 
"clearMapping: dead process found %d", p->id));
+ 
+-                                      if (++tout >= 1000) // 10 sec
+-                                              (Arg::Gds(isc_random) << 
"Timeout when waiting callback from other process.").raise();
++                                      p->flags &= ~MappingHeader::FLAG_ACTIVE;
++                                      
sharedMemory->eventFini(&p->notifyEvent);
++                                      
sharedMemory->eventFini(&p->callbackEvent);
++                                      break;
+                               }
+ 
+-                              if (p->flags & MappingHeader::FLAG_ACTIVE)
+-                                      shutdownShmem = false;
+-
+-                              MAP_DEBUG(fprintf(stderr, "Notified pid %d 
about reset map %s
", p->id, sMem->databaseForReset));
++                              if (++tout >= 1000) // 10 sec
++                                      (Arg::Gds(isc_random) << "Timeout when 
waiting callback from other process.").raise();
+                       }
+-              }  // Guard scope
+-
+-              if (shutdownShmem)
+-                      shutdown();
++                      MAP_DEBUG(fprintf(stderr, "Notified pid %d about reset 
map %s
", p->id, sMem->databaseForReset));
++              }
+       }
+ 
+       void setup()
+@@ -747,11 +730,6 @@ public:
+               if (sharedMemory)
+                       return;
+ 
+-              const bool embedded = MasterInterfacePtr()->serverMode(-1) < 0;
+-#ifdef WIN_NT
+-              globalNamespace = fb_utils::isGlobalKernelPrefix();
+-#endif
+-
+               AutoSharedMemory tempSharedMemory;
+               try
+               {
+@@ -762,10 +740,7 @@ public:
+               {
+                       StaticStatusVector s;
+                       ex.stuffException(s);
+-                      if (!embedded)
+-                      {
+-                              iscLogException("MappingIpc: Cannot initialize 
the shared memory region", ex);
+-                      }
++                      iscLogException("MappingIpc: Cannot initialize the 
shared memory region", ex);
+                       throw;
+               }
+               fb_assert(tempSharedMemory->getHeader()->mhb_header_version == 
MemoryHeader::HEADER_VERSION);
+@@ -961,7 +936,6 @@ private:
+       Mutex initMutex;
+       const SLONG processId;
+       unsigned process;
+-      bool globalNamespace;
+       Semaphore startupSemaphore;
+       ThreadFinishSync<MappingIpc*> cleanupSync;
+ };
+@@ -1302,12 +1276,6 @@ void clearMap(const char* dbName)
+       mappingIpc->clearMap(dbName);
+ }
+ 
+-void initMappingIpc()
+-{
+-      mappingIpc->setup();
+-}
+-
+-
+ const Format* GlobalMappingScan::getFormat(thread_db* tdbb, jrd_rel* 
relation) const
+ {
+       jrd_tra* const transaction = tdbb->getTransaction();
+diff --git a/src/jrd/Mapping.h b/src/jrd/Mapping.h
+index 988e77f90a..b5e068d5a0 100644
+--- a/src/jrd/Mapping.h
++++ b/src/jrd/Mapping.h
+@@ -42,7 +42,6 @@ bool mapUser(Firebird::string& name, Firebird::string& 
trusted_role, Firebird::s
+       const char* alias, const char* db, const char* securityDb, 
Firebird::ICryptKeyCallback* cryptCb,
+       Firebird::IAttachment* att, bool logMsgs);
+ void clearMap(const char* dbName);
+-void initMappingIpc();
+ void shutdownMappingIpc();
+ 
+ class GlobalMappingScan : public VirtualTableScan
+diff --git a/src/jrd/jrd.cpp b/src/jrd/jrd.cpp
+index 145716cbcd..5fee5b916e 100644
+--- a/src/jrd/jrd.cpp
++++ b/src/jrd/jrd.cpp
+@@ -2456,10 +2456,6 @@ JAttachment* 
JProvider::createDatabase(CheckStatusWrapper* user_status, const ch
+       RefDeb(DEB_AR_JATT, "JProvider::createDatabase");
+       try
+       {
+-              // In case of problems when creating shared memory, it is 
better to
+-              // fail early, before attempt to create database file.
+-              initMappingIpc();
+-
+               ThreadContextHolder tdbb(user_status);
+               MutexEnsureUnlock guardDbInit(dbInitMutex, FB_FUNCTION);
+ 
+diff --git a/src/yvalve/why.cpp b/src/yvalve/why.cpp
+index 72a05ce501..0d936705aa 100644
+--- a/src/yvalve/why.cpp
++++ b/src/yvalve/why.cpp
+@@ -5756,20 +5756,11 @@ YAttachment* 
Dispatcher::attachOrCreateDatabase(Firebird::CheckStatusWrapper* st
+                               return r;
+                       }
+ 
+-                      if (currentStatus != status &&
+-                              currentStatus->getErrors()[1] != 
isc_unavailable &&
+-                              status->getErrors()[1] == isc_instance_conflict)
+-                      {
+-                              status->setErrors(currentStatus->getErrors());
+-                              
status->setWarnings(currentStatus->getWarnings());
+-                      }
+-
+                       switch (currentStatus->getErrors()[1])
+                       {
+                       case isc_io_error:
+                       case isc_lock_dir_access:
+                       case isc_no_priv:
+-                      case isc_instance_conflict:
+                               currentStatus = &tempCheckStatusWrapper;
+                               // fall down...
+                       case isc_unavailable:
+-- 
+2.39.5
+
diff --git a/external/firebird/ExternalPackage_firebird.mk 
b/external/firebird/ExternalPackage_firebird.mk
index 83fc4967b448..def1db3437a8 100644
--- a/external/firebird/ExternalPackage_firebird.mk
+++ b/external/firebird/ExternalPackage_firebird.mk
@@ -16,11 +16,11 @@ $(eval $(call 
gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/ifbclient.
 $(eval $(call 
gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/Engine12.dll,gen/$(if 
$(ENABLE_DEBUG),Debug,Release)/firebird/plugins/Engine12.dll))
 $(eval $(call 
gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/intl/fbintl.dll,gen/$(if
 $(ENABLE_DEBUG),Debug,Release)/firebird/intl/fbintl.dll))
 else ifeq ($(OS),MACOSX)
-$(eval $(call 
gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libfbclient.dylib.3.0.11,gen/$(if
 $(ENABLE_DEBUG),Debug,Release)/firebird/lib/libfbclient.dylib.3.0.11))
+$(eval $(call 
gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libfbclient.dylib.3.0.12,gen/$(if
 $(ENABLE_DEBUG),Debug,Release)/firebird/lib/libfbclient.dylib.3.0.12))
 $(eval $(call 
gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libEngine12.dylib,gen/$(if
 $(ENABLE_DEBUG),Debug,Release)/firebird/plugins/libEngine12.dylib))
 $(eval $(call 
gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/intl/libfbintl.dylib,gen/$(if
 $(ENABLE_DEBUG),Debug,Release)/firebird/intl/libfbintl.dylib))
 else ifeq ($(DISABLE_DYNLOADING),)
-$(eval $(call 
gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libfbclient.so.2,gen/$(if
 $(ENABLE_DEBUG),Debug,Release)/firebird/lib/libfbclient.so.3.0.11))
+$(eval $(call 
gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libfbclient.so.2,gen/$(if
 $(ENABLE_DEBUG),Debug,Release)/firebird/lib/libfbclient.so.3.0.12))
 $(eval $(call 
gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libEngine12.so,gen/$(if 
$(ENABLE_DEBUG),Debug,Release)/firebird/plugins/libEngine12.so))
 $(eval $(call 
gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/intl/libfbintl.so,gen/$(if
 $(ENABLE_DEBUG),Debug,Release)/firebird/intl/libfbintl.so))
 endif
diff --git a/external/firebird/ExternalProject_firebird.mk 
b/external/firebird/ExternalProject_firebird.mk
index 8b249e54bf5d..c44b007513d7 100644
--- a/external/firebird/ExternalProject_firebird.mk
+++ b/external/firebird/ExternalProject_firebird.mk
@@ -23,7 +23,7 @@ $(eval $(call gb_ExternalProject_register_targets,firebird,\
 ))
 
 firebird_BUILDDIR = $(EXTERNAL_WORKDIR)/gen/$(if 
$(ENABLE_DEBUG),Debug,Release)/firebird
-firebird_VERSION := 3.0.11
+firebird_VERSION := 3.0.12
 
 $(call gb_ExternalProject_get_state_target,firebird,build):
        $(call gb_Trace_StartRange,firebird,EXTERNAL)
diff --git a/external/firebird/UnpackedTarball_firebird.mk 
b/external/firebird/UnpackedTarball_firebird.mk
index fb533fcb5014..060da2e08aea 100644
--- a/external/firebird/UnpackedTarball_firebird.mk
+++ b/external/firebird/UnpackedTarball_firebird.mk
@@ -27,6 +27,9 @@ $(eval $(call 
gb_UnpackedTarball_update_autoconf_configs,firebird,\
 # * 
external/firebird/0001-Revert-Backported-fix-for-7122-Invalid-state-of-mapp.patch.1
 is a revert
 #   of 
<https://github.com/FirebirdSQL/firebird/commit/585b2d133a3891b58b7aeb4ddd3ccd124168abf0>
 #   "Backported fix for #7122: Invalid state of mapping cache after 
replacement of database":
+# * external/firebird/0001-Revert-Fix-for-most-cases-of-7522-7828.patch.1 is a 
revert
+#   of 
<https://github.com/FirebirdSQL/firebird/commit/375afe2f8d128986da37171507850e619d465501>
+#   "Fix for most cases of #7522 (#7828)":
 $(eval $(call gb_UnpackedTarball_add_patches,firebird,\
         external/firebird/firebird.disable-ib-util-not-found.patch.1 \
                external/firebird/firebird-Engine12.patch \
@@ -46,6 +49,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,firebird,\
     external/firebird/configure-c99.patch \
     external/firebird/Wincompatible-function-pointer-types.patch \
        
external/firebird/0001-Revert-Backported-fix-for-7122-Invalid-state-of-mapp.patch.1
 \
+       external/firebird/0001-Revert-Fix-for-most-cases-of-7522-7828.patch.1 \
        external/firebird/mold.patch \
     external/firebird/c++26.patch \
     external/firebird/c++20.patch \
@@ -55,7 +59,6 @@ ifeq ($(OS),WNT)
 $(eval $(call gb_UnpackedTarball_add_patches,firebird,\
        external/firebird/firebird-cygwin-msvc.patch \
        external/firebird/firebird-cygwin-msvc-warnings.patch \
-       external/firebird/firebird-vs2017.patch.1 \
 ))
 endif
 
diff --git a/external/firebird/asan.patch b/external/firebird/asan.patch
index 30d430466cfb..acebc9e865fa 100644
--- a/external/firebird/asan.patch
+++ b/external/firebird/asan.patch
@@ -141,16 +141,15 @@
  
 --- src/common/classes/alloc.h
 +++ src/common/classes/alloc.h
-@@ -295,40 +295,60 @@
- 
- // operators new and delete
+@@ -290,6 +290,7 @@
+ #pragma warning(disable : 4595)               // non-member operator new or 
delete functions may not be declared inline
+ #endif
  
 +#if !defined USE_ASAN
  inline void* operator new(size_t s ALLOC_PARAMS)
  {
        return MemoryPool::globalAlloc(s ALLOC_PASS_ARGS);
- }
- inline void* operator new[](size_t s ALLOC_PARAMS)
+@@ -298,16 +299,26 @@
  {
        return MemoryPool::globalAlloc(s ALLOC_PASS_ARGS);
  }
@@ -177,8 +176,7 @@
  inline void operator delete(void* mem ALLOC_PARAMS) throw()
  {
        MemoryPool::globalFree(mem);
- }
- inline void operator delete[](void* mem ALLOC_PARAMS) throw()
+@@ -316,14 +327,23 @@
  {
        MemoryPool::globalFree(mem);
  }
@@ -201,7 +199,7 @@
 +#endif
  }
  
- #ifdef DEBUG_GDS_ALLOC
+ #if _MSC_VER >= 1900
 --- src/include/firebird.h
 +++ src/include/firebird.h
 @@ -38,8 +38,17 @@
diff --git a/external/firebird/c++17.patch b/external/firebird/c++17.patch
index 4863b89bd8fd..1b61cb39e0c5 100644
--- a/external/firebird/c++17.patch
+++ b/external/firebird/c++17.patch
@@ -284,9 +284,9 @@
  
        static void globalFree(void* mem) throw ();
        void deallocate(void* mem) throw ();
-@@ -289,20 +289,20 @@
- 
- // operators new and delete
+@@ -290,20 +290,20 @@
+ #pragma warning(disable : 4595)               // non-member operator new or 
delete functions may not be declared inline
+ #endif
  
 -inline void* operator new(size_t s ALLOC_PARAMS) throw (OOM_EXCEPTION)
 +inline void* operator new(size_t s ALLOC_PARAMS)
diff --git a/external/firebird/firebird-vs2017.patch.1 
b/external/firebird/firebird-vs2017.patch.1
deleted file mode 100644
index 3c7db187485c..000000000000
--- a/external/firebird/firebird-vs2017.patch.1
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ru firebird.orig/src/common/os/win32/mod_loader.cpp 
firebird/src/common/os/win32/mod_loader.cpp
---- firebird.orig/src/common/os/win32/mod_loader.cpp   2017-02-15 
22:11:48.939042400 +0100
-+++ firebird/src/common/os/win32/mod_loader.cpp        2017-02-15 
22:12:30.062262700 +0100
-@@ -101,7 +101,7 @@
-                               "msvcr110.dll",
- #elif _MSC_VER == 1800
-                                       "msvcr120.dll",
--#elif _MSC_VER >= 1900 && _MSC_VER < 1920
-+#elif _MSC_VER >= 1900 && _MSC_VER < 2000
-                                       "vcruntime140.dll",
- #else
-                     #error Specify CRT DLL name here !
diff --git a/external/firebird/macos-arm64.patch.0 
b/external/firebird/macos-arm64.patch.0
index ab2596dbd987..b7da14627800 100644
--- a/external/firebird/macos-arm64.patch.0
+++ b/external/firebird/macos-arm64.patch.0
@@ -26,10 +26,10 @@
      MAKEFILE_POSTFIX=darwin
 --- src/common/common.h
 +++ src/common/common.h
-@@ -234,6 +234,12 @@
- #define DARWINPPC64
- #define FB_CPU CpuPowerPc64
+@@ -246,6 +246,12 @@
+ #define DARWIN64              // Wrong, bad, but I follow HEAD rules for a 
while
  #endif
+ 
 +#ifdef __aarch64__
 +// This means x86_64, but does it matter? There is no arch_arm64, 
arch_aarch64, arch_darwin_arm64,
 +// or arch_darwin_aarch64 in the P_ARCH enum in src/remote/protocol.h.
@@ -42,7 +42,7 @@
 --- src/jrd/license.h
 +++ src/jrd/license.h
 @@ -128,6 +128,9 @@
- #if defined(ARM)
+ #if defined(ARM) || defined(ARM64)
  #define FB_PLATFORM     "UA"
  #endif
 +#if defined(__aarch64__)
@@ -96,14 +96,3 @@
 +SO_LINK_LIBS+=-liconv
 +
 +include $(ROOT)/gen/darwin.defaults
---- src/isql/InputDevices.cpp
-+++ src/isql/InputDevices.cpp
-@@ -23,7 +23,7 @@
- 
- #include "firebird.h"
- #if defined(DARWIN) && !defined(IOS)
--#if defined(i386) || defined(__x86_64__)
-+#if defined(i386) || defined(__x86_64__) || defined(__arm64__)
- #include <architecture/i386/io.h>
- #else
- #include <io.h>

Reply via email to