From: W. Felix Handte Date: Thu, 30 Apr 2020 21:20:40 +0000 (-0400) Subject: Avoid inline Keyword in C90 X-Git-Tag: v1.4.5^2~50^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=952427aebfbcb46299fa39ef1347d67929c2b3b4;p=thirdparty%2Fzstd.git Avoid inline Keyword in C90 Previously we would use it for all gcc-like compilations, even when a restrictive mode that disallowed it had been selected. --- diff --git a/lib/common/compiler.h b/lib/common/compiler.h index 2f18efb0a..95e948352 100644 --- a/lib/common/compiler.h +++ b/lib/common/compiler.h @@ -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 diff --git a/lib/common/xxhash.c b/lib/common/xxhash.c index 429a869e9..72314c59f 100644 --- a/lib/common/xxhash.c +++ b/lib/common/xxhash.c @@ -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