diff options
Diffstat (limited to 'Build/source/utils/asymptote/prc/writePRC.cc')
-rw-r--r-- | Build/source/utils/asymptote/prc/writePRC.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Build/source/utils/asymptote/prc/writePRC.cc b/Build/source/utils/asymptote/prc/writePRC.cc index 8f1d7370f33..7e1e1358bd9 100644 --- a/Build/source/utils/asymptote/prc/writePRC.cc +++ b/Build/source/utils/asymptote/prc/writePRC.cc @@ -31,10 +31,14 @@ using namespace std; +#ifndef __GNUC_PREREQ +#define __GNUC_PREREQ(maj, min) (0) +#endif + // Count leading zeros. uint32_t CLZ(uint32_t a) { -#ifdef __GNUC__ +#if __GNUC_PREREQ(3,4) return __builtin_clz(a); #else // find the log base 2 of a 32-bit integer @@ -49,7 +53,7 @@ uint32_t CLZ(uint32_t a) a |= a >> 8; a |= a >> 16; - return 31-MultiplyDeBruijnBitPosition[(unsignedInt)(a * 0x07C4ACDDU) >> 27]; + return 31-MultiplyDeBruijnBitPosition[(uint32_t)(a * 0x07C4ACDDU) >> 27]; #endif } |