From a1c91f4695e208d5a8f80dc37b1818169b7829ff Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:24:59 +0200 Subject: 5.17 --- zen/dll.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'zen/dll.h') diff --git a/zen/dll.h b/zen/dll.h index 2c39ac44..e1f3f0ad 100644 --- a/zen/dll.h +++ b/zen/dll.h @@ -8,12 +8,12 @@ #define DLLLOADER_H_INCLUDED #include -#ifdef FFS_WIN +#ifdef ZEN_WIN #include #include "scope_guard.h" #include "win.h" //includes "windows.h" -#elif defined FFS_LINUX || defined FFS_MAC +#elif defined ZEN_LINUX || defined ZEN_MAC #include #endif @@ -40,11 +40,11 @@ class DllFun public: DllFun() : fun(nullptr) {} -#ifdef FFS_WIN +#ifdef ZEN_WIN DllFun(const wchar_t* libraryName, const char* functionName) : hLibRef(::LoadLibrary(libraryName), ::FreeLibrary), fun(hLibRef ? reinterpret_cast(::GetProcAddress(static_cast(hLibRef.get()), functionName)) : nullptr) {} -#elif defined FFS_LINUX || defined FFS_MAC +#elif defined ZEN_LINUX || defined ZEN_MAC DllFun(const char* libraryName, const char* functionName) : hLibRef(::dlopen(libraryName, RTLD_LAZY), ::dlclose), fun(hLibRef ? reinterpret_cast(::dlsym(hLibRef.get(), functionName)) : nullptr) {} @@ -57,7 +57,7 @@ private: }; -#ifdef FFS_WIN +#ifdef ZEN_WIN //if the dll is already part of the process space, e.g. "kernel32.dll" or "shell32.dll", we can use a faster variant: //NOTE: since the lifetime of the referenced library is *not* controlled, this is safe to use only for permanently loaded libraries like these! template @@ -100,7 +100,7 @@ std::string getResourceStream(const std::wstring& libraryName, size_t resourceId //--------------- implementation--------------------------------------------------- -#ifdef FFS_WIN +#ifdef ZEN_WIN inline std::string getResourceStream(const wchar_t* libraryName, size_t resourceId) { -- cgit