mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
Fixed the check for __builtin_popcountl for old compilers.
Old compilers used on some platforms (e.g. DragonFlyBSD) do not support __has_builtin, so now we fall back to #if define if __has_builtin is not found. Signed-off-by: b-aaz <b-aazbsd@proton.me>
This commit is contained in:
@@ -20,8 +20,12 @@ int
|
||||
Ones(unsigned long mask)
|
||||
{ /* HACKMEM 169 */
|
||||
/* can't add a message here because this should be fast */
|
||||
#if defined __has_builtin
|
||||
#if __has_builtin(__builtin_popcountl)
|
||||
return __builtin_popcountl (mask);
|
||||
#endif
|
||||
#elif defined __builtin_popcountl
|
||||
return __builtin_popcountl (mask);
|
||||
#else
|
||||
unsigned long y;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user