Skip to content

Commit

Permalink
Make the GCC/Clang version check slightly more robust (#913)
Browse files Browse the repository at this point in the history
Clang defines __GNUC__ (masquerading as GCC 4.2.1), too, so make sure the GCC version check excludes clang...

Shouldn't make any difference in practice, but, technically more correct ;).
  • Loading branch information
NiLuJe committed May 1, 2019
1 parent b525cb4 commit 531e4bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion blitbuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ static const char*
// __auto_type was introduced in GCC 4.9 (and Clang ~3.8)...
// NOTE: Inspired from glibc's __GNUC_PREREQ && __glibc_clang_prereq macros (from <features.h>),
// which we of course can't use because some of our TCs use a glibc version old enough not to have the clang one...
#if (defined(__clang__) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 8))) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9)))
#if (defined(__clang__) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 8))) || \
((defined(__GNUC__) && !defined(__clang__)) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9)))
//#warning "Auto Type :)"
#define DIV_255(V) \
({ \
Expand Down

0 comments on commit 531e4bc

Please sign in to comment.