diff options
author | James Zern <jzern@google.com> | 2014-10-30 14:49:31 +0100 |
---|---|---|
committer | James Zern <jzern@google.com> | 2015-03-02 18:43:02 -0800 |
commit | 4426f50179442edb03e06b12359526d2e407b77e (patch) | |
tree | 09280127bcf67bf62840fb2eae13ba97f6cd3cb0 | |
parent | e297fc7171fff74a139b40695843ddf44aa61bea (diff) | |
download | libwebp-4426f50179442edb03e06b12359526d2e407b77e.tar.gz |
webp/types.h: use inline for clang++/-std=c++11
at least clang 3.[45] in c++ mode with -std=c++11 define __STRICT_ANSI__
this change set WEBP_INLINE to inline for c++/non-strict-ansi/> c99
fixes crbug.com/428383
(cherry picked from commit 6638710b9e9f9e7d3b6b9b0ba60799576876e653)
Change-Id: Ief2b934353c336a75865c73c90cc3dc5e4f83913
-rw-r--r-- | src/webp/types.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/webp/types.h b/src/webp/types.h index 568d1f26..9b036e0c 100644 --- a/src/webp/types.h +++ b/src/webp/types.h @@ -18,10 +18,11 @@ #ifndef _MSC_VER #include <inttypes.h> -#ifdef __STRICT_ANSI__ -#define WEBP_INLINE -#else /* __STRICT_ANSI__ */ +#if defined(__cplusplus) || !defined(__STRICT_ANSI__) || \ + (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) #define WEBP_INLINE inline +#else +#define WEBP_INLINE #endif #else typedef signed char int8_t; |