mirror of
https://github.com/google/brotli.git
synced 2024-11-21 19:20:09 +00:00
Only use __builtin_clz on GCC >= 3.4
Haiku at least still requires GCC 2 for system components.
This commit is contained in:
parent
7e347a7c84
commit
cd10805e33
@ -19,7 +19,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
static BROTLI_INLINE uint32_t Log2FloorNonZero(size_t n) {
|
||||
#ifdef __GNUC__
|
||||
#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 3)
|
||||
return 31u ^ (uint32_t)__builtin_clz((uint32_t)n);
|
||||
#else
|
||||
uint32_t result = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user