mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 14:34:33 +02:00
Use __has_builtin to check clang support
Older versions of Xcode with clang reporting versions 4.[012] and 5.0 did not include support for __builtin_bswap16. Checking in this manner avoids using brittle version checks. Matches a change to libvpx: https://chromium-review.googlesource.com/305573 to fix: https://code.google.com/p/webm/issues/detail?id=1082 Change-Id: I23ea466ee1b53b12cd3fb45f65a2186c8dda95a1
This commit is contained in:
@ -38,14 +38,9 @@ extern "C" {
|
||||
# define LOCAL_GCC_PREREQ(maj, min) 0
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
# define LOCAL_CLANG_VERSION ((__clang_major__ << 8) | __clang_minor__)
|
||||
# define LOCAL_CLANG_PREREQ(maj, min) \
|
||||
(LOCAL_CLANG_VERSION >= (((maj) << 8) | (min)))
|
||||
#else
|
||||
# define LOCAL_CLANG_VERSION 0
|
||||
# define LOCAL_CLANG_PREREQ(maj, min) 0
|
||||
#endif // __clang__
|
||||
#ifndef __has_builtin
|
||||
# define __has_builtin(x) 0
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER > 1310 && \
|
||||
(defined(_M_X64) || defined(_M_IX86))
|
||||
|
Reference in New Issue
Block a user