aboutsummaryrefslogtreecommitdiff
path: root/subhook.h
diff options
context:
space:
mode:
authorZeex <zeex@rocketmail.com>2013-01-19 00:25:39 +0700
committerZeex <zeex@rocketmail.com>2013-01-19 00:25:39 +0700
commit03e6b766e510b1ea06a2d524d9784484cbc282a1 (patch)
tree6fb34200d87dcc6a198831606f66104c38974818 /subhook.h
parenta766bd482844b560c651b7905d2f63246e7dcd2d (diff)
downloadsubhook-03e6b766e510b1ea06a2d524d9784484cbc282a1.zip
subhook-03e6b766e510b1ea06a2d524d9784484cbc282a1.tar.gz
subhook-03e6b766e510b1ea06a2d524d9784484cbc282a1.tar.bz2
Experimental support for x86-64
Diffstat (limited to 'subhook.h')
-rw-r--r--subhook.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/subhook.h b/subhook.h
index 02bd4f6..7689adf 100644
--- a/subhook.h
+++ b/subhook.h
@@ -30,6 +30,8 @@
#if defined _M_IX86 || defined __i386__
#define SUBHOOK_X86
+#elif defined _M_AMD64 || __amd64__
+ #define SUBHOOK_X86_64
#else
#error Unsupported architecture
#endif
@@ -56,10 +58,14 @@
#endif
#if !defined SUBHOOK_API
- #if defined SUBHOOK_WINDOWS
- #define SUBHOOK_API __cdecl
- #elif defined SUBHOOK_LINUX
- #define SUBHOOK_API __attribute__((cdecl))
+ #if defined SUBHOOK_X86
+ #if defined SUBHOOK_WINDOWS
+ #define SUBHOOK_API __cdecl
+ #elif defined SUBHOOK_LINUX
+ #define SUBHOOK_API __attribute__((cdecl))
+ #endif
+ #else
+ #define SUBHOOK_API
#endif
#endif
@@ -236,6 +242,6 @@ private:
bool installed_;
};
-#endif
+#endif /* __cplusplus */
#endif /* SUBHOOK_H */