mirror of
https://github.com/rehlds/rehlds.git
synced 2024-12-29 08:05:50 +03:00
Moved fixed flags under REHLDS_FIXES and LAUNCHER_FIXES
Removed fixed flags from unnecessary places
This commit is contained in:
parent
274b80bb93
commit
0d20fdf770
@ -227,7 +227,11 @@ long CSys::LoadLibrary(char *lib)
|
||||
|
||||
Q_snprintf(absolute_lib, sizeof(absolute_lib), "%s/%s", cwd, lib);
|
||||
|
||||
#ifdef LAUNCHER_FIXES
|
||||
void *hDll = dlopen(absolute_lib, RTLD_NOW | RTLD_DEEPBIND | RTLD_LOCAL);
|
||||
#else // LAUNCHER_FIXES
|
||||
void *hDll = dlopen(absolute_lib, RTLD_NOW);
|
||||
#endif // LAUNCHER_FIXES
|
||||
if (!hDll)
|
||||
{
|
||||
ErrorMessage(1, dlerror());
|
||||
|
@ -330,7 +330,7 @@ void *FS_LoadLibrary(const char *dllName)
|
||||
#ifdef _WIN32
|
||||
result = LoadLibraryA(dllName);
|
||||
#else
|
||||
result = dlopen(dllName, RTLD_NOW | RTLD_DEEPBIND | RTLD_LOCAL);
|
||||
result = dlopen(dllName, RTLD_NOW);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1067,7 +1067,11 @@ void LoadThisDll(const char *szDllFilename)
|
||||
goto IgnoreThisDLL;
|
||||
}
|
||||
#else // _WIN32
|
||||
#ifdef REHLDS_FIXES
|
||||
void *hDLL = dlopen(szDllFilename, RTLD_NOW | RTLD_DEEPBIND | RTLD_LOCAL);
|
||||
#else // REHLDS_FIXES
|
||||
void *hDLL = dlopen(szDllFilename, RTLD_NOW);
|
||||
#endif // REHLDS_FIXES
|
||||
if (!hDLL)
|
||||
{
|
||||
Con_Printf("LoadLibrary failed on %s: %s\n", szDllFilename, dlerror());
|
||||
|
@ -232,7 +232,7 @@ bool HIDDEN FillModule(Section *section, Module *module)
|
||||
module->base = base;
|
||||
module->size = end - base;
|
||||
module->end = module->base + module->size - 1;
|
||||
module->handle = (size_t)dlopen(filename, RTLD_NOW | RTLD_DEEPBIND | RTLD_LOCAL); // lock from unloading
|
||||
module->handle = (size_t)dlopen(filename, RTLD_NOW); // lock from unloading
|
||||
|
||||
ProcessModuleData(module);
|
||||
|
||||
|
@ -88,7 +88,7 @@ void *GetModuleHandle(const char *name)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if ((handle = dlopen(name, RTLD_NOW | RTLD_DEEPBIND | RTLD_LOCAL)) == nullptr)
|
||||
if ((handle = dlopen(name, RTLD_NOW)) == nullptr)
|
||||
{
|
||||
//printf("Error:%s\n",dlerror());
|
||||
// couldn't open this file
|
||||
@ -139,12 +139,12 @@ CSysModule *Sys_LoadModule(const char *pModuleName)
|
||||
szCwd[strlen(szCwd) - 1] = '\0';
|
||||
|
||||
_snprintf(szAbsoluteModuleName, sizeof(szAbsoluteModuleName), "%s/%s", szCwd, pModuleName);
|
||||
hDLL = dlopen(szAbsoluteModuleName, RTLD_NOW | RTLD_DEEPBIND | RTLD_LOCAL);
|
||||
hDLL = dlopen(szAbsoluteModuleName, RTLD_NOW);
|
||||
}
|
||||
else
|
||||
{
|
||||
_snprintf(szAbsoluteModuleName, sizeof(szAbsoluteModuleName), "%s", pModuleName);
|
||||
hDLL = dlopen(pModuleName, RTLD_NOW | RTLD_DEEPBIND | RTLD_LOCAL);
|
||||
hDLL = dlopen(pModuleName, RTLD_NOW);
|
||||
}
|
||||
#endif // _WIN32
|
||||
|
||||
@ -158,11 +158,11 @@ CSysModule *Sys_LoadModule(const char *pModuleName)
|
||||
#elif defined(OSX)
|
||||
printf("Error: %s\n", dlerror());
|
||||
_snprintf(str, sizeof(str), "%s.dylib", szAbsoluteModuleName);
|
||||
hDLL = dlopen(str, RTLD_NOW | RTLD_DEEPBIND | RTLD_LOCAL);
|
||||
hDLL = dlopen(str, RTLD_NOW);
|
||||
#else
|
||||
printf("Error: %s\n", dlerror());
|
||||
_snprintf(str, sizeof(str), "%s.so", szAbsoluteModuleName);
|
||||
hDLL = dlopen(str, RTLD_NOW | RTLD_DEEPBIND | RTLD_LOCAL);
|
||||
hDLL = dlopen(str, RTLD_NOW);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user