Avoid harmless -Wundef warnings for __clang_major__

Check that we're using Clang before checking its version.
This commit is contained in:
Vadim Zeitlin 2017-12-08 03:26:25 +01:00
parent 9c243a11a3
commit 1eb6fefb2e

View File

@ -312,7 +312,7 @@ typedef size_t TIFFIOSize_t;
#define _TIFF_off_t off_t
#endif
#if __clang_major__ >= 4 || (__clang_major__ == 3 && __clang_minor__ >= 8)
#if defined(__clang__) && (__clang_major__ >= 4 || (__clang_major__ == 3 && __clang_minor__ >= 8))
#define TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW __attribute__((no_sanitize("unsigned-integer-overflow")))
#else
#define TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW