diff --git a/include/ck_cc.h b/include/ck_cc.h index b588616..e17dc7b 100644 --- a/include/ck_cc.h +++ b/include/ck_cc.h @@ -36,6 +36,14 @@ #define CK_CC_RESTRICT #endif +#ifndef CK_CC_INLINE +#define CK_CC_INLINE inline +#endif + +#ifndef CK_CC_FORCE_INLINE +#define CK_CC_FORCE_INLINE inline +#endif + #define CK_CC_DECONST_PTR(X) ((void *)(uintptr_t)(X)) /* diff --git a/include/gcc/ck_cc.h b/include/gcc/ck_cc.h index 481a314..6806130 100644 --- a/include/gcc/ck_cc.h +++ b/include/gcc/ck_cc.h @@ -48,15 +48,13 @@ #endif /* __x86_64__ || __x86__ */ #endif -/* - * If optimizations are turned on, then force inlining. - */ #ifdef __OPTIMIZE__ #define CK_CC_INLINE CK_CC_UNUSED inline #else #define CK_CC_INLINE CK_CC_UNUSED #endif +#define CK_CC_FORCE_INLINE CK_CC_UNUSED __attribute__((always_inline)) inline #define CK_CC_RESTRICT restrict /*