8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 21:23:04 +01:00

Changed libraries' names. Improved a bit ModLoader.

This commit is contained in:
alexpeshkoff 2010-10-19 13:48:56 +00:00
parent 88e0503dc6
commit b31eb6fdf5
4 changed files with 22 additions and 17 deletions

View File

@ -211,7 +211,7 @@ BLRTABLE = $(BIN)/blrtable$(EXEC_EXT)
#
#LibraryFileName=libfbclient
LibraryFileName=libfirebird
LibraryFileName=libfbclient
LibraryFullName=$(LibraryFileName).${SHRLIB_EXT}.${FirebirdVersion}
LibrarySoName=$(LibraryFileName).${SHRLIB_EXT}.${MajorVer}
LibraryBaseName=$(LibraryFileName).${SHRLIB_EXT}
@ -222,8 +222,8 @@ LIBFIREBIRD_BASENAME = $(LIB)/$(LibrarySoName)
# The firebird engine library name
EngineFileName=libengine
EngineSoName=$(EngineFileName).${SHRLIB_EXT}.${OdsVersion}
EngineFileName=libengine${OdsVersion}
EngineSoName=$(EngineFileName).${SHRLIB_EXT}
ENGINE_SONAME = $(LIB)/$(EngineSoName)
# intl will load dynamically, and having the whole soname set with version
@ -280,7 +280,7 @@ endif
LIB_PATH_OPTS = $(call LIB_LINK_RPATH,lib) $(call LIB_LINK_RPATH,intl)
LIB_LINK_SONAME= -Wl,-soname,$(1)
LIB_LINK_MAPFILE= -Wl,--version-script,
FIREBIRD_LIBRARY_LINK= -L$(LIB) -lfirebird
FIREBIRD_LIBRARY_LINK= -L$(LIB) -lfbclient
LINK_OPTS= $(LDFLAGS) $(THR_FLAGS) $(UNDEF_FLAGS) $(LIB_PATH_OPTS)
LIB_LINK_OPTIONS= $(LDFLAGS) $(THR_FLAGS) -shared

View File

@ -97,6 +97,21 @@ public:
**/
static void doctorModuleExtension(Firebird::PathName&);
/** Almost like loadModule(), but in case of failure invokes doctorModuleExtension()
adn retries.
**/
static Module* fixAndLoadModule(const Firebird::PathName& modName)
{
Module* mod = loadModule(modName);
if (!mod)
{
Firebird::PathName fixed(modName);
doctorModuleExtension(fixed);
mod = loadModule(fixed);
}
return mod;
}
/** isLoadableModule checks the given file to see if it is a loadable
module. This function is required because different operating
systems require different checks.

View File

@ -801,12 +801,7 @@ UnicodeUtil::ICU* UnicodeUtil::loadICU(const Firebird::string& icuVersion,
icu = FB_NEW(*getDefaultMemoryPool()) ICU();
icu->ucModule = ModuleLoader::loadModule(filename);
if (!icu->ucModule)
{
ModuleLoader::doctorModuleExtension(filename);
icu->ucModule = ModuleLoader::loadModule(filename);
}
icu->ucModule = ModuleLoader::fixAndLoadModule(filename);
if (!icu->ucModule)
{
@ -816,12 +811,7 @@ UnicodeUtil::ICU* UnicodeUtil::loadICU(const Firebird::string& icuVersion,
filename.printf(inTemplate, majorVersion.c_str(), minorVersion.c_str());
icu->inModule = ModuleLoader::loadModule(filename);
if (!icu->inModule)
{
ModuleLoader::doctorModuleExtension(filename);
icu->inModule = ModuleLoader::loadModule(filename);
}
icu->inModule = ModuleLoader::fixAndLoadModule(filename);
if (!icu->inModule)
{

View File

@ -1139,7 +1139,7 @@ namespace
// load engines
// temp solution
ModuleLoader::Module* engine = ModuleLoader::loadModule("libengine.so.12");
ModuleLoader::Module* engine = ModuleLoader::fixAndLoadModule(fb_utils::getPrefix(fb_utils::FB_DIR_LIB, "engine12"));
if (engine)
{
if ( (plug = fb_query_plugin(Plugin::Provider, NULL)) )