summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorWastack <btomi96@gmail.com>2016-07-28 17:16:19 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2016-08-17 13:05:40 +0000
commit45f42681f4d1260c42140a313560534e605f81a4 (patch)
tree1c51f2ba29261c38a3e771dc04968f2e9cb5957f /connectivity
parent0cb7d76bc5552245642ba423a87831cd9e0b2b92 (diff)
GSoC Upgrade firebird to 3.0
Embedded firebird is now version 3.0. Supports MSVC 14.0. Instead of fbembed, there are now two libraries: fbclient and Engine12. fbclient is linked as fbembed before, Engine12 is loaded at runtime from fbclient. fb now needs system libtommath, which is supplied as a new ExternalProject of LO. Change-Id: I132939bdee745795b22f675e4265e9590079c45f Reviewed-on: https://gerrit.libreoffice.org/27642 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/firebird/Driver.cxx19
1 files changed, 17 insertions, 2 deletions
diff --git a/connectivity/source/drivers/firebird/Driver.cxx b/connectivity/source/drivers/firebird/Driver.cxx
index ab83b502fd6f..a3224e56a962 100644
--- a/connectivity/source/drivers/firebird/Driver.cxx
+++ b/connectivity/source/drivers/firebird/Driver.cxx
@@ -62,6 +62,9 @@ namespace {
const char our_sFirebirdTmpVar[] = "FIREBIRD_TMP";
const char our_sFirebirdLockVar[] = "FIREBIRD_LOCK";
const char our_sFirebirdMsgVar[] = "FIREBIRD_MSG";
+#ifdef MACOSX
+const char our_sFirebirdLibVar[] = "LIBREOFFICE_FIREBIRD_LIB";
+#endif
};
FirebirdDriver::FirebirdDriver(const css::uno::Reference< css::uno::XComponentContext >& _rxContext)
@@ -94,7 +97,16 @@ FirebirdDriver::FirebirdDriver(const css::uno::Reference< css::uno::XComponentCo
OUString sMsgPath;
::osl::FileBase::getSystemPathFromFileURL(sMsgURL, sMsgPath);
osl_setEnvironment(OUString(our_sFirebirdMsgVar).pData, sMsgPath.pData);
-#endif
+#ifdef MACOSX
+ // Set an env. variable to specify library location
+ // for dlopen used in fbclient.
+ OUString sLibURL("$LO_LIB_DIR");
+ ::rtl::Bootstrap::expandMacros(sLibURL);
+ OUString sLibPath;
+ ::osl::FileBase::getSystemPathFromFileURL(sLibURL, sLibPath);
+ osl_setEnvironment(OUString(our_sFirebirdLibVar).pData, sLibPath.pData);
+#endif /*MACOSX*/
+#endif /*!SYSTEM_FIREBIRD*/
}
FirebirdDriver::~FirebirdDriver()
@@ -120,7 +132,10 @@ void FirebirdDriver::disposing()
#ifndef SYSTEM_FIREBIRD
osl_clearEnvironment(OUString(our_sFirebirdMsgVar).pData);
-#endif
+#ifdef MACOSX
+ osl_clearEnvironment(OUString(our_sFirebirdLibVar).pData);
+#endif /*MACOSX*/
+#endif /*!SYSTEM_FIREBIRD*/
OSL_VERIFY(fb_shutdown(0, 1));