diff options
Diffstat (limited to 'src/dylib.h')
-rw-r--r-- | src/dylib.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/dylib.h b/src/dylib.h index 246693c..d4bb827 100644 --- a/src/dylib.h +++ b/src/dylib.h @@ -19,58 +19,58 @@ #ifdef _WIN32 -#include <windows.h> +# include <windows.h> enum DylibFlags { - DYLIB_GLOBAL = 0, - DYLIB_LAZY = 1, - DYLIB_NOW = 2, + DYLIB_GLOBAL = 0, + DYLIB_LAZY = 1, + DYLIB_NOW = 2, }; static inline void* dylib_open(const char* const filename, const int flags) { - return LoadLibrary(filename); + return LoadLibrary(filename); } static inline int dylib_close(void* const handle) { - return !FreeLibrary((HMODULE)handle); + return !FreeLibrary((HMODULE)handle); } static inline const char* dylib_error(void) { - return "Unknown error"; + return "Unknown error"; } #else -#include <dlfcn.h> +# include <dlfcn.h> enum DylibFlags { - DYLIB_GLOBAL = RTLD_GLOBAL, - DYLIB_LAZY = RTLD_LAZY, - DYLIB_NOW = RTLD_NOW, + DYLIB_GLOBAL = RTLD_GLOBAL, + DYLIB_LAZY = RTLD_LAZY, + DYLIB_NOW = RTLD_NOW, }; static inline void* dylib_open(const char* const filename, const int flags) { - return dlopen(filename, flags); + return dlopen(filename, flags); } static inline int dylib_close(void* const handle) { - return dlclose(handle); + return dlclose(handle); } static inline const char* dylib_error(void) { - return dlerror(); + return dlerror(); } #endif |