xserver: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Jun 14 15:39:55 UTC 2025
Xext/sync.c | 1 -
Xi/exevents.c | 1 -
Xi/xibarriers.c | 1 -
Xi/xichangehierarchy.c | 1 -
dix/cursor.c | 1 -
dix/devices.c | 1 -
dix/enterleave.c | 1 -
dix/events.c | 1 -
dix/gestures.c | 1 -
dix/getevents.c | 1 -
dix/inpututils.c | 1 -
dix/ptrveloc.c | 1 -
dix/touch.c | 1 -
hw/xwayland/xwayland-input.c | 1 -
include/misc.h | 27 +++++++++++++++++++++++++++
mi/mieq.c | 1 -
miext/shadow/c2p_core.h | 1 -
os/bug_priv.h | 33 ---------------------------------
os/io.c | 1 -
os/log.c | 1 -
os/utils.c | 1 -
render/glyph.c | 1 -
xkb/xkbInit.c | 1 -
23 files changed, 27 insertions(+), 54 deletions(-)
New commits:
commit 3bdb541e042124e418d5ae4eac6bd47e2ffd2cc0
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri Jun 13 17:08:39 2025 -0700
Revert "os: move BUG_*() macros to own private header"
This reverts commit 346d5f5c352146879c749b2177b3671a374b6503.
That commit did not handle copyright/license notices correctly.
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2019>
diff --git a/Xext/sync.c b/Xext/sync.c
index 0ee4a8130..8eec01ebb 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -59,7 +59,6 @@ PERFORMANCE OF THIS SOFTWARE.
#include <X11/extensions/syncproto.h>
#include "dix/dix_priv.h"
-#include "os/bug_priv.h"
#include "os/osdep.h"
#include "scrnintstr.h"
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 753172c0e..a9c2300cc 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -81,7 +81,6 @@ SOFTWARE.
#include <dix-config.h>
#include "dix/cursor_priv.h"
-#include "os/bug_priv.h"
#include <X11/X.h>
#include <X11/Xproto.h>
diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c
index 6761bcb49..28bc0a24f 100644
--- a/Xi/xibarriers.c
+++ b/Xi/xibarriers.c
@@ -47,7 +47,6 @@
#include "dix/dix_priv.h"
#include "dix/input_priv.h"
#include "mi/mi_priv.h"
-#include "os/bug_priv.h"
#include "xibarriers.h"
#include "scrnintstr.h"
diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c
index c1b25a40f..c49fb4cfc 100644
--- a/Xi/xichangehierarchy.c
+++ b/Xi/xichangehierarchy.c
@@ -41,7 +41,6 @@
#include "dix/dix_priv.h"
#include "dix/exevents_priv.h"
#include "dix/input_priv.h"
-#include "os/bug_priv.h"
#include "inputstr.h" /* DeviceIntPtr */
#include "windowstr.h" /* window structure */
diff --git a/dix/cursor.c b/dix/cursor.c
index f12c50971..e3774f7be 100644
--- a/dix/cursor.c
+++ b/dix/cursor.c
@@ -51,7 +51,6 @@ SOFTWARE.
#include "dix/cursor_priv.h"
#include "dix/dix_priv.h"
-#include "os/bug_priv.h"
#include "servermd.h"
#include "scrnintstr.h"
diff --git a/dix/devices.c b/dix/devices.c
index 310364730..740390207 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -61,7 +61,6 @@ SOFTWARE.
#include "dix/input_priv.h"
#include "dix/ptrveloc_priv.h"
#include "mi/mi_priv.h"
-#include "os/bug_priv.h"
#include "os/osdep.h"
#include "xkb/xkbsrv_priv.h"
diff --git a/dix/enterleave.c b/dix/enterleave.c
index 5432ddc74..b954c8e21 100644
--- a/dix/enterleave.c
+++ b/dix/enterleave.c
@@ -34,7 +34,6 @@
#include "dix/dix_priv.h"
#include "dix/eventconvert.h"
#include "dix/input_priv.h"
-#include "os/bug_priv.h"
#include "inputstr.h"
#include "windowstr.h"
diff --git a/dix/events.c b/dix/events.c
index c146c823b..d14dfe489 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -124,7 +124,6 @@ Equipment Corporation.
#include "dix/input_priv.h"
#include "dix/eventconvert.h"
#include "dix/exevents_priv.h"
-#include "os/bug_priv.h"
#include "os/client_priv.h"
#include "os/fmt.h"
#include "xkb/xkbsrv_priv.h"
diff --git a/dix/gestures.c b/dix/gestures.c
index 038bc357c..6b0f24728 100644
--- a/dix/gestures.c
+++ b/dix/gestures.c
@@ -30,7 +30,6 @@
#include "dix/eventconvert.h"
#include "dix/input_priv.h"
#include "mi/mi_priv.h"
-#include "os/bug_priv.h"
#include "inputstr.h"
#include "scrnintstr.h"
diff --git a/dix/getevents.c b/dix/getevents.c
index 34014ffbb..5242fd270 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -42,7 +42,6 @@
#include "dix/input_priv.h"
#include "mi/mi_priv.h"
-#include "os/bug_priv.h"
#include "misc.h"
#include "resource.h"
diff --git a/dix/inpututils.c b/dix/inpututils.c
index 863e78cbc..f6b383ebc 100644
--- a/dix/inpututils.c
+++ b/dix/inpututils.c
@@ -27,7 +27,6 @@
#include "dix/exevents_priv.h"
#include "dix/input_priv.h"
-#include "os/bug_priv.h"
#include "exglobals.h"
#include "misc.h"
diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
index cae377333..63fe07b10 100644
--- a/dix/ptrveloc.c
+++ b/dix/ptrveloc.c
@@ -27,7 +27,6 @@
#include <math.h>
#include "dix/ptrveloc_priv.h"
-#include "os/bug_priv.h"
#include <ptrveloc.h>
#include <exevents.h>
diff --git a/dix/touch.c b/dix/touch.c
index 9365fc70e..7c509fb26 100644
--- a/dix/touch.c
+++ b/dix/touch.c
@@ -32,7 +32,6 @@
#include "dix/exevents_priv.h"
#include "dix/input_priv.h"
#include "mi/mi_priv.h"
-#include "os/bug_priv.h"
#include "inputstr.h"
#include "scrnintstr.h"
diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
index b137b816b..620778719 100644
--- a/hw/xwayland/xwayland-input.c
+++ b/hw/xwayland/xwayland-input.c
@@ -34,7 +34,6 @@
#include "dix/input_priv.h"
#include "mi/mi_priv.h"
#include "mi/mipointer_priv.h"
-#include "os/bug_priv.h"
#include <inputstr.h>
#include <xkbsrv.h>
diff --git a/include/misc.h b/include/misc.h
index 9ba9f9b8a..45e4370cc 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -374,4 +374,31 @@ typedef struct _CharInfo *CharInfoPtr; /* also in fonts/include/font.h */
extern _X_EXPORT unsigned long globalSerialNumber;
extern _X_EXPORT unsigned long serverGeneration;
+/* Don't use this directly, use BUG_WARN or BUG_WARN_MSG instead */
+#define __BUG_WARN_MSG(cond, with_msg, ...) \
+ do { if (cond) { \
+ ErrorF("BUG: triggered 'if (" #cond ")'\n"); \
+ ErrorF("BUG: %s:%u in %s()\n", \
+ __FILE__, __LINE__, __func__); \
+ if (with_msg) ErrorF(__VA_ARGS__); \
+ xorg_backtrace(); \
+ } } while(0)
+
+#define BUG_WARN_MSG(cond, ...) \
+ __BUG_WARN_MSG(cond, 1, __VA_ARGS__)
+
+#define BUG_WARN(cond) __BUG_WARN_MSG(cond, 0, NULL)
+
+#define BUG_RETURN(cond) \
+ do { if (cond) { __BUG_WARN_MSG(cond, 0, NULL); return; } } while(0)
+
+#define BUG_RETURN_MSG(cond, ...) \
+ do { if (cond) { __BUG_WARN_MSG(cond, 1, __VA_ARGS__); return; } } while(0)
+
+#define BUG_RETURN_VAL(cond, val) \
+ do { if (cond) { __BUG_WARN_MSG(cond, 0, NULL); return (val); } } while(0)
+
+#define BUG_RETURN_VAL_MSG(cond, val, ...) \
+ do { if (cond) { __BUG_WARN_MSG(cond, 1, __VA_ARGS__); return (val); } } while(0)
+
#endif /* MISC_H */
diff --git a/mi/mieq.c b/mi/mieq.c
index dea7761da..6d9e3eb87 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -44,7 +44,6 @@ in this Software without prior written authorization from The Open Group.
#include "dix/cursor_priv.h"
#include "mi/mi_priv.h"
#include "mi/mipointer_priv.h"
-#include "os/bug_priv.h"
#include "os/screensaver.h"
#include "misc.h"
diff --git a/miext/shadow/c2p_core.h b/miext/shadow/c2p_core.h
index d0db2b5f3..5b9ea066c 100644
--- a/miext/shadow/c2p_core.h
+++ b/miext/shadow/c2p_core.h
@@ -27,7 +27,6 @@
* DEALINGS IN THE SOFTWARE.
*/
-#include "os/bug_priv.h"
/*
* Basic transpose step
diff --git a/os/bug_priv.h b/os/bug_priv.h
deleted file mode 100644
index 7fc8b307a..000000000
--- a/os/bug_priv.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* SPDX-License-Identifier: MIT OR X11
- *
- * Copyright © 2024 Enrico Weigelt, metux IT consult <info at metux.net>
- */
-#ifndef _XSERVER_OS_BUG_H_
-#define _XSERVER_OS_BUG_H_
-
-/* Don't use this directly, use BUG_WARN or BUG_WARN_MSG instead */
-#define __BUG_WARN_MSG(cond, with_msg, ...) \
- do { if (cond) { \
- ErrorF("BUG: 'if (" #cond ")'\n"); \
- ErrorF("BUG: %s:%u in %s()\n", __FILE__, __LINE__, __func__); \
- if (with_msg) ErrorF(__VA_ARGS__); \
- xorg_backtrace(); \
- } } while(0)
-
-#define BUG_WARN_MSG(cond, ...) __BUG_WARN_MSG(cond, 1, __VA_ARGS__)
-
-#define BUG_WARN(cond) __BUG_WARN_MSG(cond, 0, NULL)
-
-#define BUG_RETURN(cond) \
- do { if (cond) { __BUG_WARN_MSG(cond, 0, NULL); return; } } while(0)
-
-#define BUG_RETURN_MSG(cond, ...) \
- do { if (cond) { __BUG_WARN_MSG(cond, 1, __VA_ARGS__); return; } } while(0)
-
-#define BUG_RETURN_VAL(cond, val) \
- do { if (cond) { __BUG_WARN_MSG(cond, 0, NULL); return (val); } } while(0)
-
-#define BUG_RETURN_VAL_MSG(cond, val, ...) \
- do { if (cond) { __BUG_WARN_MSG(cond, 1, __VA_ARGS__); return (val); } } while(0)
-
-#endif /* _XSERVER_OS_BUG_H_ */
diff --git a/os/io.c b/os/io.c
index 17fba5602..1fffaf62c 100644
--- a/os/io.c
+++ b/os/io.c
@@ -74,7 +74,6 @@ SOFTWARE.
#include <X11/Xproto.h>
#include "dix/dix_priv.h"
-#include "os/bug_priv.h"
#include "os/client_priv.h"
#include "os/osdep.h"
diff --git a/os/log.c b/os/log.c
index 779615e57..a7ea22a17 100644
--- a/os/log.c
+++ b/os/log.c
@@ -91,7 +91,6 @@ OR PERFORMANCE OF THIS SOFTWARE.
#include "dix/dix_priv.h"
#include "dix/input_priv.h"
#include "os/audit.h"
-#include "os/bug_priv.h"
#include "os/ddx_priv.h"
#include "os/fmt.h"
#include "os/osdep.h"
diff --git a/os/utils.c b/os/utils.c
index 99b09e5c9..e4e58fe1a 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -107,7 +107,6 @@ __stdcall unsigned long GetTickCount(void);
#include "dix/dix_priv.h"
#include "dix/input_priv.h"
#include "os/auth.h"
-#include "os/bug_priv.h"
#include "os/cmdline.h"
#include "os/ddx_priv.h"
#include "os/osdep.h"
diff --git a/render/glyph.c b/render/glyph.c
index cc982a038..30f423742 100644
--- a/render/glyph.c
+++ b/render/glyph.c
@@ -24,7 +24,6 @@
#include <dix-config.h>
-#include "os/bug_priv.h"
#include "os/xsha1.h"
#include "misc.h"
diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index d3259225f..d187a1e87 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -39,7 +39,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/Xatom.h>
#include <X11/extensions/XKMformat.h>
-#include "os/bug_priv.h"
#include "os/cmdline.h"
#include "xkb/xkbsrv_priv.h"
More information about the xorg-commit
mailing list