diff options
-rw-r--r-- | subhook.c | 4 | ||||
-rw-r--r-- | subhook.h | 14 | ||||
-rw-r--r-- | subhook_unix.c (renamed from subhook_linux.c) | 0 |
3 files changed, 11 insertions, 7 deletions
@@ -44,8 +44,8 @@ SUBHOOK_EXPORT int SUBHOOK_API subhook_is_installed(subhook_t hook) { #if defined SUBHOOK_WINDOWS #include "subhook_windows.c" -#elif defined SUBHOOK_LINUX - #include "subhook_linux.c" +#elif defined SUBHOOK_UNIX + #include "subhook_unix.c" #endif #if defined SUBHOOK_X86 || defined SUBHOOK_X86_64 @@ -36,10 +36,14 @@ #error Unsupported architecture #endif -#if defined __linux__ - #define SUBHOOK_LINUX -#elif defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 || defined __CYGWIN__ #define SUBHOOK_WINDOWS +#elif defined __linux__ + #define SUBHOOK_LINUX + #define SUBHOOK_UNIX +#elif defined __APPLE__ + #define SUBHOOK_MACOS + #define SUBHOOK_UNIX #else #error Unsupported operating system #endif @@ -61,7 +65,7 @@ #if defined SUBHOOK_X86 #if defined SUBHOOK_WINDOWS #define SUBHOOK_API __cdecl - #elif defined SUBHOOK_LINUX + #elif defined SUBHOOK_UNIX #define SUBHOOK_API __attribute__((cdecl)) #endif #else @@ -76,7 +80,7 @@ #else #define SUBHOOK_EXPORT SUBHOOK_EXTERN __declspec(dllimport) #endif - #elif defined SUBHOOK_LINUX + #elif defined SUBHOOK_UNIX #if defined SUBHOOK_IMPLEMENTATION #define SUBHOOK_EXPORT SUBHOOK_EXTERN __attribute__((visibility("default"))) #else diff --git a/subhook_linux.c b/subhook_unix.c index e074f20..e074f20 100644 --- a/subhook_linux.c +++ b/subhook_unix.c |