]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Add Option to Not Request Inlining with ZSTD_NO_INLINE
authorW. Felix Handte <w@felixhandte.com>
Sat, 17 Nov 2018 00:43:57 +0000 (16:43 -0800)
committerW. Felix Handte <w@felixhandte.com>
Tue, 18 Dec 2018 21:36:39 +0000 (13:36 -0800)
lib/common/compiler.h

index e6267e90b974a66d609ea11f1c1b43cbbd4035a4..7f561282ca35ed6c09528c822d0b58f7660e09cc 100644 (file)
@@ -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
 #  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