diff --git a/common/math.h b/common/math.h index 85e7d212384..2c2a1554b0d 100644 --- a/common/math.h +++ b/common/math.h @@ -66,7 +66,7 @@ struct Complex { float re, im; }; -#if GCC_ATLEAST(3, 4) +#if defined(__GNUC__) inline int intLog2(uint32 v) { // This is a slightly optimized implementation of log2 for natural numbers // targeting gcc. It also saves some binary size over our fallback @@ -94,6 +94,7 @@ static const char LogTable256[256] = { -1, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, LT(4), LT(5), LT(5), LT(6), LT(6), LT(6), LT(6), LT(7), LT(7), LT(7), LT(7), LT(7), LT(7), LT(7), LT(7) +#undef LT }; inline int intLog2(uint32 v) {