xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Feb 18 11:47:56 UTC 2025


 Xi/xiallowev.c         |    1 +
 Xi/xiquerydevice.c     |    1 +
 Xi/xiquerypointer.c    |    1 +
 Xi/xiqueryversion.c    |    4 ++--
 dix/events.c           |    1 +
 hw/xwayland/xwayland.c |    1 +
 include/misc.h         |   23 -----------------------
 os/fmt.h               |   22 ++++++++++++++++++++++
 randr/rrdispatch.c     |    1 +
 test/misc.c            |    1 +
 xfixes/xfixes.c        |    2 ++
 11 files changed, 33 insertions(+), 25 deletions(-)

New commits:
commit 6c88eb0cc4c6220d9735a907e8998c8a8f91bac8
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Mon Feb 17 19:16:51 2025 +0100

    misc.h: unexport compare_version()
    
    Not used by any external modules, so no need to keep it in public header.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1807>

diff --git a/Xi/xiallowev.c b/Xi/xiallowev.c
index ab027216e..e6b2bea27 100644
--- a/Xi/xiallowev.c
+++ b/Xi/xiallowev.c
@@ -37,6 +37,7 @@
 #include "dix/dix_priv.h"
 #include "dix/exevents_priv.h"
 #include "dix/input_priv.h"
+#include "os/fmt.h"
 
 #include "inputstr.h"           /* DeviceIntPtr      */
 #include "windowstr.h"          /* window structure  */
diff --git a/Xi/xiquerydevice.c b/Xi/xiquerydevice.c
index af72e05f7..2e974e3ab 100644
--- a/Xi/xiquerydevice.c
+++ b/Xi/xiquerydevice.c
@@ -36,6 +36,7 @@
 
 #include "dix/exevents_priv.h"
 #include "dix/input_priv.h"
+#include "os/fmt.h"
 
 #include "inputstr.h"
 #include "xkbstr.h"
diff --git a/Xi/xiquerypointer.c b/Xi/xiquerypointer.c
index 6c9d200ed..19eb8cad1 100644
--- a/Xi/xiquerypointer.c
+++ b/Xi/xiquerypointer.c
@@ -40,6 +40,7 @@
 #include "dix/eventconvert.h"
 #include "dix/exevents_priv.h"
 #include "dix/input_priv.h"
+#include "os/fmt.h"
 
 #include "inputstr.h"           /* DeviceIntPtr      */
 #include "windowstr.h"          /* window structure  */
diff --git a/Xi/xiqueryversion.c b/Xi/xiqueryversion.c
index e6c69dd51..b2055f010 100644
--- a/Xi/xiqueryversion.c
+++ b/Xi/xiqueryversion.c
@@ -31,14 +31,14 @@
 
 #include <dix-config.h>
 
-#include "inputstr.h"
-
 #include <X11/Xmd.h>
 #include <X11/X.h>
 #include <X11/extensions/XI2proto.h>
 
 #include "dix/exevents_priv.h"
+#include "os/fmt.h"
 
+#include "inputstr.h"
 #include "exglobals.h"
 #include "xiqueryversion.h"
 #include "misc.h"
diff --git a/dix/events.c b/dix/events.c
index 6903258d6..56572319c 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -125,6 +125,7 @@ Equipment Corporation.
 #include "dix/eventconvert.h"
 #include "dix/exevents_priv.h"
 #include "os/bug_priv.h"
+#include "os/fmt.h"
 #include "xkb/xkbsrv_priv.h"
 
 #include "misc.h"
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index 5e6f376d8..6540ba8cb 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -40,6 +40,7 @@
 #include "os/cmdline.h"
 #include "os/client_priv.h"
 #include "os/ddx_priv.h"
+#include "os/fmt.h"
 #include "os/osdep.h"
 #include "os/xserver_poll.h"
 
diff --git a/include/misc.h b/include/misc.h
index d83ab8a32..a6b54389e 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -223,31 +223,8 @@ padding_for_int32(const int bytes)
     return ((-bytes) & 3);
 }
 
-
 extern _X_EXPORT char **xstrtokenize(const char *str, const char *separators);
 
-/**
- * Compare the two version numbers comprising of major.minor.
- *
- * @return A value less than 0 if a is less than b, 0 if a is equal to b,
- * or a value greater than 0
- */
-static inline int
-version_compare(uint32_t a_major, uint32_t a_minor,
-                uint32_t b_major, uint32_t b_minor)
-{
-    if (a_major > b_major)
-        return 1;
-    if (a_major < b_major)
-        return -1;
-    if (a_minor > b_minor)
-        return 1;
-    if (a_minor < b_minor)
-        return -1;
-
-    return 0;
-}
-
 /* some macros to help swap requests, replies, and events */
 
 #define LengthRestS(stuff) \
diff --git a/os/fmt.h b/os/fmt.h
index 63cdfe99f..6edf1a5af 100644
--- a/os/fmt.h
+++ b/os/fmt.h
@@ -12,4 +12,26 @@ void FormatUInt64(uint64_t num, char *string);
 void FormatUInt64Hex(uint64_t num, char *string);
 void FormatDouble(double dbl, char *string);
 
+/**
+ * Compare the two version numbers comprising of major.minor.
+ *
+ * @return A value less than 0 if a is less than b, 0 if a is equal to b,
+ * or a value greater than 0
+ */
+static inline int
+version_compare(uint32_t a_major, uint32_t a_minor,
+                uint32_t b_major, uint32_t b_minor)
+{
+    if (a_major > b_major)
+        return 1;
+    if (a_major < b_major)
+        return -1;
+    if (a_minor > b_minor)
+        return 1;
+    if (a_minor < b_minor)
+        return -1;
+
+    return 0;
+}
+
 #endif /* _XSERVER_OS_FMT_H */
diff --git a/randr/rrdispatch.c b/randr/rrdispatch.c
index 8cb79b199..615e89312 100644
--- a/randr/rrdispatch.c
+++ b/randr/rrdispatch.c
@@ -23,6 +23,7 @@
 
 #include "dix/dix_priv.h"
 #include "randr/randrstr_priv.h"
+#include "os/fmt.h"
 
 #include "protocol-versions.h"
 
diff --git a/test/misc.c b/test/misc.c
index bcb789ae9..74329ddf2 100644
--- a/test/misc.c
+++ b/test/misc.c
@@ -29,6 +29,7 @@
 #include <stdint.h>
 
 #include "dix/input_priv.h"
+#include "os/fmt.h"
 
 #include "misc.h"
 #include "scrnintstr.h"
diff --git a/xfixes/xfixes.c b/xfixes/xfixes.c
index 5fff4ce57..007515c55 100644
--- a/xfixes/xfixes.c
+++ b/xfixes/xfixes.c
@@ -44,6 +44,8 @@
 
 #include <dix-config.h>
 
+#include "os/fmt.h"
+
 #include "xfixesint.h"
 #include "protocol-versions.h"
 #include "extinit_priv.h"


More information about the xorg-commit mailing list