xfree86: compat: fix Ones for compilers where __builtin_popcountl is missing

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
This commit is contained in:
stefan11111 2025-06-23 14:27:10 +03:00 committed by Enrico Weigelt
parent 3f5e4b1d97
commit 0746e6841a

View File

@ -27,7 +27,6 @@ Ones(unsigned long mask)
y = (mask >> 1) & 033333333333;
y = mask - y - ((y >> 1) & 033333333333);
/* x & 077 == x % 077 */
return (((y + (y >> 3)) & 030707070707) & 077);
return (((y + (y >> 3)) & 030707070707) % 077);
#endif
}