From 9d5f3963ff02827b17945edfc6facb676866be0b Mon Sep 17 00:00:00 2001 From: "W. Felix Handte" Date: Fri, 16 Nov 2018 16:43:57 -0800 Subject: [PATCH] Add Option to Not Request Inlining with ZSTD_NO_INLINE --- lib/common/compiler.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/common/compiler.h b/lib/common/compiler.h index e6267e90b..7f561282c 100644 --- a/lib/common/compiler.h +++ b/lib/common/compiler.h @@ -15,6 +15,8 @@ * Compiler specifics *********************************************************/ /* force inlining */ + +#if !defined(ZSTD_NO_INLINE) #if defined (__GNUC__) || defined(__cplusplus) || defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ # define INLINE_KEYWORD inline #else @@ -29,6 +31,13 @@ # define FORCE_INLINE_ATTR #endif +#else + +#define INLINE_KEYWORD +#define FORCE_INLINE_ATTR + +#endif + /** * FORCE_INLINE_TEMPLATE is used to define C "templates", which take constant * parameters. They must be inlined for the compiler to elimininate the constant