]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Avoid inline Keyword in C90
authorW. Felix Handte <w@felixhandte.com>
Thu, 30 Apr 2020 21:20:40 +0000 (17:20 -0400)
committerW. Felix Handte <w@felixhandte.com>
Mon, 4 May 2020 14:59:15 +0000 (10:59 -0400)
Previously we would use it for all gcc-like compilations, even when a
restrictive mode that disallowed it had been selected.

lib/common/compiler.h
lib/common/xxhash.c

index 2f18efb0a424f050c259964185129ac56d7390ba..95e9483521d4f85741168be433cba20f2b4bdde2 100644 (file)
@@ -17,7 +17,7 @@
 /* force inlining */
 
 #if !defined(ZSTD_NO_INLINE)
-#if defined (__GNUC__) || defined(__cplusplus) || defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L   /* C99 */
+#if (defined(__GNUC__) && !defined(__STRICT_ANSI__)) || defined(__cplusplus) || defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L   /* C99 */
 #  define INLINE_KEYWORD inline
 #else
 #  define INLINE_KEYWORD
index 429a869e9a403bcf23ca09e76e47b3b12328a328..72314c59f363a2befda27e0874ba0852b68e6bd4 100644 (file)
@@ -95,7 +95,7 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size) { return memcp
 /* *************************************
 *  Compiler Specific Options
 ***************************************/
-#if defined (__GNUC__) || defined(__cplusplus) || defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L   /* C99 */
+#if (defined(__GNUC__) && !defined(__STRICT_ANSI__)) || defined(__cplusplus) || defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L   /* C99 */
 #  define INLINE_KEYWORD inline
 #else
 #  define INLINE_KEYWORD