From 015b8a7e7d2876d5f024359ef46fe493e10ec165 Mon Sep 17 00:00:00 2001 From: Morten Kristensen Date: Sun, 18 Sep 2016 15:28:24 +0200 Subject: [PATCH] Support compilation under Clang and GCC. --- cppbindings/CsCapstoneHelper.hh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/cppbindings/CsCapstoneHelper.hh b/cppbindings/CsCapstoneHelper.hh index daf7a73..ae5ea7c 100644 --- a/cppbindings/CsCapstoneHelper.hh +++ b/cppbindings/CsCapstoneHelper.hh @@ -3,6 +3,25 @@ #include #include +// Support compilation under Clang and GCC. +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) +#ifndef __forceinline +#define __forceinline __attribute__((always_inline)) +#endif + +#ifndef __in +#define __in +#endif + +#ifndef __inout +#define __inout +#endif + +#ifndef __checkReturn +#define __checkReturn +#endif +#endif + struct CS_HANDLE : public std::shared_ptr {