Skip to content

Commit

Permalink
xrCore/ModuleLookup: trying to fix reported compilation problem
Browse files Browse the repository at this point in the history
fixed incorrect macros usage
  • Loading branch information
Xottab-DUTY committed May 28, 2018
1 parent c5a5899 commit 62858d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/xrCore/ModuleLookup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ModuleHandle::ModuleHandle(const bool dontUnload) : handle(nullptr), dontUnload(

ModuleHandle::ModuleHandle(pcstr moduleName, bool dontUnload /*= false*/) : handle(nullptr), dontUnload(dontUnload)
{
Open(moduleName);
this->Open(moduleName);
}

ModuleHandle::~ModuleHandle()
Expand Down Expand Up @@ -49,15 +49,15 @@ void ModuleHandle::Сlose()

#ifdef WINDOWS
closed = FreeLibrary(static_cast<HMODULE>(handle)) != 0;
#else
defined(LINUX)
closed = dlclose(handle) == 0;
#endif

if (closed == false)
{
#ifdef WINDOWS
Msg("! Failed to close DLL: 0x%d", GetLastError());
#elif LINUX
#elif defined(LINUX)
Msg("! Failed to close DLL: 0x%d", dlerror());
#endif
}
Expand Down Expand Up @@ -89,7 +89,7 @@ void* ModuleHandle::GetProcAddress(pcstr procName) const
{
#ifdef WINDOWS
Msg("! Failed to load procedure [%s] from DLL: 0x%d", procName, GetLastError());
#elif LINUX
#elif defined(LINUX)
Msg("! Failed to load procedure [%s] from DLL: 0x%d", procName, dlerror());
#endif
}
Expand Down

0 comments on commit 62858d0

Please sign in to comment.