xserver: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Aug 3 22:55:54 UTC 2025
os/osdep.h | 5 +++--
os/utils.c | 10 ++++++++++
2 files changed, 13 insertions(+), 2 deletions(-)
New commits:
commit 061690c2e649ce41ae277dd7555ad90855376e31
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Sat Aug 2 17:21:00 2025 -0700
Re-export Ones()
It's used by the nvidia driver
Fixes: 1642adec3 ("dix: unexport Ones()")
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2051>
diff --git a/os/osdep.h b/os/osdep.h
index c93481969..9ed8a3623 100644
--- a/os/osdep.h
+++ b/os/osdep.h
@@ -205,7 +205,7 @@ extern Bool NoListenAll;
extern Bool AllowByteSwappedClients;
#if __has_builtin(__builtin_popcountl)
-# define Ones __builtin_popcountl
+# define Xpopcountl __builtin_popcountl
#else
/*
* Count the number of bits set to 1 in a 32-bit word.
@@ -213,7 +213,7 @@ extern Bool AllowByteSwappedClients;
* https://dspace.mit.edu/handle/1721.1/6086
*/
static inline int
-Ones(unsigned long mask)
+Xpopcountl(unsigned long mask)
{
unsigned long y;
@@ -222,5 +222,6 @@ Ones(unsigned long mask)
return (((y + (y >> 3)) & 030707070707) % 077);
}
#endif
+#define Ones Xpopcountl
#endif /* _OSDEP_H_ */
diff --git a/os/utils.c b/os/utils.c
index ba5280694..23f15bf4a 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -1563,3 +1563,13 @@ AbortServer(void)
OsAbort();
exit(1);
}
+
+/* Exported version for binary compatibility with modules which call it */
+#undef Ones
+_X_EXPORT int Ones(unsigned long);
+
+int
+Ones (unsigned long mask)
+{
+ return Xpopcountl(mask);
+}
More information about the xorg-commit
mailing list