From: W. Felix Handte Date: Sat, 17 Nov 2018 00:43:57 +0000 (-0800) Subject: Add Option to Not Request Inlining with ZSTD_NO_INLINE X-Git-Tag: v1.3.8~13^2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d5f3963ff02827b17945edfc6facb676866be0b;p=thirdparty%2Fzstd.git Add Option to Not Request Inlining with ZSTD_NO_INLINE --- 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